public static class AssemblyInfo{ public const string CommitHash = "9cfd23c0"; public const string CommitBranch = "dev";}
public static class AssemblyInfo{ public const string CommitHash = "${CI_COMMIT_SHORT_SHA}"; public const string CommitBranch = "${CI_COMMIT_BRANCH}";}
envsubst < PWProfiler/AssemblyInfo.cs | sponge PWProfiler/AssemblyInfo.cs
image: redforce04/discordbot:netdataslbuilder stages: - build variables: OBJECTS_DIRECTORY: 'obj' NUGET_PACKAGES_DIRECTORY: '.nuget' SOURCE_CODE_PATH: '*/' cache: key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG" paths: - '$SOURCE_CODE_PATH$OBJECTS_DIRECTORY/project.assets.json' - '$SOURCE_CODE_PATH$OBJECTS_DIRECTORY/*.csproj.nuget.*' - '$NUGET_PACKAGES_DIRECTORY' policy: pull-push before_script: - 'dotnet restore --packages $NUGET_PACKAGES_DIRECTORY' build: stage: build script: - 'envsubst < PWProfiler/AssemblyInfo.cs | sponge PWProfiler/AssemblyInfo.cs' - 'dotnet publish -c Release --no-restore' - 'mv PWProfiler/bin/Debug/PWProfiler.dll PWProfiler.dll' artifacts: name: "Build Results" paths: - PWProfiler.dll