Make sure that the build version suffix is not a number

This commit is contained in:
Daan Boerlage 2021-01-24 22:20:59 +01:00
parent 0434335239
commit 4fd62e9184
Signed by: daan
GPG key ID: FCE070E1E4956606
2 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@ stages:
- ops - ops
variables: variables:
VERSION: 4.3.0-$CI_COMMIT_SHORT_SHA VERSION: 4.3.0-V$CI_COMMIT_SHORT_SHA
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
Build: Build:
@ -18,7 +18,7 @@ Build:
script: script:
- dotnet restore - dotnet restore
- dotnet test tests - dotnet test tests
- dotnet publish --version-suffix $VERSION -r linux-x64 -c Release -o ./app ./src/Bot/ - dotnet publish --version-suffix "$VERSION" -r linux-x64 -c Release -o ./app ./src/Bot/
Package: Package:
stage: docker stage: docker

View file

@ -7,7 +7,7 @@
<VersionSuffix>$(VersionSuffix)</VersionSuffix> <VersionSuffix>$(VersionSuffix)</VersionSuffix>
<RootNamespace>Geekbot.Bot</RootNamespace> <RootNamespace>Geekbot.Bot</RootNamespace>
<AssemblyName>Geekbot</AssemblyName> <AssemblyName>Geekbot</AssemblyName>
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix)</Version> <Version Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix)</Version>
<Version Condition=" '$(VersionSuffix)' == '' ">0.0.0-DEV</Version> <Version Condition=" '$(VersionSuffix)' == '' ">0.0.0-DEV</Version>
<Company>Pizza and Coffee Studios</Company> <Company>Pizza and Coffee Studios</Company>
<Authors>Pizza and Coffee Studios</Authors> <Authors>Pizza and Coffee Studios</Authors>