Debian Codegraph @

continuous-delivery/test-version-exists

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2 set -ex
3 #force a failure if there's no tag
4 GIT_TAG=$(gitscip-shell system . . git. describe --tags)
5 # Check if the git tag version starts with 'v'
6 if [[ "$GIT_TAG" != v* ]]; then
7 echoscip-shell system . . echo. "Current tag version does not start with 'v', please ensure the tag is correctly formatted."
8 exit 1
9 fi
10 # now get the tag without leading 'v'
11 CURRENT_TAG=$(echoscip-shell system . . echo. $GIT_TAG | cutscip-shell system . . cut. -f2 -dv)
12 # convert v0.2.12-2-g50254a9 to 0.2.12
13 CURRENT_TAG_VERSION=$(gitscip-shell system . . git. describe --tags | cutscip-shell system . . cut. -f1 -d'-' | cutscip-shell system . . cut. -f2 -dv)
14 # if there's a hash on the tag, then this is not a release tagged commit
15 if [scip-shell system . . `[`. "$CURRENT_TAG" != "$CURRENT_TAG_VERSION" ]; then
16 echoscip-shell system . . echo. "Current tag version is not a release tag, cut a new release if you want to publish."
17 exit 1
18 fi
19
20 if python3scip-shell system . . python3. -m pip install --no-cache-dir -vvv awscrt==$CURRENT_TAG_VERSION; then
21 echoscip-shell system . . echo. "$CURRENT_TAG_VERSION is already in pypi, cut a new tag if you want to upload another version."
22 exit 1
23 fi
24
25 echoscip-shell system . . echo. "$CURRENT_TAG_VERSION currently does not exist in pypi, allowing pipeline to continue."
26 exit 0