I have a project where the versions are updated via javascripts semvar library. These versions are then checked into code as well as having the tags for the sematic releases applied in github.
My problem is that this creates redundant workflows and releases. So suppose I merge a commit into a deployment branch. The folllowing will happen:
- tests run
- semvar updates versions and creates a git commit “task(release): ”
- build phase clones the repo and runs a build for the same commit prior to version update. Call this build A.
- the git commit from phase two triggers a test/build workflow with the version updates. Call this build B.
Build B is the correct build, since it has the incremented versions. Build A is incorrect since it doesn’t. The problem is I cant figure out a way to not run build A short of adding [no ci] in every commit, which is very irritating. The other very irritating option would be to run some shell commands prior to every other command to validate the git commit message matches a release spec - also a non starter.
My current solve for this is just to run redundant builds and have the subsequent build overwrite the prior one. The problem with this is that it creates a time window where the release version numbers are incorrect - which causes problems if the app tries to auto update in that timeframe.
I’m using GitHub, so I cant use GitLab’s extensive parameter set to match the commit messages.