1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 17:10:10 +00:00

build: fix up goreleaser

removed deprecated options, fixed to work with new user page.
This commit is contained in:
Harvey Tindall 2023-06-23 13:00:46 +01:00
parent bfeab3648c
commit fec9776def
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
2 changed files with 31 additions and 30 deletions

View File

@ -85,7 +85,7 @@ steps:
commands: commands:
- curl -sL https://git.io/goreleaser > goreleaser - curl -sL https://git.io/goreleaser > goreleaser
- chmod +x goreleaser - chmod +x goreleaser
- ./scripts/version.sh ./goreleaser --snapshot --skip-publish --rm-dist - ./scripts/version.sh ./goreleaser --snapshot --skip-publish --clean
- wget https://builds.hrfee.pw/upload.py - wget https://builds.hrfee.pw/upload.py
- pip3 install requests - pip3 install requests
- bash -c 'sftp -i /id_rsa2 -o StrictHostKeyChecking=no root@161.97.102.153:/mnt/redoc <<< $"put docs/swagger.json jfa-go.json"' - bash -c 'sftp -i /id_rsa2 -o StrictHostKeyChecking=no root@161.97.102.153:/mnt/redoc <<< $"put docs/swagger.json jfa-go.json"'
@ -163,7 +163,7 @@ steps:
commands: commands:
- curl -sL https://git.io/goreleaser > goreleaser - curl -sL https://git.io/goreleaser > goreleaser
- chmod +x goreleaser - chmod +x goreleaser
- ./scripts/version.sh ./goreleaser --snapshot --skip-publish --rm-dist - ./scripts/version.sh ./goreleaser --snapshot --skip-publish --clean
trigger: trigger:
event: event:

View File

@ -8,11 +8,10 @@ before:
hooks: hooks:
- go mod download - go mod download
- rm -rf data/web - rm -rf data/web
- mkdir -p data - mkdir -p data/web/css
- cp -r static data/web - bash -c 'cp -r static/* data/web/'
- npm install - npm install
- npm install esbuild - npm install esbuild
- mkdir -p data/web/css
- cp node_modules/remixicon/fonts/remixicon.css node_modules/remixicon/fonts/remixicon.woff2 data/web/css/ - cp node_modules/remixicon/fonts/remixicon.css node_modules/remixicon/fonts/remixicon.woff2 data/web/css/
- cp -r html data/ - cp -r html data/
- node scripts/missing-colors.js html data/html - node scripts/missing-colors.js html data/html
@ -26,11 +25,13 @@ before:
- cp -r ts tempts - cp -r ts tempts
- scripts/dark-variant.sh tempts - scripts/dark-variant.sh tempts
- scripts/dark-variant.sh tempts/modules - scripts/dark-variant.sh tempts/modules
- npx esbuild --target=es6 --format=esm --bundle tempts/admin.ts --outfile=./data/web/js/admin.js --minify - mkdir -p data/web/js
- npx esbuild --target=es6 --format=esm --bundle tempts/pwr.ts --outfile=./data/web/js/pwr.js --minify - npx esbuild --target=es6 --bundle tempts/admin.ts --outfile=./data/web/js/admin.js --minify
- npx esbuild --target=es6 --format=esm --bundle tempts/form.ts --outfile=./data/web/js/form.js --minify - npx esbuild --target=es6 --bundle tempts/user.ts --outfile=./data/web/js/user.js --minify
- npx esbuild --target=es6 --format=esm --bundle tempts/setup.ts --outfile=./data/web/js/setup.js --minify - npx esbuild --target=es6 --bundle tempts/pwr.ts --outfile=./data/web/js/pwr.js --minify
- npx esbuild --target=es6 --format=esm --bundle tempts/crash.ts --outfile=./data/crash.js --minify - npx esbuild --target=es6 --bundle tempts/form.ts --outfile=./data/web/js/form.js --minify
- npx esbuild --target=es6 --bundle tempts/setup.ts --outfile=./data/web/js/setup.js --minify
- npx esbuild --target=es6 --bundle tempts/crash.ts --outfile=./data/crash.js --minify
- rm -r tempts - rm -r tempts
- npx esbuild --bundle css/base.css --outfile=./data/web/css/bundle.css --external:remixicon.css --minify - npx esbuild --bundle css/base.css --outfile=./data/web/css/bundle.css --external:remixicon.css --minify
- cp html/crash.html data/ - cp html/crash.html data/
@ -87,32 +88,32 @@ archives:
builds: builds:
- windows-tray - windows-tray
format: zip format: zip
name_template: "{{ .ProjectName }}_{{ .Version }}_TrayIcon_{{ .Os }}_{{ .Arch }}" name_template: >-
replacements: {{ .ProjectName }}_{{ .Version }}_TrayIcon_
darwin: macOS {{- if eq .Os "darwin" }}macOS
linux: Linux {{- else }}{{- title .Os }}{{ end }}_
windows: Windows {{- if eq .Arch "amd64" }}x86_64
amd64: x86_64 {{- else }}{{ .Arch }}{{ end }}
- id: linux-tray - id: linux-tray
builds: builds:
- linux-tray - linux-tray
format: zip format: zip
name_template: "{{ .ProjectName }}_{{ .Version }}_TrayIcon_{{ .Os }}_{{ .Arch }}" name_template: >-
replacements: {{ .ProjectName }}_{{ .Version }}_TrayIcon_
darwin: macOS {{- if eq .Os "darwin" }}macOS
linux: Linux {{- else }}{{- title .Os }}{{ end }}_
windows: Windows {{- if eq .Arch "amd64" }}x86_64
amd64: x86_64 {{- else }}{{ .Arch }}{{ end }}
- id: notray - id: notray
builds: builds:
- notray - notray
format: zip format: zip
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" name_template: >-
replacements: {{ .ProjectName }}_{{ .Version }}_
darwin: macOS {{- if eq .Os "darwin" }}macOS
linux: Linux {{- else }}{{- title .Os }}{{ end }}_
windows: Windows {{- if eq .Arch "amd64" }}x86_64
amd64: x86_64 {{- else }}{{ .Arch }}{{ end }}
checksum: checksum:
name_template: 'checksums.txt' name_template: 'checksums.txt'
snapshot: snapshot:
@ -167,10 +168,10 @@ nfpms:
replaces: replaces:
- jfa-go - jfa-go
dependencies: dependencies:
- libappindicator3-1 - libayatana-appindicator
rpm: rpm:
dependencies: dependencies:
- libappindicator-gtk3 - libappindicator-gtk3
apk: apk:
dependencies: dependencies:
- libappindicator - libayatana-appindicator