Skip to content

Commit 40c70c3

Browse files
author
Justin Boswell
authored
Always set the package version to match the git tag when publishing (#65)
* Always set the package version to match the git tag when publishing * set the default version to 1.0.0-dev * Updated to awscrt v0.5.15
1 parent 1e5492e commit 40c70c3

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

continuous-delivery/publish_to_prod_pypi.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ phases:
1010
pre_build:
1111
commands:
1212
- pypirc=$(aws secretsmanager get-secret-value --secret-id "prod/aws-crt-python/.pypirc" --query "SecretString" | cut -f2 -d\") && echo "$pypirc" > ~/.pypirc
13+
- export PKG_VERSION=$(git describe --tags | cut -f2 -dv)
1314
build:
1415
commands:
1516
- echo Build started on `date`
1617
- cd aws-iot-device-sdk-python-v2
18+
- sed --in-place -E "s/version='.+'/version='${PKG_VERSION}'/" setup.py
1719
- python3 setup.py sdist bdist_wheel --universal
1820
- python3 -m twine upload -r pypi dist/*
1921
post_build:

continuous-delivery/publish_to_test_pypi.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ phases:
1010
pre_build:
1111
commands:
1212
- pypirc=$(aws secretsmanager get-secret-value --secret-id "alpha/aws-crt-python/.pypirc" --query "SecretString" | cut -f2 -d\") && echo "$pypirc" > ~/.pypirc
13+
- export PKG_VERSION=$(git describe --tags | cut -f2 -dv)
1314
build:
1415
commands:
1516
- echo Build started on `date`
1617
- cd aws-iot-device-sdk-python-v2
18+
- sed --in-place -E "s/version='.+'/version='${PKG_VERSION}'/" setup.py
1719
- python3 setup.py sdist bdist_wheel --universal
1820
- python3 -m twine upload -r testpypi dist/*
1921
post_build:

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717

1818
setup(
1919
name='awsiotsdk',
20-
version='1.0.6',
20+
version='1.0.0-dev',
2121
description='AWS IoT SDK based on the AWS Common Runtime',
2222
author='AWS SDK Common Runtime Team',
2323
url='https://github.com/aws/aws-iot-device-sdk-python-v2',
2424
packages = ['awsiot'],
2525
install_requires=[
26-
'awscrt==0.5.13',
26+
'awscrt==0.5.15',
2727
'futures;python_version<"3.2"',
2828
'typing;python_version<"3.5"',
2929
],

0 commit comments

Comments
 (0)