From e74b3bbb768a2749c9870eab421caa20f5c2c7e6 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 28 Jul 2020 06:44:58 -0400 Subject: [PATCH] add docker build to release script --- bin/release.sh | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/bin/release.sh b/bin/release.sh index d985a3ef..846b1df7 100755 --- a/bin/release.sh +++ b/bin/release.sh @@ -24,18 +24,22 @@ OLD_VERSION="$(cat "$VERSION_FILE")" NEW_VERSION="$(bump_semver "$OLD_VERSION")" echo "[*] Fetching latest docs version" -sphinx-apidoc -o docs archivebox cd "$DIR/docs" git pull +cd "$DIR" + +echo "[+] Building docs" +sphinx-apidoc -o docs archivebox +cd "$DIR/docs" make html cd "$DIR" -if [ -z "$(git status --porcelain)" ] && [[ "$(git branch --show-current)" == "master" ]]; then - git pull -else - echo "[X] Commit your changes and make sure git is checked out on clean master." - exit 4 -fi +# if [ -z "$(git status --porcelain)" ] && [[ "$(git branch --show-current)" == "master" ]]; then +# git pull +# else +# echo "[X] Commit your changes and make sure git is checked out on clean master." +# exit 4 +# fi echo "[*] Bumping VERSION from $OLD_VERSION to $NEW_VERSION" echo "$NEW_VERSION" > "$VERSION_FILE" @@ -49,7 +53,7 @@ echo "[*] Cleaning up build dirs" cd "$DIR" rm -Rf build dist -echo "[*] Building sdist and bdist_wheel" +echo "[+] Building sdist and bdist_wheel" python3 setup.py sdist bdist_wheel echo "[^] Uploading to test.pypi.org" @@ -58,4 +62,13 @@ python3 -m twine upload --repository testpypi dist/* echo "[^] Uploading to pypi.org" python3 -m twine upload --repository pypi dist/* +echo "[+] Building docker image" +docker build . -t "archivebox,archivebox:latest,archivebox:$NEW_VERSION,nikisweeting/archivebox,docker.pkg.github.com/pirate/ArchiveBox/archivebox:$NEW_VERSION" + +echo "[^] Uploading docker image" +# docker login --username=dockerhubusername --email=email@example.com +# docker login docker.pkg.github.com --username githubusername +docker push nikisweeting/archivebox +docker push docker.pkg.github.com/pirate/ArchiveBox/archivebox:$NEW_VERSION + echo "[√] Done. Published version v$NEW_VERSION"