Phase 0: remove auto-updater, pin Go 1.27.1, fix vet warnings, tidy ignores
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/push Build encountered an error
- Delete BinaryUpdate, internal/up2date, GitHub/Update structs and the xteveAutoUpdate / update.url settings (UI rows, en.json, defaults). Settings-schema migrations kept and moved to src/migrate.go. - Drop kardianos/osext dependency. - xteve.go version 0200 -> 0201 to match changelog; Drone now fails on drift. - go.mod go 1.27.1; Dockerfile and Drone golang images pinned to 1.27.1. - Fix four go vet unreachable-code warnings. - .gitignore: .gocache/, agent.md, skill.md. .dockerignore: build context no longer includes caches, ts/, tasks/ or markdown except the changelog. - Drone: publish :latest only from master; other branches publish a branch-named tag so a feature push cannot replace the deployed image. - Add tasks/improvement-plan.md and tasks/todo.md. - Regenerate src/webUI.go.
This commit is contained in:
+34
-2
@@ -4,16 +4,18 @@ name: default
|
||||
|
||||
steps:
|
||||
- name: go-test
|
||||
image: cache.coadcorp.com/library/golang
|
||||
image: cache.coadcorp.com/library/golang:1.27.1
|
||||
commands:
|
||||
- go mod download
|
||||
- go test ./...
|
||||
|
||||
- name: go-build
|
||||
image: cache.coadcorp.com/library/golang
|
||||
image: cache.coadcorp.com/library/golang:1.27.1
|
||||
commands:
|
||||
- XTEVE_VERSION="$(grep -m1 '^#### ' changelog-beta.md | cut -d' ' -f2 | sed 's/-beta$//')"
|
||||
- test -n "$XTEVE_VERSION" || (echo "Could not parse version from changelog-beta.md" && exit 1)
|
||||
- SRC_VERSION="$(grep -m1 '^var Version = ' xteve.go | cut -d'"' -f2)"
|
||||
- test "$SRC_VERSION" = "$XTEVE_VERSION" || (echo "Version drift: xteve.go has $SRC_VERSION, changelog-beta.md has $XTEVE_VERSION" && exit 1)
|
||||
- echo "Building xTeVe version $XTEVE_VERSION from changelog-beta.md"
|
||||
- go build -v -ldflags "-X main.Version=$XTEVE_VERSION" ./...
|
||||
|
||||
@@ -61,3 +63,33 @@ steps:
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
branch:
|
||||
- master
|
||||
|
||||
- name: docker-publish-branch
|
||||
image: plugins/docker
|
||||
environment:
|
||||
XTEVE_UID: "1000"
|
||||
XTEVE_GID: "1000"
|
||||
settings:
|
||||
registry: registry.coadcorp.com
|
||||
repo: registry.coadcorp.com/nathan/xteve
|
||||
dockerfile: Dockerfile
|
||||
username: nathan
|
||||
password:
|
||||
from_secret: registry_password
|
||||
tags:
|
||||
- ${DRONE_BRANCH}
|
||||
- ${DRONE_COMMIT_SHA}
|
||||
build_args:
|
||||
- TARGETOS=linux
|
||||
- TARGETARCH=amd64
|
||||
build_args_from_env:
|
||||
- XTEVE_UID
|
||||
- XTEVE_GID
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
branch:
|
||||
exclude:
|
||||
- master
|
||||
|
||||
Reference in New Issue
Block a user