66REPO_NAME := mbeacom/cloudendure-python
77SHA1 := $$(git log -1 --pretty=%h )
88CURRENT_BRANCH := $$(git symbolic-ref -q --short HEAD )
9+ LATEST_TAG := ${REPO_NAME}:latest
10+ GIT_TAG := ${REPO_NAME}:${SHA1}
11+ VERSION := v0.0.9
912
1013info : # # Show information about the current git state.
1114 @echo " Github Project: https://github.com/${REPO_NAME} \nCurrent Branch: ${CURRENT_BRANCH} \nSHA1: ${SHA1} \n"
@@ -16,12 +19,20 @@ build: ## Build the Gitcoin Web image.
1619 --pull \
1720 --build-arg BUILD_DATETIME=` date -u +" %Y-%m-%dT%H:%M:%SZ" ` \
1821 --build-arg " SHA1=${SHA1} " \
19- ${VERSION : + --build-arg " VERSION=$VERSION " } \
22+ --build-arg " VERSION=${ VERSION} " \
2023 -t " ${GIT_TAG} " .
2124 @docker tag " ${GIT_TAG} " " ${LATEST_TAG} "
25+ @docker tag " ${GIT_TAG} " " ${VERSION} "
26+
27+ gh_push : # # Push the Github Docker image.
28+ @docker tag ${GIT_TAG} docker.pkg.github.com/mbeacom/cloudendure-python/cloudendure:${VERSION}
29+ @docker push docker.pkg.github.com/mbeacom/cloudendure-python/cloudendure:${VERSION}
2230
2331login : # # Login to Docker Hub.
24- @docker log -u " ${DOCKER_USER} " -p " ${DOCKER_PASS} "
32+ @docker login -u " ${DOCKER_USER} " -p " ${DOCKER_PASS} "
33+
34+ gh_login : # # Login to Docker Hub.
35+ @docker login docker.pkg.github.com -u " ${DOCKER_GH_USER} " -p " ${DOCKER_GH_TOKEN} "
2536
2637push : # # Push the Docker image to the Docker Hub repository.
2738 @docker push " ${REPO_NAME} "
@@ -83,11 +94,11 @@ gen_client: ## Generate the swagger client from the API config.
8394update_deps : update_prereqs # # Update the package dependencies via pipenv.
8495 @pipenv update --pre --dev
8596
86- build : update_deps # # Build and package the project for PyPi source and wheel distribution.
87- @pipenv run python3 setup.py sdist bdist_wheel
88-
8997install : isort build # # Install the local development version of the module.
9098 @pipenv install .
9199
100+ build_py : update_deps # # Build and package the project for PyPi source and wheel distribution.
101+ @pipenv run python3 setup.py sdist bdist_wheel
102+
92103help : # # Show this help information.
93104 @grep -E ' ^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST ) | sort | awk ' BEGIN {FS = ":.*?## "}; {printf "\033[33m%-25s\033[0m %s\n", $$1, $$2}'
0 commit comments