Staging workflow should add the commit hash built on to the version string #286
Labels
No labels
blocked
duplicate
high priority
needs
approval
needs
criteria
needs
estimate
needs
tests
question
step
doing
step
review
step
testing
step
todo
step
uat
type
admin
type
alert
type
bug
type
change
type
defect
type
dependencies
type
development
type
documentation
type
epic
type
idea
type
incident
type
investigation
type
spike
type
story
type
tests
won't fix
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
RabbitLabs/random-bunny#286
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
When the Forgejo Stage workflow packages a staging build, the version string written to
src/constants/Version.tsshould include the commit that was built, not only the branch/ref name.Background
Today the
packagejob in.forgejo/workflows/staging.ymlsets:So two builds from the same branch (e.g.
release/2.5.0) are indistinguishable in the built binary's version constant.Desired example:
release/2.5.0 (8d018549d8).Acceptance Criteria
AS a maintainer debugging a staged build
GIVEN the Stage workflow
packagejob runs for a push todevelop,release/*, orhotfix/*WHEN it generates
src/constants/Version.tsTHEN the default export is
{ref_name} ({short_sha}), whereref_nameis the triggering ref (e.g.release/2.5.0) andshort_shais the first 10 characters of the commit SHA checked out for that runAS a maintainer comparing staged artifacts
GIVEN two consecutive pushes to the same release branch produce two Stage workflow runs
WHEN I inspect the version constant (or the user-facing version derived from it) in each artifact
THEN the version strings differ in the parenthetical commit hash portion
AS a release owner
GIVEN a production build is produced via the publish workflow
WHEN versioning is applied
THEN behavior is unchanged from today (this issue does not alter production semver tagging)
Scope
.forgejo/workflows/staging.ymlonlyOut of scope
package.jsonNotes
vprefix added by this change