# HG changeset patch # User Sean E. Russell # Date 1629384395 18000 # Thu Aug 19 09:46:35 2021 -0500 # Node ID 896d2d664a2aecbfa7bf902d8d8172a1e726175e # Parent ddbca049d076b15b8d7a4bdb4c003772385ab375 Update build manifest diff --git a/.build.yml b/.build.yml --- a/.build.yml +++ b/.build.yml @@ -5,26 +5,45 @@ - gdk-pixbuf2 - glib2 - gnupg - - xz + - zstd sources: - https://hg.sr.ht/~ser/gocryptkeeper environment: PROJ: gocryptkeeper - BNAME: gocryptkeeper-latest + TARGETS: linux:amd64 secrets: - 45926939-38b0-4e7f-bfa5-1a5b5786a773 - d7d86c19-5b94-4c65-bf07-b8b30f55bd63 tasks: - build: | cd ${PROJ} - T=$(hg log -r "." --template "{latesttag}\n") - [[ $T == "" ]] && T=$(hg bookmark -l . --template '{bookmarks}-{node|short}\n') - go build -o ${BNAME} -ldflags="-X main.Version=$T -s -w" . + export VERSION=`hg log -r tip --template '{bookmarks}'` + [[ $VERSION == "" ]] && VERSION=dev + for T in ${TARGETS}; do + export GOOS=$(echo $T | cut -d: -f1) + export GOARCH=$(echo $T | cut -d: -f2) + export GOARM=$(echo $T | cut -d: -f3) + export ASSET=${PROJ}-${GOOS}-${GOARCH}${GOARM}-${VERSION} + [[ -z $GOARM ]] && unset GOARM + [[ $GOOS == "windows" ]] && ASSET=${ASSET}.exe + go build -ldflags "-X main.Version=${VERSION} -s -w" -v -o ${ASSET} ${SOURCE} + done - upload: | cd ${PROJ} - Z=${BNAME}.xz - S=${Z}.sig - xz ${BNAME} - gpg -b --local-user ECE3F91E646A3FAB5D4DED0F5E0D7ABD6668FDD1 ${Z} - curl --netrc-file ~/.downloads -T ${Z} https://downloads.ser1.net/files/ - curl --netrc-file ~/.downloads -T ${S} https://downloads.ser1.net/files/ + export VERSION=`hg log -r tip --template '{bookmarks}'` + [[ $VERSION == "" ]] && exit + export PROJURL="https://downloads.ser1.net/files/${PROJ}/" + [[ `curl --netrc-file ~/.downloads -X PROPFIND $PROJURL` == "Not Found" ]] && curl --netrc-file ~/.downloads -X MKCOL ${PROJURL} + for T in ${TARGETS}; do + export GOOS=$(echo $T | cut -d: -f1) + export GOARCH=$(echo $T | cut -d: -f2) + export ASSET=${PROJ}-${GOOS}-${GOARCH}-${VERSION} + export LATEST=${PROJ}-${GOOS}-${GOARCH}-latest + if [[ $GOOS == "windows" ]] && ASSET=${ASSET}.exe + zstd ${ASSET} + gpg -b --local-user ECE3F91E646A3FAB5D4DED0F5E0D7ABD6668FDD1 ${ASSET}.zst + curl --netrc-file ~/.downloads -T ${ASSET}.zst ${PROJURL} + curl --netrc-file ~/.downloads -T ${ASSET}.zst.sig ${PROJURL} + curl --netrc-file ~/.downloads -T ${ASSET}.zst ${PROJURL}${LATEST}.zst + curl --netrc-file ~/.downloads -T ${ASSET}.zst.sig ${PROJURL}${LATEST}.zst.sig + done diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [File bug reports here.](https://todo.sr.ht/~ser/gocryptkeeper) -[![gocryptkeeper build status](https://builds.sr.ht/~ser/gocryptkeeper.svg)](https://builds.sr.ht/~ser/gocryptkeeper?) +[![Build status](https://builds.sr.ht/~ser/gocryptkeeper/.build.yml.svg)](https://builds.sr.ht/~ser/gocryptkeeper/.build.yml?) ![](./screenshot.png) @@ -31,10 +31,10 @@ ``` There is an *extremely* YMMV -[binary available](https://downloads.ser1.net/gocryptkeeper-latest.xz). -It's XZ compressed, so you'll have to uncompress it with xz before +[binary available](https://downloads.ser1.net/gocryptkeeper/gocryptkeeper-latest.zst). +It's ZSTD compressed, so you'll have to uncompress it with `zstd -d` before using. There's a corresponding -[GPG signature](https://downloads.ser1.net/gocryptkeeper-latest.lz.sig), +[GPG signature](https://downloads.ser1.net/gocryptkeeper/gocryptkeeper-latest.zst.sig), signed with the key 7ABD6668FDD1, which you can find by key on public keyservers -- pgp.mit.edu, pgp.key-server.io, etc.