Skip to content

Commit dcd9c59

Browse files
author
Justin Boswell
authored
get into the source dir before using git (#68)
1 parent 673cda0 commit dcd9c59

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

continuous-delivery/publish_to_prod_pypi.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ phases:
99
- python3 -m pip install --user --upgrade twine setuptools wheel boto3 PyOpenSSL six
1010
pre_build:
1111
commands:
12+
- cd aws-iot-device-sdk-python-v2
1213
- pypirc=$(aws secretsmanager get-secret-value --secret-id "prod/aws-crt-python/.pypirc" --query "SecretString" | cut -f2 -d\") && echo "$pypirc" > ~/.pypirc
1314
- export PKG_VERSION=$(git describe --tags | cut -f2 -dv)
15+
- echo "Updating package version to ${PKG_VERSION}"
16+
- sed --in-place -E "s/version='.+'/version='${PKG_VERSION}'/" setup.py
1417
build:
1518
commands:
16-
- echo Build started on `date`
17-
- cd aws-iot-device-sdk-python-v2
18-
- sed --in-place -E "s/version='.+'/version='${PKG_VERSION}'/" setup.py
19+
- echo Build started on `date`
1920
- python3 setup.py sdist bdist_wheel --universal
2021
- python3 -m twine upload -r pypi dist/*
2122
post_build:

continuous-delivery/publish_to_test_pypi.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ 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+
- cd aws-iot-device-sdk-python-v2
1314
- export PKG_VERSION=$(git describe --tags | cut -f2 -dv)
15+
- echo "Updating package version to ${PKG_VERSION}"
16+
- sed --in-place -E "s/version='.+'/version='${PKG_VERSION}'/" setup.py
1417
build:
1518
commands:
16-
- echo Build started on `date`
17-
- cd aws-iot-device-sdk-python-v2
18-
- sed --in-place -E "s/version='.+'/version='${PKG_VERSION}'/" setup.py
19+
- echo Build started on `date`
1920
- python3 setup.py sdist bdist_wheel --universal
2021
- python3 -m twine upload -r testpypi dist/*
2122
post_build:

0 commit comments

Comments
 (0)