From 0fbdf67f5264101e22006c970f2892978a65e050 Mon Sep 17 00:00:00 2001 From: Tobias <5702338+T0biii@users.noreply.github.com> Date: Tue, 29 Oct 2024 22:37:32 +0100 Subject: [PATCH] ci,make: Add Build_NUMBER, CI ID or PR ID (#506) (cherry picked from commit 4243107d9628dfdd3624a1121bf0575c368bf8c6) --- .github/workflows/firmware.yml | 2 +- Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/firmware.yml b/.github/workflows/firmware.yml index 4a50782..adf9c2d 100644 --- a/.github/workflows/firmware.yml +++ b/.github/workflows/firmware.yml @@ -58,7 +58,7 @@ jobs: id: compile run: | git checkout -b patched ${GITHUB_SHA} - make BROKEN=1 GLUON_TARGETS=${{ matrix.target }} V=s + make BROKEN=1 GLUON_TARGETS=${{ matrix.target }} BUILD_NUMBER=${{ github.event.pull_request.number && format('pr{0}', github.event.pull_request.number) || github.run_id && format('run{0}', github.run_id) }} V=s echo "status=success" >> $GITHUB_OUTPUT - name: Upload firmware ${{ matrix.target }} uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 diff --git a/Makefile b/Makefile index 89b095f..7403ebf 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,8 @@ ifneq (,$(shell git describe --exact-match --tags 2>/dev/null)) else GLUON_AUTOUPDATER_BRANCH := next EXP_FALLBACK = $(shell date '+%Y%m%d') - BUILD_NUMBER ?= $(EXP_FALLBACK) - GLUON_RELEASE := $(shell git describe --tags)~exp$(BUILD_NUMBER) + BUILD_NUMBER ?= exp$(EXP_FALLBACK) + GLUON_RELEASE := $(shell git describe --tags)~$(BUILD_NUMBER) endif JOBS ?= $(shell nproc)