File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ phases:
18
18
commands :
19
19
- echo Build started on `date`
20
20
- cd aws-iot-device-sdk-python-v2
21
- - CURRENT_TAG_VERSION=$(git describe --abbrev=0 )
21
+ - CURRENT_TAG_VERSION=$(git describe --tags | cut -f2 -dv )
22
22
- python3 -m pip install --user awsiotsdk==$CURRENT_TAG_VERSION
23
23
- python3 samples/basic_discovery.py --region us-east-1 --cert /tmp/certificate.pem --key /tmp/privatekey.pem --ca_file /tmp/AmazonRootCA1.pem --thing_name aws-sdk-crt-unit-test --print_discover_resp_only -v Trace
24
24
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ phases:
18
18
commands :
19
19
- echo Build started on `date`
20
20
- cd aws-iot-device-sdk-python-v2
21
- - CURRENT_TAG_VERSION=$(git describe --abbrev=0 )
21
+ - CURRENT_TAG_VERSION=$(git describe --tags | cut -f2 -dv )
22
22
# this is here because typing isn't in testpypi, so pull it from prod instead
23
23
- python3 -m pip install typing
24
24
- python3 -m pip install -i https://testpypi.python.org/simple --user awsiotsdk==$CURRENT_TAG_VERSION
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
set -e
3
- # force a failure if there's no tag
4
- git describe --abbrev=0
5
- # now get the tag
6
- CURRENT_TAG_VERSION=$( git describe --abbrev=0)
3
+ set -x
4
+ # force a failure if there's no tag
5
+ git describe --tags
6
+ # now get the tag
7
+ CURRENT_TAG=$( git describe --tags | cut -f2 -dv)
8
+ # convert v0.2.12-2-g50254a9 to 0.2.12
9
+ CURRENT_TAG_VERSION=$( git describe --tags | cut -f1 -d' -' | cut -f2 -dv)
10
+ # if there's a hash on the tag, then this is not a release tagged commit
11
+ if [ " $CURRENT_TAG " != " $CURRENT_TAG_VERSION " ]; then
12
+ echo " Current tag version is not a release tag, cut a new release if you want to publish."
13
+ exit 1
14
+ fi
15
+
7
16
if pip install -vvv awsiotsdk==$CURRENT_TAG_VERSION ; then
8
17
echo " $CURRENT_TAG_VERSION is already in pypi, cut a new tag if you want to upload another version."
9
18
exit 1
You can’t perform that action at this time.
0 commit comments