Skip to content

Commit

Permalink
Switched deployment scripts to use release format tags instead of… (#54)
Browse files Browse the repository at this point in the history
* Switched deployment scripts to use any release format tags instead of annotated tags on master

* Added aws-c-compression to manifest

* Disable caching on pip installs
  • Loading branch information
Justin Boswell authored Jun 19, 2019
1 parent 98f0d37 commit 58d35c7
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 15 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
graft source
graft aws-c-common
graft aws-c-io
graft aws-c-compression
graft s2n
graft aws-c-mqtt
graft aws-c-cal
Expand Down
2 changes: 1 addition & 1 deletion codebuild/cd/test_prod_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ phases:
commands:
- echo Build started on `date`
- cd aws-crt-python
- CURRENT_TAG_VERSION=$(git describe --abbrev=0)
- CURRENT_TAG_VERSION=$(git describe --tags | cut -f2 -dv)
- python3 -m pip install --user awscrt==$CURRENT_TAG_VERSION
- python3 continuous-delivery/test-pip-install.py
post_build:
Expand Down
2 changes: 1 addition & 1 deletion codebuild/cd/test_test_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ phases:
commands:
- echo Build started on `date`
- cd aws-crt-python
- CURRENT_TAG_VERSION=$(git describe --abbrev=0)
- CURRENT_TAG_VERSION=$(git describe --tags | cut -f2 -dv)
- python3 -m pip install -i https://testpypi.python.org/simple --user awscrt==$CURRENT_TAG_VERSION
- python3 continuous-delivery/test-pip-install.py
post_build:
Expand Down
7 changes: 4 additions & 3 deletions continuous-delivery/sanity-check-test-pypi.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FOR /F "delims=" %%A in ('git describe --abbrev^=0') do ( set CURRENT_VERSION=%%A )
FOR /F "delims=" %%A in ('git describe --tags') do ( set TAG_VERSION=%%A )
set CURRENT_VERSION=%TAG_VERSION:v=%

"C:\Program Files\Python37\python.exe" -m pip install -i https://testpypi.python.org/simple --user awscrt==%CURRENT_VERSION% || goto error
"C:\Program Files\Python37\python.exe" -m pip install --no-cache-dir -i https://testpypi.python.org/simple --user awscrt==%CURRENT_VERSION% || goto error
"C:\Program Files\Python37\python.exe" continuous-delivery\test-pip-install.py || goto error

"C:\Python27\python.exe" -m pip install -i https://testpypi.python.org/simple --user awscrt==%CURRENT_VERSION% || goto error
"C:\Python27\python.exe" -m pip install --no-cache-dir -i https://testpypi.python.org/simple --user awscrt==%CURRENT_VERSION% || goto error
"C:\Python27\python.exe" continuous-delivery\test-pip-install.py || goto error

goto :EOF
Expand Down
8 changes: 4 additions & 4 deletions continuous-delivery/sanity-check-test-pypi.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
set -e
CURRENT_TAG_VERSION=$(git describe --abbrev=0)
python3 -m pip install -i https://testpypi.python.org/simple --user awscrt==$CURRENT_TAG_VERSION
set -ex
CURRENT_TAG_VERSION=$(git describe --tags | cut -f2 -dv)
python3 -m pip install --no-cache-dir -i https://testpypi.python.org/simple --user awscrt==$CURRENT_TAG_VERSION
python3 continuous-delivery/test-pip-install.py

python -m pip install -i https://testpypi.python.org/simple --user awscrt==$CURRENT_TAG_VERSION
python -m pip install --no-cache-dir -i https://testpypi.python.org/simple --user awscrt==$CURRENT_TAG_VERSION
python continuous-delivery/test-pip-install.py

18 changes: 13 additions & 5 deletions continuous-delivery/test-version-exists
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
#!/usr/bin/env bash
set -e
set -ex
#force a failure if there's no tag
git describe --abbrev=0
#now get the tag
CURRENT_TAG_VERSION=$(git describe --abbrev=0)
if pip install -vvv awscrt==$CURRENT_TAG_VERSION; then
git describe --tags
# now get the tag
CURRENT_TAG=$(git describe --tags | cut -f2 -dv)
# convert v0.2.12-2-g50254a9 to 0.2.12
CURRENT_TAG_VERSION=$(git describe --tags | cut -f1 -d'-' | cut -f2 -dv)
# if there's a hash on the tag, then this is not a release tagged commit
if [ "$CURRENT_TAG" != "$CURRENT_TAG_VERSION" ]; then
echo "Current tag version is not a release tag, cut a new release if you want to publish."
exit 1
fi

if pip install --no-cache-dir -vvv awscrt==$CURRENT_TAG_VERSION; then
echo "$CURRENT_TAG_VERSION is already in pypi, cut a new tag if you want to upload another version."
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def get_from_env(key):

setuptools.setup(
name="awscrt",
version="v0.2.18",
version="v0.2.22",
author="Amazon Web Services, Inc",
author_email="[email protected]",
description="A common runtime for AWS Python projects",
Expand Down

0 comments on commit 58d35c7

Please sign in to comment.