Commit 0f3c9167 authored by Waqas Riaz's avatar Waqas Riaz

added versioning

parent bfde5dc5
Pipeline #4033 failed
stages:
- increment_version
- build
- deploy
increment_version:
stage: version
script:
- git pull
- ./increment-version.sh
- git add VERSION
- git commit -m "Bump version to $(cat VERSION)"
- git push
build_job:
stage: build
before_script:
......
#!/bin/bash
# Read the current version number from the VERSION file
VERSION=$(cat VERSION)
# Increment the version number
NEW_VERSION=$(echo $VERSION | awk -F. '{$NF = $NF + 1;} 1' OFS=. | sed 's/.$//')
# Update the VERSION file with the new version number
echo $NEW_VERSION > VERSION
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment