From 831a3012dd72ad3673db3b40ee7fda158647c009 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Mon, 6 Jul 2020 20:59:04 +0000 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools repository --- eng/common/pipelines/templates/steps/verify-changelog.yml | 2 +- eng/common/scripts/create-tags-and-git-release.ps1 | 1 - eng/common/scripts/modules/ChangeLog-Operations.psm1 | 5 ++--- eng/common/scripts/modules/Package-Properties.psm1 | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/eng/common/pipelines/templates/steps/verify-changelog.yml b/eng/common/pipelines/templates/steps/verify-changelog.yml index 914adcc660e8..f6005124a87f 100644 --- a/eng/common/pipelines/templates/steps/verify-changelog.yml +++ b/eng/common/pipelines/templates/steps/verify-changelog.yml @@ -21,5 +21,5 @@ steps: -ForRelease $${{ parameters.ForRelease }} pwsh: true workingDirectory: $(Pipeline.Workspace) - displayName: Verify ChangeLog / Release Notes + displayName: Verify ChangeLogEntry for ${{ parameters.PackageName }} continueOnError: false \ No newline at end of file diff --git a/eng/common/scripts/create-tags-and-git-release.ps1 b/eng/common/scripts/create-tags-and-git-release.ps1 index cec45536b704..1667cddd7e22 100644 --- a/eng/common/scripts/create-tags-and-git-release.ps1 +++ b/eng/common/scripts/create-tags-and-git-release.ps1 @@ -6,7 +6,6 @@ param ( # used by VerifyPackages $artifactLocation, # the root of the artifact folder. DevOps $(System.ArtifactsDirectory) $workingDirectory, # directory that package artifacts will be extracted into for examination (if necessary) - [ValidateSet("Nuget","NPM","PyPI","Maven")] $packageRepository, # used to indicate destination against which we will check the existing version. # valid options: PyPI, Nuget, NPM, Maven, C # used by CreateTags diff --git a/eng/common/scripts/modules/ChangeLog-Operations.psm1 b/eng/common/scripts/modules/ChangeLog-Operations.psm1 index 5c173876124e..e92070b195b3 100644 --- a/eng/common/scripts/modules/ChangeLog-Operations.psm1 +++ b/eng/common/scripts/modules/ChangeLog-Operations.psm1 @@ -94,9 +94,8 @@ function Confirm-ChangeLogEntry { } if ($ForRelease -eq $True) { - $CurrentDate = Get-Date -Format "yyyy-MM-dd" - if ($changeLogEntry.ReleaseStatus -ne "($CurrentDate)") { - Write-Host ("##[warning]Incorrect Date: Please use the current date in the Changelog '{0}' before releasing the package" -f $ChangeLogLocation) + if ($changeLogEntry.ReleaseStatus -eq "(Unreleased)") { + Write-Host ("##[error]No release date set. Please set a release date with format 'yyyy-MM-dd' in the heading for version '{0}' in the changelog '{1}'." -f $VersionString, $ChangelogLocation) exit 1 } diff --git a/eng/common/scripts/modules/Package-Properties.psm1 b/eng/common/scripts/modules/Package-Properties.psm1 index 294f6609dab8..dca123f929f7 100644 --- a/eng/common/scripts/modules/Package-Properties.psm1 +++ b/eng/common/scripts/modules/Package-Properties.psm1 @@ -106,7 +106,7 @@ function Extract-PythonPkgProps ($pkgPath, $serviceName, $pkgName) { $setupLocation = $pkgPath.Replace('\','/') pushd $RepoRoot - $setupProps = (python -c "import scripts.devops_tasks.common_tasks; obj=scripts.devops_tasks.common_tasks.parse_setup('$setupLocation'); print('{0},{1}'.format(obj[0], obj[1]));") -split "," + $setupProps = (python -c "import sys; import os; sys.path.append(os.path.join('scripts', 'devops_tasks')); from common_tasks import parse_setup; obj=parse_setup('$setupLocation'); print('{0},{1}'.format(obj[0], obj[1]));") -split "," popd if (($setupProps -ne $null) -and ($setupProps[0] -eq $pkgName)) {