Skip to content

Commit

Permalink
Merge pull request #11 from CybercentreCanada/build_paths
Browse files Browse the repository at this point in the history
Let branch determine build path
  • Loading branch information
cccs-rs authored Jul 26, 2021
2 parents b5b430d + 617d928 commit 6e158f1
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 6e158f1

Please sign in to comment.