try auto tagging again
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-02-02 10:59:11 +11:00
parent 80286da166
commit e5f5934eb6
2 changed files with 24 additions and 26 deletions

View File

@@ -3,36 +3,30 @@ type: docker
name: build name: build
steps: steps:
- name: compute-release-version - name: semver
image: cedrichopf/drone-semver
settings:
file: CHANGELOG.md
autoincrement: true
- name: set-release-version
image: alpine:3.19 image: alpine:3.19
environment: depends_on:
GITEA_TOKEN: - semver
from_secret: GITEA_TOKEN
GITEA_BASE_URL: https://git.coadcorp.com
commands: commands:
- apk add --no-cache curl jq
- | - |
set -euo pipefail set -eu
repo_owner="$${DRONE_REPO_OWNER}" release_tag="$(sed -n 's/^##[[:space:]]*v\\([0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\).*/v\\1/p' CHANGELOG.md | head -n1)"
repo_name="$${DRONE_REPO_NAME}" if [ -z "$release_tag" ]; then
releases_url="$${GITEA_BASE_URL}/api/v1/repos/$${repo_owner}/$${repo_name}/releases?limit=1" echo "Failed to read release version from CHANGELOG.md"
latest_tag="$$(curl -sf -H "Authorization: token $${GITEA_TOKEN}" "$${releases_url}" | jq -r '.[0].tag_name // empty')" exit 1
if [ -z "$${latest_tag}" ] || [ "$${latest_tag}" = "null" ]; then
latest_tag="v0.0.0"
fi fi
version="$${latest_tag#v}" echo "$release_tag" > .release_version
IFS='.' read -r major minor patch <<< "$${version}" echo "Release version: $release_tag"
if ! [[ "$${major:-}" =~ ^[0-9]+$ ]]; then major=0; fi
if ! [[ "$${minor:-}" =~ ^[0-9]+$ ]]; then minor=0; fi
if ! [[ "$${patch:-}" =~ ^[0-9]+$ ]]; then patch=0; fi
patch=$((patch + 1))
next_tag="v$${major}.$${minor}.$${patch}"
echo "$${next_tag}" > .release_version
echo "Next release: $${next_tag}"
- name: build-deb-amd64 - name: build-deb-amd64
image: cache.coadcorp.com/library/buildpack-deps:jammy image: cache.coadcorp.com/library/buildpack-deps:jammy
depends_on: depends_on:
- compute-release-version - set-release-version
environment: environment:
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
commands: commands:
@@ -44,7 +38,7 @@ steps:
- name: build-deb-armhf - name: build-deb-armhf
image: cache.coadcorp.com/library/buildpack-deps:bullseye image: cache.coadcorp.com/library/buildpack-deps:bullseye
depends_on: depends_on:
- compute-release-version - set-release-version
environment: environment:
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
ARM_CFLAGS: -march=armv6 -mfpu=vfp -mfloat-abi=hard -marm ARM_CFLAGS: -march=armv6 -mfpu=vfp -mfloat-abi=hard -marm
@@ -67,7 +61,7 @@ steps:
- name: build-deb-arm64 - name: build-deb-arm64
image: cache.coadcorp.com/library/buildpack-deps:bullseye image: cache.coadcorp.com/library/buildpack-deps:bullseye
depends_on: depends_on:
- compute-release-version - set-release-version
environment: environment:
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
ARM64_CFLAGS: -march=armv8-a ARM64_CFLAGS: -march=armv8-a
@@ -119,7 +113,7 @@ steps:
commands: commands:
- apk add --no-cache curl jq - apk add --no-cache curl jq
- | - |
set -euo pipefail set -eu
release_tag="$$(cat .release_version)" release_tag="$$(cat .release_version)"
repo_owner="$${DRONE_REPO_OWNER}" repo_owner="$${DRONE_REPO_OWNER}"
repo_name="$${DRONE_REPO_NAME}" repo_name="$${DRONE_REPO_NAME}"

4
CHANGELOG.md Normal file
View File

@@ -0,0 +1,4 @@
# Changelog
## v0.0.9 - 2026-02-01
- Fix sidecar handling