-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from dhs-ncats/improvement/automatic_deployment
Automatic deployment to Docker Hub via TravisCI
- Loading branch information
Showing
10 changed files
with
116 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import README.md | ||
import LICENSE.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#/usr/bin/env bash | ||
|
||
# bump_version.sh (show|major|minor|patch|prerelease|build) | ||
|
||
VERSION_FILE=trustymail/__init__.py | ||
|
||
HELP_INFORMATION="bump_version.sh (show|major|minor|patch|prerelease|build|finalize)" | ||
|
||
old_version=$(sed -n "s/^__version__ = '\(.*\)'$/\1/p" $VERSION_FILE) | ||
|
||
if [[ $# -ne 1 ]] | ||
then | ||
echo $HELP_INFORMATION | ||
else | ||
case $1 in | ||
major|minor|patch|prerelease|build) | ||
new_version=$(python -c "import semver; print(semver.bump_$1('$old_version'))") | ||
echo Changing version from $old_version to $new_version | ||
sed -i "s/$old_version/$new_version/" $VERSION_FILE | ||
git add $VERSION_FILE | ||
git commit -m"Bumped version from $old_version to $new_version" | ||
git push | ||
;; | ||
finalize) | ||
new_version=$(python -c "import semver; print(semver.finalize_version('$old_version'))") | ||
echo Changing version from $old_version to $new_version | ||
sed -i "s/$old_version/$new_version/" $VERSION_FILE | ||
git add $VERSION_FILE | ||
git commit -m"Bumped version from $old_version to $new_version" | ||
git push | ||
;; | ||
show) | ||
echo $old_version | ||
;; | ||
*) | ||
echo $HELP_INFORMATION | ||
;; | ||
esac | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
-e .[test] | ||
-e .[dev] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
version=$(./bump_version.sh show) | ||
|
||
git tag v$version && git push --tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
version=$(./bump_version.sh show) | ||
docker build -t ${IMAGE_NAME}:$version . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "$DOCKER_PW" | docker login -u "$DOCKER_USER" --password-stdin | ||
version=$(./bump_version.sh show) | ||
docker push "$IMAGE_NAME":$version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from __future__ import unicode_literals, absolute_import, print_function | ||
|
||
__version__ = '0.5.4-dev' | ||
__version__ = '0.5.5' | ||
|
||
PublicSuffixListFilename = 'public_suffix_list.dat' | ||
PublicSuffixListReadOnly = False |