-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* add variables for version number and git commit hash * fix typo * fix typo * some logging * some logging * some logging * some logging * some logging * some logging * some logging * some logging * some more edits to see generic scripts can print * working * fixing windows git hash * try quoted echo * fix git rev-parse * echo without quotes * removed commit hash from artifact filename, added long commit hash as a file inside * added the missing commit id parameter * fix windows pipeline * keep only win 64, others disabled * remove disabling conditions
- Loading branch information
Showing
4 changed files
with
60 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
tools/ci_build/github/azure-pipelines/templates/set-version-number-variables-step.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Sets version number from VERSION.txt into a variable. As well as the git commit hash. | ||
|
||
steps: | ||
- task: CmdLine@2 | ||
displayName: 'Set Version Number variables for Windows' | ||
inputs: | ||
script: | | ||
SETLOCAL EnableDelayedExpansion | ||
set /p _OnnxRuntimeVersion=<$(Build.SourcesDirectory)\VERSION_NUMBER | ||
@echo ##vso[task.setvariable variable=OnnxRuntimeVersion;]%_OnnxRuntimeVersion% | ||
FOR /F "tokens=* USEBACKQ" %%F IN (`git rev-parse HEAD`) DO ( | ||
@echo ##vso[task.setvariable variable=OnnxRuntimeGitCommitHash;]%%F | ||
) | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
condition: eq(variables['Agent.OS'], 'Windows_NT') | ||
|
||
- task: CmdLine@2 | ||
displayName: 'Set version number variables for Unix' | ||
inputs: | ||
script: | | ||
_OnnxRuntimeVersion=$(head -1 $(Build.SourcesDirectory)/VERSION_NUMBER) | ||
echo "##vso[task.setvariable variable=OnnxRuntimeVersion;]$_OnnxRuntimeVersion" | ||
_OnnxRuntimeGitCommitHash=$(git rev-parse HEAD) | ||
echo "##vso[task.setvariable variable=OnnxRuntimeGitCommitHash;]$_OnnxRuntimeGitCommitHash" | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
condition: not(eq(variables['Agent.OS'], 'Windows_NT')) |