This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Backport changes from
keystoregaen
, bump dependencies
- Loading branch information
Showing
34 changed files
with
682 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,21 +3,46 @@ name: hydrun CI | |
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: "0 0 * * 0" | ||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
target: | ||
- id: test | ||
src: . | ||
os: golang:bullseye | ||
flags: "" | ||
cmd: GOFLAGS="-short" ./Hydrunfile test | ||
dst: out/* | ||
- id: go | ||
src: . | ||
os: golang:bullseye | ||
flags: "" | ||
cmd: ./Hydrunfile go | ||
dst: out/* | ||
- id: gccgo | ||
src: . | ||
os: ghcr.io/pojntfx/bagccgop-base-sid | ||
flags: -e '--privileged' | ||
cmd: ./Hydrunfile gccgo | ||
dst: out/* | ||
- id: pwa | ||
src: . | ||
os: golang:bullseye | ||
flags: "" | ||
cmd: make -j "$(nproc)" | ||
cmd: ./Hydrunfile pwa | ||
dst: out/* | ||
|
||
steps: | ||
- name: Maximize build space | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /usr/local/lib/android | ||
sudo rm -rf /opt/ghc | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up QEMU | ||
|
@@ -49,10 +74,11 @@ jobs: | |
uses: actions/download-artifact@v2 | ||
with: | ||
path: /tmp/out | ||
- name: Isolate the repositories | ||
- name: Isolate the PWA | ||
run: | | ||
mkdir -p /tmp/github-pages | ||
cp -r /tmp/out/pwa/web/* /tmp/github-pages | ||
tar -xvzf /tmp/out/pwa/keystoregaen-pwa.tar.gz --directory /tmp/github-pages | ||
- name: Publish pre-release to GitHub releases | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
uses: marvinpinto/action-automatic-releases@latest | ||
|
@@ -71,7 +97,8 @@ jobs: | |
files: | | ||
/tmp/out/*/* | ||
- name: Publish release to GitHub pages | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
if: startsWith(github.ref, 'refs/tags/v') # Uncomment on first release | ||
# if: ${{ github.ref == 'refs/heads/main' }} # Comment on first release | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
web/*.wasm | ||
out | ||
build | ||
web/*.wasm | ||
web/fonts | ||
web/*.css* | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,86 @@ | ||
# Variables | ||
# Public variables | ||
DESTDIR ?= | ||
|
||
WWWROOT ?= /var/www/html | ||
WWWPREFIX ?= /keygaen | ||
|
||
all: build | ||
PREFIX ?= /usr/local | ||
OUTPUT_DIR ?= out | ||
BUILD_DIR ?= build | ||
STATIC_DIR ?= web | ||
DST ?= | ||
|
||
# Private variables | ||
clis = keygaen-cli | ||
pwas = keygaen-pwa | ||
all: $(addprefix build-cli/,$(clis)) $(addprefix build-pwa/,$(pwas)) | ||
|
||
# Build | ||
build: | ||
GOARCH=wasm GOOS=js go build -o web/app.wasm main.go | ||
go run main.go -prefix $(WWWPREFIX) | ||
cp -rf web/* out/web/web | ||
tar -cvzf out/keygaen.tar.gz -C out/web . | ||
build: $(addprefix build-cli/,$(clis)) $(addprefix build-pwa/,$(pwas)) | ||
|
||
$(addprefix build-cli/,$(clis)): | ||
ifdef DST | ||
go build -o $(DST) ./cmd/$(subst build-cli/,,$@) | ||
else | ||
go build -o $(OUTPUT_DIR)/$(subst build-cli/,,$@) ./cmd/$(subst build-cli/,,$@) | ||
endif | ||
|
||
$(addprefix build-pwa/,$(pwas)): build-scss | ||
mkdir -p $(OUTPUT_DIR) $(BUILD_DIR) | ||
GOARCH=wasm GOOS=js go build -o $(STATIC_DIR)/app.wasm ./cmd/$(subst build-pwa/,,$@) | ||
go run ./cmd/$(subst build-pwa/,,$@) -dist $(BUILD_DIR) -prefix $(WWWPREFIX) | ||
cp -rf $(STATIC_DIR)/* $(BUILD_DIR)/web | ||
tar -cvzf $(OUTPUT_DIR)/$(subst build-pwa/,,$@).tar.gz -C $(BUILD_DIR) . | ||
|
||
build-scss: | ||
npx sass -I . web/main.scss web/main.css | ||
|
||
# Install | ||
install: | ||
install: $(addprefix install-cli/,$(clis)) $(addprefix install-pwa/,$(pwas)) | ||
|
||
$(addprefix install-cli/,$(clis)): | ||
install -D -m 0755 $(OUTPUT_DIR)/$(subst install-cli/,,$@) $(DESTDIR)$(PREFIX)/bin/$(subst install-cli/,,$@) | ||
|
||
$(addprefix install-pwa/,$(pwas)): | ||
mkdir -p $(DESTDIR)$(WWWROOT)$(WWWPREFIX) | ||
cp -rf out/web/* $(DESTDIR)$(WWWROOT)$(WWWPREFIX) | ||
cp -rf $(BUILD_DIR)/* $(DESTDIR)$(WWWROOT)$(WWWPREFIX) | ||
|
||
# Uninstall | ||
uninstall: | ||
uninstall: $(addprefix uninstall-cli/,$(clis)) $(addprefix uninstall-pwa/,$(pwas)) | ||
|
||
$(addprefix uninstall-cli/,$(clis)): | ||
rm -f $(DESTDIR)$(PREFIX)/bin/$(subst uninstall-cli/,,$@) | ||
|
||
$(addprefix uninstall-pwa/,$(pwas)): | ||
rm -rf $(DESTDIR)$(WWWROOT)$(WWWPREFIX) | ||
|
||
# Run | ||
run: | ||
GOARCH=wasm GOOS=js go build -o web/app.wasm main.go | ||
go run main.go -serve | ||
run: $(addprefix run-cli/,$(clis)) $(addprefix run-pwa/,$(pwas)) | ||
|
||
$(addprefix run-cli/,$(clis)): build | ||
$(OUTPUT_DIR)/$(subst run-cli/,,$@) $(ARGS) | ||
|
||
$(addprefix run-pwa/,$(pwas)): build-scss | ||
GOARCH=wasm GOOS=js go build -o $(STATIC_DIR)/app.wasm ./cmd/$(subst run-pwa/,,$@) | ||
go run ./cmd/$(subst run-pwa/,,$@) -serve | ||
|
||
# Test | ||
test: | ||
go test -timeout 3600s -parallel $(shell nproc) ./... | ||
|
||
# Benchmark | ||
benchmark: | ||
go test -timeout 3600s -bench=./... ./... | ||
|
||
# Clean | ||
clean: | ||
rm -rf out web/app.wasm | ||
rm -rf $(OUTPUT_DIR) $(BUILD_DIR) $(STATIC_DIR)/app.wasm | ||
|
||
# Dependencies | ||
depend: | ||
npm i | ||
find node_modules/@patternfly/patternfly/ -name "*.css" -type f -delete | ||
rm -rf $(STATIC_DIR)/fonts | ||
mkdir -p $(STATIC_DIR) | ||
cp -r node_modules/@patternfly/patternfly/assets/fonts $(STATIC_DIR) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package main | ||
|
||
func main() { | ||
panic("not implemented") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,8 +33,8 @@ func main() { | |
Title: "keygaen", | ||
Name: "keygaen", | ||
ShortName: "keygaen", | ||
Description: "Sign, verify, encrypt and decrypt data with GPG.", | ||
LoadingLabel: "Sign, verify, encrypt and decrypt data with GPG.", | ||
Description: "Sign, verify, encrypt and decrypt data with PGP.", | ||
LoadingLabel: "Sign, verify, encrypt and decrypt data with PGP.", | ||
Author: "Felicitas Pojtinger", | ||
ThemeColor: "#151515", | ||
BackgroundColor: "#151515", | ||
|
@@ -43,7 +43,7 @@ func main() { | |
Large: `/web/large.png`, | ||
}, | ||
Keywords: []string{ | ||
"gpg", | ||
"pgp", | ||
"pgp", | ||
"gopenpgp", | ||
"encryption", | ||
|
@@ -52,13 +52,11 @@ func main() { | |
RawHeaders: []string{ | ||
`<meta property="og:url" content="https://pojntfx.github.io/keygaen/">`, | ||
`<meta property="og:title" content="keygaen">`, | ||
`<meta property="og:description" content="Sign, verify, encrypt and decrypt data with GPG.">`, | ||
`<meta property="og:description" content="Sign, verify, encrypt and decrypt data with PGP.">`, | ||
`<meta property="og:image" content="https://pojntfx.github.io/keygaen/web/default.png">`, | ||
}, | ||
Styles: []string{ | ||
`https://unpkg.com/@patternfly/[email protected]/patternfly.css`, | ||
`https://unpkg.com/@patternfly/[email protected]/patternfly-addons.css`, | ||
`/web/index.css`, | ||
"/web/main.css", | ||
}, | ||
} | ||
|
||
|
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
module github.com/pojntfx/keygaen | ||
|
||
go 1.17 | ||
go 1.18 | ||
|
||
require ( | ||
github.com/ProtonMail/go-crypto v0.0.0-20210920160938-87db9fbc61c7 | ||
github.com/ProtonMail/gopenpgp/v2 v2.2.4 | ||
github.com/maxence-charriere/go-app/v9 v9.0.0 | ||
github.com/ProtonMail/go-crypto v0.0.0-20220930113650-c6815a8c17ad | ||
github.com/ProtonMail/gopenpgp/v2 v2.4.10 | ||
github.com/maxence-charriere/go-app/v9 v9.6.7 | ||
) | ||
|
||
require ( | ||
github.com/ProtonMail/go-mime v0.0.0-20190923161245-9b5a4261663a // indirect | ||
github.com/google/uuid v1.2.0 // indirect | ||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect | ||
github.com/ProtonMail/go-mime v0.0.0-20220429130430-2192574d760f // indirect | ||
github.com/cloudflare/circl v1.2.0 // indirect | ||
github.com/google/uuid v1.3.0 // indirect | ||
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/sirupsen/logrus v1.4.2 // indirect | ||
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 // indirect | ||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44 // indirect | ||
golang.org/x/text v0.3.6 // indirect | ||
github.com/sirupsen/logrus v1.9.0 // indirect | ||
golang.org/x/crypto v0.1.0 // indirect | ||
golang.org/x/sys v0.1.0 // indirect | ||
golang.org/x/text v0.4.0 // indirect | ||
) |
Oops, something went wrong.