Skip to content

Instantly share code, notes, and snippets.

@jpboyce
Created March 16, 2022 00:02
Show Gist options
  • Save jpboyce/61889ff939f57098a567d0b5a1526207 to your computer and use it in GitHub Desktop.
Save jpboyce/61889ff939f57098a567d0b5a1526207 to your computer and use it in GitHub Desktop.
variables:
- group: 'PowerShellCodeSigning'
- name: majorVer
value: 1
- name: minorVer
value: 0
stages:
- stage: Sign_Code
displayName: 'Sign Code'
jobs:
- job: VersionAndSign
displayName: 'Version Number Update and Sign Code'
variables:
patch: $[counter(variables['minorVer'], 0)]
fullVersion: $(majorVer).$(minorVer).$(patch)
steps:
- task: PowerShell@2
displayName: 'Update Version variable'
inputs:
targetType: inline
script: |
echo "##vso[build.updatebuildnumber]$(majorVer).$(minorVer).$(patch)"
echo "Full version value is: $(fullVersion)"
Get-ChildItem -Recurse
- task: qetza.replacetokens.replacetokens-task.replacetokens@5
displayName: 'Replace Tokens'
inputs:
targetFiles: '**/*.psd1'
verbosity: detailed
# Code signing tasks occur here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment