Update 2 files
- /scripts/version-number.sh - /templates/build-container.tpl.yml
This commit is contained in:
@@ -1,9 +1,35 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#%%MULTILINE_YAML_START
|
||||||
|
#Check for configuration
|
||||||
|
echo "mode: ContinuousDeployment
|
||||||
|
continuous-delivery-fallback-tag: ''
|
||||||
|
branches:
|
||||||
|
master:
|
||||||
|
mode: ContinuousDeployment
|
||||||
|
tag: 'dev'
|
||||||
|
increment: Minor
|
||||||
|
track-merge-target: true
|
||||||
|
tracks-release-branches: true
|
||||||
|
is-release-branch: false
|
||||||
|
prevent-increment-of-merged-branch-version: false
|
||||||
|
release:
|
||||||
|
regex: release?[/]
|
||||||
|
mode: ContinuousDeployment
|
||||||
|
increment: Patch
|
||||||
|
tag: ''
|
||||||
|
is-release-branch: true
|
||||||
|
prevent-increment-of-merged-branch-version: true
|
||||||
|
feature:
|
||||||
|
regex: feature?[/]
|
||||||
|
mode: ContinuousDeployment
|
||||||
|
increment: Inherit
|
||||||
|
tag: 'alpha'
|
||||||
|
is-release-branch: false
|
||||||
|
prevent-increment-of-merged-branch-version: true
|
||||||
|
ignore:
|
||||||
|
sha: []
|
||||||
|
" > GitVersion.yml
|
||||||
|
|
||||||
if [ -z "$VERSION" ]; then
|
version=$(/tools/dotnet-gitversion /showvariable NuGetVersionV2)
|
||||||
VERSION="1"
|
echo "VERSION=$version" >> version.env
|
||||||
fi
|
|
||||||
export COMMIT_COUNT=$(git rev-list --count HEAD)
|
|
||||||
export BUILD_NUMBER=$CI_PIPELINE_ID
|
|
||||||
export VERSION="$VERSION.$COMMIT_COUNT.$BUILD_NUMBER"
|
|
||||||
echo "VERSION=$VERSION" > version.env
|
|
||||||
cat version.env
|
cat version.env
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ stages:
|
|||||||
- build
|
- build
|
||||||
|
|
||||||
version:
|
version:
|
||||||
image: registry.durp.info/ruby:latest
|
image: gittools/gitversion:5.12.0
|
||||||
stage: versioning
|
stage: versioning
|
||||||
script:
|
script:
|
||||||
- ./scripts/version-number.sh
|
- ./scripts/version-number.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user