Skip to content

Commit

Permalink
Let branch determine build path
Browse files Browse the repository at this point in the history
  • Loading branch information
cccs-rs committed Jul 26, 2021
1 parent b5b430d commit 617d928
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pipelines/azure-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ stages:
inputs: {versionSpec: 3.8}
- script: |
export VERSION=${BUILD_SOURCEBRANCH#"refs/tags/v"}
export COMMIT=`git rev-parse --verify ${BUILD_SOURCEBRANCH}`
export BRANCH=`git ls-remote --heads origin | grep $COMMIT | sed "s/.*\///"`
echo "Building $VERSION On branch $BRANCH"
if [[ "$VERSION" == *stable* ]] && [[ $BRANCH != "master" ]]; then exit 1; fi
if [[ "$VERSION" == *dev* ]] && [[ $BRANCH != "dev" ]]; then exit 1; fi
echo $VERSION > assemblyline_service_client/VERSION
export VERSION=${VERSION/stable}
export VERSION=${VERSION/beta/b}
sudo env "PATH=$PATH" python -m pip install --no-cache-dir -U wheel cython pip
python setup.py bdist_wheel
- publish: $(System.DefaultWorkingDirectory)/dist/
Expand Down

0 comments on commit 617d928

Please sign in to comment.