Skip to content

Commit

Permalink
Add SetPackageVersion function
Browse files Browse the repository at this point in the history
  • Loading branch information
chidozieononiwu committed Dec 4, 2020
1 parent d2f14ed commit 865f529
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
14 changes: 11 additions & 3 deletions eng/scripts/Language-Settings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ function Update-python-CIConfig($pkgs, $ciRepo, $locationInDocRepo, $monikerId=$
Set-Content -Path $pkgJsonLoc -Value $jsonContent
}

function GetExistingPackageVersions ($PackageName, $GroupId=$null)
{
function GetExistingPackageVersions ($PackageName, $GroupId=$null) {
try
{
$existingVersion = Invoke-RestMethod -Method GET -Uri "https://pypi.python.org/pypi/${PackageName}/json"
Expand All @@ -192,4 +191,13 @@ function GetExistingPackageVersions ($PackageName, $GroupId=$null)
LogError "Failed to retieve package versions. `n$_"
return $null
}
}
}

function SetPackageVersion ($PackageName, $Version, $ServiceName, $ReleaseDate) {
if($null -eq $ReleaseDate)
{
$ReleaseDate = Get-Date -Format "yyy-MM-dd"
}
pip install -r "$EngDir/versioning/requirements.txt" -q -I
python "$EngDir/versioning/version_set.py" --package-name $PackageName --new-version $Version --service $ServiceName
}
2 changes: 1 addition & 1 deletion sdk/core/azure-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Release History

## 1.9.1 (Unreleased)
## 2.0.0 (2020-12-03)


## 1.9.0 (2020-11-09)
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/azure-core/azure/core/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
# regenerated.
# --------------------------------------------------------------------------

VERSION = "1.9.1"
VERSION = "2.0.0"

0 comments on commit 865f529

Please sign in to comment.