mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-25 10:59:53 +03:00
9620dcbcd0
The script on our server bumps the build number for every new version + commit combination. Each combination is associated to a unique build number and vice versa. There's a separate counter for each version. The reason why we cannot just use "git describe --tags --dirty" is because it relies on the last tag's name and generates a string like "5.01.9674-212-g54280853". What we want, instead, is the last part of the version to be increased for every build. Then, once we consider the branch stable enough, we create a tag like "5.01" and bump the version immediately after the new release. Please note that for pull requests the build number will always be 0, because the secret token is only available in the Nightly pipeline.
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
parameters:
|
|
- name: architecture
|
|
type: string
|
|
- name: compilerPath
|
|
type: string
|
|
- name: vcpkgTriplet
|
|
type: string
|
|
- name: vcvarsPath
|
|
type: string
|
|
|
|
steps:
|
|
- task: Cache@2
|
|
inputs:
|
|
key: '"vcpkg-installed-windows-${{parameters.architecture}}"'
|
|
path: 'C:/vcpkg/installed'
|
|
displayName: 'Environment storage'
|
|
- script: |
|
|
vcpkg install openssl zlib --triplet ${{parameters.vcpkgTriplet}}
|
|
workingDirectory: C:/vcpkg
|
|
displayName: 'Prepare environment'
|
|
- script: '$(Build.SourcesDirectory)/.ci/azure-pipelines/windows_build.bat'
|
|
env:
|
|
ARCHITECTURE: ${{parameters.architecture}}
|
|
COMPILER_PATH: ${{parameters.compilerPath}}
|
|
VCPKG_TRIPLET: ${{parameters.vcpkgTriplet}}
|
|
VCVARS_PATH: ${{parameters.vcvarsPath}}
|
|
SE_BUILD_NUMBER_TOKEN: $(BUILD_NUMBER_TOKEN)
|
|
displayName: 'Build'
|
|
- powershell: |
|
|
. .ci/appveyor-vpntest.ps1
|
|
displayName: 'Test'
|
|
- task: CopyFiles@2
|
|
inputs:
|
|
sourceFolder: '$(Build.BinariesDirectory)'
|
|
contents: '?(*.exe|*.se2|*.pdb)'
|
|
TargetFolder: '$(Build.StagingDirectory)/binaries'
|
|
flattenFolders: true
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
pathtoPublish: '$(Build.StagingDirectory)/binaries'
|
|
artifactName: 'Binaries'
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
pathtoPublish: '$(Build.StagingDirectory)/installers'
|
|
artifactName: 'Installers'
|