Add publishing scripts and release assets
- Add publish.ps1 and build-release.ps1 for publishing to Gitea - Add dockmv logo assets (full, small, very small variants) - Update Makefile with publish and publish-binaries targets - Support PowerShell-based release pipeline with Gitea integration Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,15 +3,23 @@ LDFLAGS := -s -w -X main.version=$(VERSION)
|
||||
BIN := docker-migrate
|
||||
OUT := dist
|
||||
|
||||
.PHONY: all ui build run test vet fmt docker clean release help
|
||||
# PowerShell 7+. The publish path lives in scripts/*.ps1 because uploading a
|
||||
# Gitea release asset needs an HTTP client, not a shell loop.
|
||||
PWSH ?= pwsh
|
||||
# Extra flags forwarded to publish.ps1, e.g. `make publish ARGS=-Force`.
|
||||
ARGS ?=
|
||||
|
||||
.PHONY: all ui build run test vet fmt docker clean release publish publish-binaries help
|
||||
|
||||
help:
|
||||
@echo "make ui build the web interface into internal/webui/dist"
|
||||
@echo "make build build the binary for this platform (implies ui)"
|
||||
@echo "make run build and start the server on 127.0.0.1:8080"
|
||||
@echo "make test run the Go tests"
|
||||
@echo "make docker build the container image"
|
||||
@echo "make release cross-compile linux/amd64, linux/arm64, darwin/arm64, windows/amd64"
|
||||
@echo "make ui build the web interface into internal/webui/dist"
|
||||
@echo "make build build the binary for this platform (implies ui)"
|
||||
@echo "make run build and start the server on 127.0.0.1:8080"
|
||||
@echo "make test run the Go tests"
|
||||
@echo "make docker build the container image"
|
||||
@echo "make release cross-compile linux/amd64, linux/arm64, darwin/arm64, windows/amd64"
|
||||
@echo "make publish push the image to git.azuze.fr and attach binaries to the release"
|
||||
@echo "make publish-binaries binaries only: no docker build, login or push"
|
||||
|
||||
all: build
|
||||
|
||||
@@ -52,6 +60,16 @@ release: ui
|
||||
done
|
||||
@ls -lh $(OUT)
|
||||
|
||||
# Needs GITEA_USER + GITEA_TOKEN in the environment, or it prompts. The token
|
||||
# needs package read/write for the push and write:repository for the release.
|
||||
publish:
|
||||
$(PWSH) -NoProfile -ExecutionPolicy Bypass -File scripts/publish.ps1 \
|
||||
-Tag $(VERSION) -PublishRelease $(ARGS)
|
||||
|
||||
publish-binaries:
|
||||
$(PWSH) -NoProfile -ExecutionPolicy Bypass -File scripts/publish.ps1 \
|
||||
-Tag $(VERSION) -BinariesOnly $(ARGS)
|
||||
|
||||
clean:
|
||||
rm -rf $(BIN) $(BIN).exe $(OUT) internal/webui/dist/assets
|
||||
rm -rf web/node_modules
|
||||
|
||||
Reference in New Issue
Block a user