Goreleaser (#241)

* add goreleaser tooling

* add files + hook

* update hooks

* allow passing build-dir using cli args

* build tweaks

* tweak more

* update drone and goreleaser

* chill out tests

* remove postgres

* docker push on snapshot

* update releaser
This commit is contained in:
tobi 2021-09-24 13:14:20 +02:00 committed by GitHub
commit d515c9f1ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 253 additions and 136 deletions

View file

@ -2,8 +2,8 @@
set -eu
COMMIT=$(git rev-list -1 HEAD)
VERSION=$(cat ./version)
COMMIT="${COMMIT:-12345678}"
VERSION="${VERSION:-0.0.0}"
CGO_ENABLED=0 go build -trimpath \
-tags 'netgo osusergo static_build' \

View file

@ -1,7 +0,0 @@
#!/bin/bash
set -eu
BRANCH_NAME="$(git rev-parse --abbrev-ref HEAD)"
docker build -t "superseriousbusiness/gotosocial:${BRANCH_NAME}" .

View file

@ -1,7 +0,0 @@
#!/bin/bash
set -e
BRANCH_NAME="$(git rev-parse --abbrev-ref HEAD)"
docker push "superseriousbusiness/gotosocial:${BRANCH_NAME}"

View file

@ -1,9 +0,0 @@
#!/bin/bash
set -eu
SWAGGER_FILE="docs/api/swagger.yaml"
GTS_VERSION="$(cat version)"
swagger generate spec -o "${SWAGGER_FILE}" --scan-models
sed -i "s/REPLACE_ME/${GTS_VERSION}/" "${SWAGGER_FILE}"