Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix branch
  • Loading branch information
fengzhou-msft committed Dec 25, 2020
commit c24f7fda851028f9d1b7fae87ed7ed90435e65c9
12 changes: 7 additions & 5 deletions azure-pipelines-full-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
12 changes: 7 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions scripts/release/pypi/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set -ev
cd $BUILD_SOURCESDIRECTORY

branch=$1
echo "Branch $branch"

echo "Search setup files from `pwd`."
python --version
Expand All @@ -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

Expand Down