diff --git a/azure-pipelines-full-tests.yml b/azure-pipelines-full-tests.yml index ffee33e3d8c..18a6ba50057 100644 --- a/azure-pipelines-full-tests.yml +++ b/azure-pipelines-full-tests.yml @@ -43,12 +43,14 @@ jobs: inputs: versionSpec: 3.7 - - task: Bash@3 + - script: | + if [[ "$(Build.Reason)" == "PullRequest" ]]; then + branch=$(System.PullRequest.TargetBranch) + else + branch=$(Build.SourceBranchName) + fi + scripts/release/pypi/build.sh $branch displayName: 'Run Wheel Build Script' - inputs: - targetType: 'filePath' - filePath: scripts/release/pypi/build.sh - arguments: $(System.PullRequest.TargetBranch) - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: pypi' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c1d50ca7371..aec42ec5e29 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -279,12 +279,14 @@ jobs: versionSpec: 3.7 - - task: Bash@3 + - script: | + if [[ "$(Build.Reason)" == "PullRequest" ]]; then + branch=$(System.PullRequest.TargetBranch) + else + branch=$(Build.SourceBranchName) + fi + scripts/release/pypi/build.sh $branch displayName: 'Run Wheel Build Script' - inputs: - targetType: 'filePath' - filePath: scripts/release/pypi/build.sh - arguments: $(System.PullRequest.TargetBranch) - task: PublishPipelineArtifact@0 diff --git a/scripts/release/pypi/build.sh b/scripts/release/pypi/build.sh index d11f86ea211..229d65a68f8 100755 --- a/scripts/release/pypi/build.sh +++ b/scripts/release/pypi/build.sh @@ -12,6 +12,7 @@ set -ev cd $BUILD_SOURCESDIRECTORY branch=$1 +echo "Branch $branch" echo "Search setup files from `pwd`." python --version @@ -20,8 +21,8 @@ pip install -U pip setuptools wheel pip list script_dir=`cd $(dirname $BASH_SOURCE[0]); pwd` -echo $script_dir -if [[ "$branch" != "release" ]]; then + +if [[ "$branch" == "dev" ]]; then . $script_dir/../../ci/version.sh post`date -u '+%Y%m%d%H%M%S'` fi