-
Couldn't load subscription status.
- Fork 30
Rsh/get version script #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c7d8c7a
Update buildAndPackage.yml for Azure Pipelines
ramsessanchez 5696713
Update buildAndPackage.yml for Azure Pipelines
ramsessanchez 6b70c19
Update prValidate.yml for Azure Pipelines
ramsessanchez 493d910
update script and rename folder from Scripts to scripts
ramsessanchez 6f42ced
add getLatestVersion script
ramsessanchez eae025a
update the scripts
ramsessanchez 3eee981
Update prValidate.yml for Azure Pipelines
ramsessanchez 062a8d5
Update buildAndPackage.yml for Azure Pipelines
ramsessanchez 1277760
Update buildAndPackage.yml for Azure Pipelines
ramsessanchez ff942d7
Update prValidate.yml for Azure Pipelines
ramsessanchez 5ca7be8
Update prValidate.yml
ramsessanchez 2b0f46b
Update prValidate.yml
ramsessanchez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,31 @@ | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. | ||
|
|
||
| <# | ||
| .Synopsis | ||
| Retrieve the latest version of the library | ||
| .Description | ||
| Retrieves the latest version specified in the Gradle.Properties file | ||
| Uses the retrieved values to update the enviornment variable VERSION_STRING | ||
| #> | ||
|
|
||
| .Parameter propertiesPath | ||
|
|
||
| Param( | ||
| [parameter(Mandatory = $true)] | ||
| [string]$propertiesPath, | ||
| ) | ||
|
|
||
| #Retrieve the current version from the Gradle.Properties file given the specified path | ||
| $file = get-item $propertiesPath | ||
| $findVersions = $file | Select-String -Pattern "mavenMajorVersion" -Context 0,2 | ||
| $findVersions = $findVersions -split "`r`n" | ||
|
|
||
| $majorVersion = $findVersions[0].Substring($findVersions[0].Length-1) | ||
| $minorVersion = $findVersions[1].Substring($findVersions[1].Length-1) | ||
| $patchVersion = $findVersions[2].Substring($findVersions[2].Length-1) | ||
| $version = "$majorVersion.$minorVersion.$patchVersion" | ||
|
|
||
| #Update the VERSION_STRING env variable and inform the user | ||
| Write-Host "##vso[task.setVariable variable=VERSION_STRING]$($version)"; | ||
| Write-Host "Updated the VERSION_STRING enviornment variable with the current Gradle.Properties, $version" |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: should we use
-orinstead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure here either. Initially I was thinking -or also, however I was think this would only lead to another error if there's a version conflict with either the Maven or Jcenter version and we allow it to proceed. With -and we only allow it to proceed if it has not been published to either repository.