Skip to content

Commit

Permalink
Update pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Jun 4, 2024
1 parent d5d5613 commit b8b1969
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 75 deletions.
73 changes: 0 additions & 73 deletions .azure-pipelines/Release Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,67 +5,6 @@ pr:
- master

jobs:
- job: Mac_Build
displayName: Mac Build
timeoutInMinutes: 360
pool:
vmImage: macos-latest
steps:

- task: InstallSSHKey@0
inputs:
knownHostsEntry: |
github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl
github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=
sshKeySecureFile: 'pipelines_rsa'

- checkout: self
submodules: recursive
clean: true
fetchTags: false

- task: PowerShell@2
displayName: Add CurrentVersion Variable
inputs:
targetType: inline
script: |
$VersionString = git show -s --format=%ci $(Build.SourceVersion)
$VersionDate = [DateTimeOffset]::Parse($VersionString)
$CurrentVersion = $VersionDate.ToString("yyyy.MM.dd.HHmm")
[System.Console]::WriteLine("##vso[task.setvariable variable=CurrentVersion]$CurrentVersion")
Write-Host "Setting current version to $CurrentVersion."
- task: UseDotNet@2
displayName: Use .NET SDK
inputs:
version: 8.x

- task: DotNetCoreCLI@2
displayName: dotnet publish x64
inputs:
command: publish
publishWebProjects: false
projects: '**/Agent.csproj'
arguments: -c $(BuildConfiguration) -r osx-x64 -o "$(Build.SourcesDirectory)/Agent/bin/publish" /p:Version=$(CurrentVersion) /p:FileVersion=$(CurrentVersion)
zipAfterPublish: false
modifyOutputPath: false

- task: PowerShell@2
displayName: PowerShell Script
inputs:
targetType: inline
script: |
Compress-Archive -Path "$(Build.SourcesDirectory)/Agent/bin/publish/*" -DestinationPath "$(Build.SourcesDirectory)/Agent/bin/Remotely-MacOS-x64.zip" -Force
- task: PublishPipelineArtifact@1
displayName: Publish macOS x64 Agent
inputs:
path: $(Build.SourcesDirectory)/Agent/bin/Remotely-MacOS-x64.zip
artifactName: Mac-x64-Agent

- job: Windows_Build
displayName: Windows Build
timeoutInMinutes: 360
Expand All @@ -90,12 +29,6 @@ jobs:
- task: VisualStudioTestPlatformInstaller@1
displayName: Visual Studio Test Platform Installer

- task: DownloadPipelineArtifact@2
displayName: Download macOS x64 Agent
inputs:
artifact: Mac-x64-Agent
path: $(Build.SourcesDirectory)\Server\wwwroot\Content\

- task: PowerShell@2
displayName: Add CurrentVersion Variable
inputs:
Expand All @@ -112,12 +45,6 @@ jobs:
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'

- task: NuGetCommand@2
displayName: NuGet restore Agent.Installer.Win
inputs:
solution: Agent.Installer.Win/packages.config
packagesDirectory: $(Build.SourcesDirectory)\packages

- task: UseDotNet@2
displayName: Use .NET SDK
inputs:
Expand Down
4 changes: 2 additions & 2 deletions Utilities/Publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ if ((Test-Path -Path "$Root\Agent\bin\publish\linux-x64") -eq $true) {
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime win-x64 --self-contained --configuration Release --output "$Root\Agent\bin\publish\win-x64" "$Root\Agent"
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime linux-x64 --self-contained --configuration Release --output "$Root\Agent\bin\publish\linux-x64" "$Root\Agent"
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime win-x86 --self-contained --configuration Release --output "$Root\Agent\bin\publish\win-x86" "$Root\Agent"
#dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime osx-x64 --self-contained --configuration Release --output "$Root\Agent\bin\publish\osx-x64" "$Root\Agent"
#dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime osx-arm64 --self-contained --configuration Release --output "$Root\Agent\bin\publish\osx-arm64" "$Root\Agent"
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime osx-x64 --self-contained --configuration Release --output "$Root\Agent\bin\publish\osx-x64" "$Root\Agent"
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime osx-arm64 --self-contained --configuration Release --output "$Root\Agent\bin\publish\osx-arm64" "$Root\Agent"

New-Item -Path "$Root\Agent\bin\publish\win-x64\Desktop\" -ItemType Directory -Force
New-Item -Path "$Root\Agent\bin\publish\win-x86\Desktop\" -ItemType Directory -Force
Expand Down

0 comments on commit b8b1969

Please sign in to comment.