From 45fef11a67e7b752694f64dff30a1cb9771069f8 Mon Sep 17 00:00:00 2001 From: SpoinkyNL Date: Fri, 8 Jan 2021 18:48:28 +0100 Subject: [PATCH] Builds - Store build info as JSON for auto-update usage --- ci/azure-pipelines.yml | 13 ++++++++++++- src/Artemis.UI/Artemis.UI.csproj | 5 +++++ src/Artemis.UI/buildinfo.json | 6 ++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 src/Artemis.UI/buildinfo.json diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 1ed841620..667bd464e 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -12,7 +12,11 @@ pool: variables: artemisSolution: '**/Artemis.sln' NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages - + BuildId: $(Build.BuildId) + BuildNumber: $(Build.BuildNumber) + SourceBranch: $(Build.SourceBranch) + SourceVersion: $(Build.SourceVersion) + steps: - checkout: self path: s/Artemis @@ -53,6 +57,13 @@ steps: artifactName: 'Artemis build' targetPath: '$(Build.ArtifactStagingDirectory)/build' +- task: FileTransform@1 + displayName: 'Populate buildinfo.json' + inputs: + folderPath: '$(Build.ArtifactStagingDirectory)/build' + fileType: 'json' + targetFiles: '**/buildinfo.json' + - task: PublishPipelineArtifact@1 displayName: 'Upload build to Azure Pipelines' inputs: diff --git a/src/Artemis.UI/Artemis.UI.csproj b/src/Artemis.UI/Artemis.UI.csproj index e3951b13a..6e57854a1 100644 --- a/src/Artemis.UI/Artemis.UI.csproj +++ b/src/Artemis.UI/Artemis.UI.csproj @@ -319,6 +319,11 @@ Resources.resx + + + PreserveNewest + + Designer diff --git a/src/Artemis.UI/buildinfo.json b/src/Artemis.UI/buildinfo.json new file mode 100644 index 000000000..248b88208 --- /dev/null +++ b/src/Artemis.UI/buildinfo.json @@ -0,0 +1,6 @@ +{ + "BuildId": 0, + "BuildNumber": 0, + "SourceBranch": "", + "SourceVersion": "" +} \ No newline at end of file