diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 04278e6ddbb6..79b9db99e263 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -249,28 +249,28 @@ stages: displayName: Setup DevOpsFeedName - task: TwineAuthenticate@0 - displayName: 'Authenticate to feed: $(DevFeedName)' + displayName: 'Authenticate to feed' inputs: artifactFeeds: $(DevFeedName) - ${{ each artifact in parameters.Artifacts }}: - - pwsh: | Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}} New-Item -Type Directory -Name ${{artifact.safeName}} -Path $(Pipeline.Workspace) $underscorePrefix = "${{artifact.name}}" $dashPrefix = "${{artifact.name}}".Replace("_", "-") - Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$dashPrefix-[0-9]*.[0-9]*.[0-9]*.dev* $(Pipeline.Workspace)/${{artifact.safeName}} - Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$underscorePrefix-[0-9]*.[0-9]*.[0-9]*.dev* $(Pipeline.Workspace)/${{artifact.safeName}} + Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$dashPrefix-[0-9]*.[0-9]*.[0-9]*a[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}} + Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$underscorePrefix-[0-9]*.[0-9]*.[0-9]*a[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}} Get-ChildItem $(Pipeline.Workspace)/${{artifact.safeName}} + $fileCount = (Get-ChildItem $(Pipeline.Workspace)/${{artifact.safeName}} | Measure-Object).Count - Write-Output "##vso[task.setvariable variable=FilesToUploadCount]$fileCount" + if ($fileCount -eq 0) { + Write-Host "No alpha packages for ${{artifact.safeName}} to publish." + exit 0 + } - - script: | - set -e - twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*.dev*.whl - echo "Uploaded whl to devops feed" - twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*.dev*.zip - echo "Uploaded sdist to devops feed" - displayName: 'Publish package to feed: $(DevFeedName)' - condition: gt(variables['FilesToUploadCount'], 0) \ No newline at end of file + twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*a*.whl + echo "Uploaded whl to devops feed $(DevFeedName)" + twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*a*.zip + echo "Uploaded sdist to devops feed $(DevFeedName)" + displayName: 'Publish ${{artifact.name}} alpha package' \ No newline at end of file diff --git a/eng/versioning/version_set_dev.py b/eng/versioning/version_set_dev.py index e65feeae18db..fb0c7836bb14 100644 --- a/eng/versioning/version_set_dev.py +++ b/eng/versioning/version_set_dev.py @@ -25,8 +25,7 @@ def format_build_id(build_id): def get_dev_version(current_version, build_id): parsed_version = parse(current_version) - #release = parsed_version.release - return "{0}.dev{1}".format(parsed_version, build_id) + return "{0}a{1}".format(parsed_version.base_version, build_id) def is_in_service(sdk_path, setup_py_location, service_name): sdk_prefix = path.normpath(sdk_path) diff --git a/scripts/devops_tasks/test_regression.py b/scripts/devops_tasks/test_regression.py index b0722ea39db4..ea56872c7d41 100644 --- a/scripts/devops_tasks/test_regression.py +++ b/scripts/devops_tasks/test_regression.py @@ -260,10 +260,10 @@ def _is_package_installed(self, package, version): installed_pkgs = get_installed_packages(site_packages) logging.info("Installed packages: {}".format(installed_pkgs)) # Verify installed package version - # Search for exact version or dev build version of current version. + # Search for exact version or alpha build version of current version. pkg_search_string = "{0}=={1}".format(package, version) - dev_build_search_string = "{0}=={1}.dev".format(package, version) - return any(p == pkg_search_string or p.startswith(dev_build_search_string) for p in installed_pkgs) + alpha_build_search_string = "{0}=={1}a".format(package, version) + return any(p == pkg_search_string or p.startswith(alpha_build_search_string) for p in installed_pkgs) # This method identifies package dependency map for all packages in azure sdk diff --git a/sdk/template/azure-template/CHANGELOG.md b/sdk/template/azure-template/CHANGELOG.md index c85f69aeddd9..d20ffa8ebae5 100644 --- a/sdk/template/azure-template/CHANGELOG.md +++ b/sdk/template/azure-template/CHANGELOG.md @@ -1,5 +1,8 @@ # Release History +## 0.0.13b1 (2020-08-27) +- Testing out some alpha and beta versioning + ## 0.0.12 (Unreleased) - Test a successful Release diff --git a/sdk/template/azure-template/azure/template/_version.py b/sdk/template/azure-template/azure/template/_version.py index 8fb7d48af3e3..4a01be0b8d95 100644 --- a/sdk/template/azure-template/azure/template/_version.py +++ b/sdk/template/azure-template/azure/template/_version.py @@ -1,2 +1,2 @@ # matches SEMVER -VERSION = "0.0.12" \ No newline at end of file +VERSION = "0.0.13b1" \ No newline at end of file diff --git a/sdk/template/azure-template/setup.py b/sdk/template/azure-template/setup.py index e58960966f93..b711c6152399 100644 --- a/sdk/template/azure-template/setup.py +++ b/sdk/template/azure-template/setup.py @@ -42,7 +42,7 @@ license='MIT License', # ensure that the development status reflects the status of your package classifiers=[ - 'Development Status :: 3 - Alpha', + "Development Status :: 4 - Beta", 'Programming Language :: Python', 'Programming Language :: Python :: 2',