1
0
mirror of https://github.com/stryan/mumble-discord-bridge.git synced 2024-11-22 21:35:44 -05:00

chore: abandon goreleaser docker build

This commit is contained in:
Tyler Stiene 2021-12-15 00:55:21 -05:00
parent 23a4b6fa66
commit 4b941100fc
3 changed files with 37 additions and 23 deletions

3
.gitignore vendored
View File

@ -8,4 +8,5 @@ cert.pem
*.gob *.gob
docker-compose.yml docker-compose.yml
mdb-local mdb-local
LICENSES LICENSES
LICENSES.zip

View File

@ -19,22 +19,24 @@ builds:
# - darwin # - darwin
goarch: goarch:
- amd64 - amd64
dockers: # dockers:
- image_templates: # - goos: linux
- "ghcr.io/stieneee/mumble-discord-bridge:latest" # goarch: amd64
- "ghcr.io/stieneee/mumble-discord-bridge:{{ .Tag }}" # image_templates:
- "stieneee/mumble-discord-bridge:latest" # - "ghcr.io/stieneee/mumble-discord-bridge:latest"
- "stieneee/mumble-discord-bridge:{{ .Tag }}" # - "ghcr.io/stieneee/mumble-discord-bridge:{{ .Tag }}"
skip_push: "false" # - "stieneee/mumble-discord-bridge:latest"
dockerfile: Dockerfile # - "stieneee/mumble-discord-bridge:{{ .Tag }}"
use: docker # skip_push: "false"
build_flag_templates: # dockerfile: Dockerfile
- "--pull" # use: docker
- "--label=org.opencontainers.image.created={{.Date}}" # build_flag_templates:
- "--label=org.opencontainers.image.title={{.ProjectName}}" # - "--pull"
- "--label=org.opencontainers.image.revision={{.FullCommit}}" # - "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.version={{.Version}}" # - "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--platform=linux/arm64" # - "--label=org.opencontainers.image.revision={{.FullCommit}}"
# - "--label=org.opencontainers.image.version={{.Version}}"
# - "--platform=linux/amd64"
# push_flags: # push_flags:
# - --tls-verify=false # - --tls-verify=false
# extra_files: # extra_files:
@ -47,7 +49,7 @@ snapshot:
name_template: "{{ .Tag }}-next" name_template: "{{ .Tag }}-next"
release: release:
extra_files: extra_files:
- glob: "./LICENSES/*" - glob: "./LICENSES.zip"
changelog: changelog:
sort: asc sort: asc
filters: filters:

View File

@ -1,10 +1,13 @@
GOFILES=$(shell find ./ -type f -name '*.go') GOFILES=$(shell find ./ -type f -name '*.go')
LATEST_TAG=$(shell git describe --tags `git rev-list --tags --max-count=1`)
mumble-discord-bridge: $(GOFILES) .goreleaser.yml mumble-discord-bridge: $(GOFILES) .goreleaser.yml
goreleaser build --skip-validate --rm-dist --single-target --auto-snapshot goreleaser build --skip-validate --rm-dist --single-target --auto-snapshot
release: release:
go-licenses save ./cmd/mumble-discord-bridge --force --save_path="./LICENSES" rm -rf LICENSES.zip LICENSES
go-licenses save ./cmd/mumble-discord-bridge --save_path="./LICENSES"
zip -r -9 LICENSES.zip ./LICENSES
goreleaser release --rm-dist goreleaser release --rm-dist
dev: $(GOFILES) .goreleaser.yml dev: $(GOFILES) .goreleaser.yml
@ -23,16 +26,24 @@ test-chart:
psrecord --plot docs/test-cpu-memory.png $$(pidof mumble-discord-bridge.test) psrecord --plot docs/test-cpu-memory.png $$(pidof mumble-discord-bridge.test)
docker-latest: docker-latest:
docker build -t stieneee/mumble-discord-bridge:latest . docker build -t stieneee/mumble-discord-bridge:latest -t stieneee/mumble-discord-bridge:$(LATEST_TAG) -t ghcr.io/stieneee/mumble-discord-bridge:latest -t ghcr.io/stieneee/mumble-discord-bridge:$(LATEST_TAG) .
docker-latest-run: docker-latest-run:
docker run --env-file .env -it stieneee/mumble-discord-bridge:latest docker run --env-file .env -it stieneee/mumble-discord-bridge:latest
docker-release:
docker push stieneee/mumble-discord-bridge:latest
docker push stieneee/mumble-discord-bridge:$(LATEST_TAG)
docker push ghcr.io/stieneee/mumble-discord-bridge:latest
docker push ghcr.io/stieneee/mumble-discord-bridge:$(LATEST_TAG)
docker-next: docker-next:
docker build -t stieneee/mumble-discord-bridge:next . docker build -t stieneee/mumble-discord-bridge:next -t ghcr.io/stieneee/mumble-discord-bridge:next .
docker push stieneee/mumble-discord-bridge:next docker push stieneee/mumble-discord-bridge:next
docker push ghcr.io/stieneee/mumble-discord-bridge:next
clean: clean:
rm -f mumble-discord-bridge rm -rf dist
rm -rf LICENSES.zip LICENSES
.PHONY: release docker-latest docker-latest-push clean .PHONY: release dev dev-profile dev-race test-chart docker-latest docker-latest-release docker-release docker-next clean