From 1d47b9074f4823623860c58a05e16fbf07b29e70 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Sun, 16 May 2021 22:44:04 +0100 Subject: [PATCH] change notray/tray naming, add deb/rpm/apk Since Tray support requires dependencies, it won't be the default for releases. deb/rpm/apk support may be broken still. --- .drone.yml | 3 ++- .goreleaser.yml | 55 +++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 53 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index d671efe..e54752c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -20,6 +20,7 @@ steps: - apt-get install build-essential python3-pip curl software-properties-common sed upx gcc libgtk-3-dev libappindicator3-dev gcc-mingw-w64-x86-64 -y - (curl -sL https://deb.nodesource.com/setup_14.x | bash -) - apt-get install nodejs + - curl -sL https://git.io/goreleaser > ../goreleaser - chmod +x ../goreleaser - ./scripts/version.sh ../goreleaser @@ -82,7 +83,7 @@ steps: - ./scripts/version.sh ./goreleaser --snapshot --skip-publish --rm-dist - wget https://builds.hrfee.pw/upload.py - pip3 install requests - - bash -c 'python3 upload.py https://builds.hrfee.pw hrfee jfa-go --upload ./dist/*.zip --tag internal-git=true' + - bash -c 'python3 upload.py https://builds.hrfee.pw hrfee jfa-go --upload ./dist/*.zip ./dist/*.deb ./dist/*.rpm ./dist/*.apk --tag internal-git=true' environment: BUILDRONE_KEY: from_secret: BUILDRONE_KEY diff --git a/.goreleaser.yml b/.goreleaser.yml index e365edb..db8c1d9 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -40,6 +40,7 @@ builds: goarch: - arm - arm64 + - amd64 - id: windows-tray dir: ./ env: @@ -71,7 +72,7 @@ archives: builds: - windows-tray format: zip - name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + name_template: "{{ .ProjectName }}_{{ .Version }}_TrayIcon_{{ .Os }}_{{ .Arch }}" replacements: darwin: macOS linux: Linux @@ -81,7 +82,7 @@ archives: builds: - linux-tray format: zip - name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + name_template: "{{ .ProjectName }}_{{ .Version }}_TrayIcon_{{ .Os }}_{{ .Arch }}" replacements: darwin: macOS linux: Linux @@ -91,7 +92,7 @@ archives: builds: - notray format: zip - name_template: "{{ .ProjectName }}_{{ .Version }}_noTrayIcon_{{ .Os }}_{{ .Arch }}" + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" replacements: darwin: macOS linux: Linux @@ -100,10 +101,56 @@ archives: checksum: name_template: 'checksums.txt' snapshot: - name_template: "git-{{.ShortCommit}}" + name_template: "0.0.0-{{.ShortCommit}}" changelog: sort: asc filters: exclude: - '^docs:' - '^test:' +nfpms: + - id: notray + file_name_template: '{{ .ProjectName }}_{{ .Arch }}_v{{ .Version }}' + homepage: https://github.com/hrfee/jfa-go + description: A web app for managing users on Jellyfin + maintainer: Harvey Tindall + license: MIT + vendor: hrfee.dev + version_metadata: git + builds: + - notray + contents: + - src: ./LICENSE + dst: /usr/share/licenses/jfa-go + formats: + - apk + - deb + - rpm + - id: tray + file_name_template: '{{ .ProjectName }}_Tray_{{ .Arch }}_v{{ .Version }}' + homepage: https://github.com/hrfee/jfa-go + description: A web app for managing users on Jellyfin + maintainer: Harvey Tindall + license: MIT + vendor: hrfee.dev + version_metadata: git + builds: + - linux-tray + contents: + - src: ./LICENSE + dst: /usr/share/licenses/jfa-go + formats: + - apk + - deb + - rpm + overrides: + deb: + dependencies: + - libappindicator3-1 + rpm: + dependencies: + - libappindicator-gtk3 + apk: + dependencies: + - libappindicator +