Skip to content

Commit

Permalink
Added check-tagged command for master checking
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Wagner <[email protected]>
  • Loading branch information
wagmarcel committed Apr 9, 2019
1 parent 756d101 commit c2ca211
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ commands:
cd platform-setup
sudo ./setup-ubuntu16.04.sh
setup-branch:
description: "Setup branch and check whether PR/master is tagged corretly"
description: "Setup subbranches"
steps:
- run:
shell: /bin/bash
name: Setup branch and check whether PR/master is tagged
name: Setup sub branches
command: |
sudo apt install jq
# First find out Base Branch (if any)
Expand All @@ -47,10 +47,6 @@ commands:
echo Detected that PR is related to develop. Will update all subrepos.
make update
fi
echo "Checking whether master or PR for master is tagged"
if [ "${CIRCLE_BRANCH}" = "master" ] || [ "${BASE_BRANCH}" = "master" ]; then
git describe --tags --exact-match || exit 1
fi
build-branch:
description: "Build branch"
steps:
Expand Down Expand Up @@ -111,6 +107,14 @@ commands:
echo "Commit is not signedoff"
exit 1
fi
check-tagged:
description: "Check whether latest commit is tagged"
steps:
- run:
name: Check whether most recent commit is tagged
shell: /bin/bash
command: |
git describe --tags --exact-match || exit 1
jobs:
build:
executor: my-executor
Expand All @@ -125,6 +129,7 @@ jobs:
executor: my-executor
steps:
- checkout
- check-tagged
- setup-build-environment
- setup-branch
- build-branch
Expand Down

0 comments on commit c2ca211

Please sign in to comment.