chore: simplify setting of version for the app
this removes the go generate way of generating the pkg/config/version.go file and uses build time ld flags to set the version when building from git or uses .gitattributes to set it during git archive
also addresses https://0xacab.org/leap/infrastructure/-/issues/19
Merge request reports
Activity
added 1 commit
- 07baf1e0 - chore: add golangci-lint config and make target to run linter
added 1 commit
- faf25bb1 - chore: add golangci-lint config and make target to run linter
mentioned in merge request obfsvpn!38 (merged)
added 4 commits
Toggle commit listchanged milestone to %2024.06 LEAP VPN Release
added 53 commits
-
9c1727dd...3210d042 - 48 commits from branch
leap:main
- ab4582e3 - chore: simplify setting of version for the app
- 7e1513a4 - chore: add golangci-lint config and make target to run linter
- b5e6fe57 - chore: add lint stage to gitlabci that runs golangci-lint
- 8f88069b - chore: fix artifact upload of build stage in gitlab ci
- 3be53715 - chore: remove commented jobs from .gitlab-ci.yaml
Toggle commit list-
9c1727dd...3210d042 - 48 commits from branch
requested review from @peanut2
added 6 commits
-
d52c5286 - 1 commit from branch
leap:main
- 67be8365 - chore: simplify setting of version for the app
- e7c6adb5 - chore: add golangci-lint config and make target to run linter
- 5be6f1a8 - chore: add lint stage to gitlabci that runs golangci-lint
- 1ffc429f - chore: fix artifact upload of build stage in gitlab ci
- 91b99950 - chore: remove commented jobs from .gitlab-ci.yaml
Toggle commit list-
d52c5286 - 1 commit from branch
Looks good to me. I don't have a strong opinion on removing the commted tests in the CI.
I like the cleanup of how the versioning is done. I understand the
appVersion
mechanism, but I don't understand howgitArchiveVersion
is set. Can you explain it a bit and maybe update the comment?....so after googling a bit:
git archive
is called in the Makefile. And the .gitattributes tellsgit archive
to replace values inpkg/config/version/version.go
. But I couldn'd find docs about what gets replace (this syntax:$Format:%(describe)$
)I tried to build it and shows the "-g$commit" version in the UI, so it works for me.
BTW: what do you mean by chore?
Edited by Pea Nutgit archive
we use to create the source tarbll for building the debian package, so in the MakefileVERSION
is set to the o/pgit tag
, but when we have a source tarball made usinggit archive
it is not a git repository (missing.git
dir) so theVERSION
won't be set, for that we do this.gitattributes
magic to replace the string whengit archive
is called: https://git-scm.com/docs/gitattributes#_export_substthen in the
Version()
func we decide which value to use.. i'll add the git attributes link as a commentchore as in chores, i.e grunt work that needs to be done but doesn't alter functionality/behavior, (https://stackoverflow.com/questions/26944762/when-to-use-chore-as-type-of-commit-message)
added 5 commits
- 9126a9a3 - chore: simplify setting of version for the app
- 004fafef - chore: add golangci-lint config and make target to run linter
- cc54e80e - chore: add lint stage to gitlabci that runs golangci-lint
- 25b4c30b - chore: fix artifact upload of build stage in gitlab ci
- d76746d5 - chore: remove commented jobs from .gitlab-ci.yaml
Toggle commit listadded 54 commits
-
d76746d5...d52c5286 - 49 commits from branch
leap:main
- 5e92dac2 - chore: simplify setting of version for the app
- cdd981b0 - chore: add golangci-lint config and make target to run linter
- bb953145 - chore: add lint stage to gitlabci that runs golangci-lint
- e5bed17e - chore: fix artifact upload of build stage in gitlab ci
- 409ebadc - chore: remove commented jobs from .gitlab-ci.yaml
Toggle commit list-
d76746d5...d52c5286 - 49 commits from branch
enabled an automatic merge when the pipeline for 409ebadc succeeds
added 5 commits
- 50108c0c - chore: simplify setting of version for the app
- d1e30476 - chore: add golangci-lint config and make target to run linter
- 5fbfdc82 - chore: add lint stage to gitlabci that runs golangci-lint
- 42631e37 - chore: fix artifact upload of build stage in gitlab ci
- 6f863dcd - chore: remove commented jobs from .gitlab-ci.yaml
Toggle commit listenabled an automatic merge when the pipeline for c70427a1 succeeds