fix: use git rev-parse for short SHA in build-dev
$GITEA_SHA is unset on Gitea runners — the nav showed "dev-" with an empty SHA. git rev-parse --short HEAD works regardless of runner env vars. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -156,4 +156,11 @@ describe('CI workflow regressions', () => {
|
||||
// BUILD_VERSION was never passed to docker build.
|
||||
expect(ciYml).toContain('BUILD_VERSION')
|
||||
})
|
||||
|
||||
it('short SHA is computed with git rev-parse, not $GITEA_SHA (which is empty)', () => {
|
||||
// Regression: ${GITEA_SHA::7} expands to "" on Gitea runners — nav showed "dev-".
|
||||
// git rev-parse --short HEAD works regardless of which env vars the runner sets.
|
||||
expect(ciYml).toContain('git rev-parse --short HEAD')
|
||||
expect(ciYml).not.toContain('GITEA_SHA')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user