Skip to content

Commit

Permalink
Bumped versions, re-added the build script
Browse files Browse the repository at this point in the history
  • Loading branch information
KimihikoAkayasaki committed Mar 12, 2023
1 parent 0a2d4a9 commit cd34f92
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Amethyst.Plugins.Contract/Amethyst.Plugins.Contract.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<PropertyGroup>
<PackageId>Amethyst.Plugins.Contract</PackageId>
<Version>0.2.10</Version>
<Version>0.2.11</Version>
<Authors>K2VR</Authors>
<Company>K2VR</Company>
<PackageTags>Amethyst;K2VR;KinectToVR;VR;OpenVR;Fullbody Tracking</PackageTags>
Expand Down
6 changes: 3 additions & 3 deletions Amethyst/Amethyst.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
<Copyright>© K2VR Team</Copyright>
<Description>Amethyst (Desktop) App</Description>
<PackageProjectUrl>k2vr.tech</PackageProjectUrl>
<Version>1.2.230222.1</Version>
<FileVersion>1.2.0.2</FileVersion>
<AssemblyVersion>1.2.0.2</AssemblyVersion>
<Version>1.2.230313.2</Version>
<FileVersion>1.2.1.2</FileVersion>
<AssemblyVersion>1.2.1.2</AssemblyVersion>
<RepositoryUrl>https://github.com/KinectToVR/Amethyst</RepositoryUrl>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion Amethyst/Classes/AppData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public static class AppData

// Internal version number
public static (string Display, string Internal)
VersionString { get; } = ("1.2.0.2", "1.2.230222.1");
VersionString { get; } = ("1.2.1.2", "1.2.230313.2");

// Application settings
public static AppSettings Settings { get; set; } = new();
Expand Down
6 changes: 3 additions & 3 deletions K2CrashHandler/K2CrashHandler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<Copyright>© K2VR Team</Copyright>
<Description>Amethyst Crash and Recovery Handler</Description>
<PackageProjectUrl>k2vr.tech</PackageProjectUrl>
<Version>1.2.230000.1</Version>
<FileVersion>1.2.0.1</FileVersion>
<AssemblyVersion>1.2.0.1</AssemblyVersion>
<Version>1.2.230313.2</Version>
<FileVersion>1.2.1.2</FileVersion>
<AssemblyVersion>1.2.1.2</AssemblyVersion>
<RepositoryUrl>https://github.com/KinectToVR/Amethyst</RepositoryUrl>
</PropertyGroup>

Expand Down
129 changes: 129 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
trigger:
- main

pool:
vmImage: 'windows-latest'

variables:
- name: solution
value: '**/*.sln'
- name: buildPlatform
value: 'x64'
- name: buildConfiguration
value: 'Release'
- name: publishDirectory
value: 'Pack/Output'
- name: artifactDirectory
value: 'Pack/Zip'
- group: AppCenter

parameters:
- name: 'plugins'
type: object
default:
- "plugin_KinectV1"
- "plugin_KinectV2"
- "plugin_PSMoveService"
- "plugin_owoTrackVR"
- "plugin_OpenVR"

steps:
- checkout: self
submodules: true | recursive
persistCredentials: true

- task: NuGetToolInstaller@1

- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'

- pwsh: |
((Get-Content -path .\Amethyst\Classes\AppData.cs -Raw) -replace 'AZ_API_TOKEN', "$(AppToken)") | Set-Content -Path .\Amethyst\Classes\AppData.cs
((Get-Content -path .\Amethyst\App.xaml.cs -Raw) -replace 'AZ_COMMIT_SHA', "$(Build.SourceVersion)") | Set-Content -Path .\Amethyst\App.xaml.cs
((Get-Content -path .\Amethyst\App.xaml.cs -Raw) -replace 'AZ_APPSECRET', "$(AppSecret)") | Set-Content -Path .\Amethyst\App.xaml.cs
(((Get-Content -path .\Amethyst\Pages\Info.xaml -Raw) -replace '<!--AZ_COMMIT_DATA', '') -replace 'AZ_COMMIT_DATA-->', '') | Set-Content -Path .\Amethyst\Pages\Info.xaml
((Get-Content -path .\Amethyst\Pages\Info.xaml -Raw) -replace 'AZ_COMMIT_SHA', "$("$(Build.SourceVersion)".Substring(0,7))") | Set-Content -Path .\Amethyst\Pages\Info.xaml
((Get-Content -path .\Amethyst\Pages\Info.xaml -Raw) -replace 'AZ_COMMIT_LINK', "https://github.com/KinectToVR/Amethyst/commit/$(Build.SourceVersion)") | Set-Content -Path .\Amethyst\Pages\Info.xaml
displayName: Add commit data to Amethyst

- task: VSBuild@1
displayName: Build (publish) Amethyst
inputs:
platform: 'x64'
solution: '$(solution)'
configuration: '$(buildConfiguration)'
msbuildArgs: '/restore /p:Platform=x64 /p:PlatformTarget=x64 /p:Configuration=Release /p:RuntimeIdentifier=win10-x64 /t:Amethyst:Publish /p:PublishProfile=Amethyst\Properties\PublishProfiles\FolderProfile.pubxml'

- task: VSBuild@1
displayName: Build (publish) K2CrashHandler
inputs:
platform: 'x64'
solution: '$(solution)'
configuration: '$(buildConfiguration)'
msbuildArgs: '/restore /p:Platform=x64 /p:PlatformTarget=x64 /p:Configuration=Release /p:RuntimeIdentifier=win10-x64 /t:K2CrashHandler:Publish /p:PublishProfile=K2CrashHandler\Properties\PublishProfiles\FolderProfile.pubxml'

- task: CopyFiles@2
displayName: Pack Amethyst
inputs:
SourceFolder: 'Amethyst\bin\$(buildPlatform)\$(buildConfiguration)\net7.0\win10-$(buildPlatform)\publish'
Contents: '**'
TargetFolder: $(publishDirectory)
preserveTimestamp: true

- task: CopyFiles@2
displayName: Pack K2CrashHandler
inputs:
SourceFolder: 'K2CrashHandler\bin\$(buildPlatform)\$(buildConfiguration)\net7.0\win10-$(buildPlatform)\publish'
Contents: '**'
TargetFolder: $(publishDirectory)\K2CrashHandler
preserveTimestamp: true

- ${{each plugin in parameters.plugins}}:
- task: DownloadGitHubRelease@0
displayName: 'Download plugin ${{ plugin }}'
inputs:
connection: github.com_KimihikoAkayasaki
userRepository: 'KinectToVR/${{ plugin }}'
defaultVersionType: latest
version: latest
downloadPath: $(artifactDirectory)
- task: ExtractFiles@1
displayName: 'Pack plugin ${{ plugin }}'
inputs:
archiveFilePatterns: '$(artifactDirectory)/${{ plugin }}.zip'
destinationFolder: '$(publishDirectory)/Plugins/${{ plugin }}'
cleanDestinationFolder: false

- task: ArchiveFiles@2
displayName: Archive published files
inputs:
rootFolderOrFile: $(publishDirectory)
includeRootFolder: false
archiveFile: $(Build.ArtifactStagingDirectory)/Amethyst.$(Build.BuildNumber).zip

- task: GitHubRelease@1
displayName: Prepare for artifact upload
inputs:
gitHubConnection: github.com_KimihikoAkayasaki
action: delete
tagSource: userSpecifiedTag
tag: latest
tagPattern: .*

- script: git push --delete origin latest
displayName: Cleanup tags before uploading

- task: GitHubRelease@1
displayName: Upload packed app artifact
inputs:
gitHubConnection: github.com_KimihikoAkayasaki
action: create
tagSource: userSpecifiedTag
tag: latest
tagPattern: .*
title: 'Amethyst $(Build.BuildNumber)'
changeLogCompareToRelease: lastFullRelease
changeLogType: commitBased
isPreRelease: true
assetUploadMode: delete

0 comments on commit cd34f92

Please sign in to comment.