Better version checking / publishing in pipeline
Gitlab merges to master should always have a different version number, because gitlab attempts to publish an artifact right after merging to master.
We can make a custom job in .gitlab-ci.yml
to check the version number and make sure it does not equal that in master.
A job with the following script might do the trick:
V_DEV=$(gradle properties | grep "version:")
git checkout -f master && git pull
V_MAS=$(gradle properties | grep "version:")
[ "$V_DEV" != "$V_MAS" ]
- Check version from dev to master (needs to increase)
- Automatically add 'SNAPSHOT' to the dev version
- Check version from branch to dev (needs to increase)
Edited by Ruben Backx