-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b0272f
commit 143a730
Showing
1 changed file
with
10 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#!/bin/bash | ||
|
||
repo=theporndatabase | ||
version=$(cat pyproject.toml | grep -m1 "version = " | sed 's/.* = //' | sed 's/"//g' | tr -d '[:space:]') | ||
|
||
BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') | ||
CLEAN=$(git diff-index --quiet HEAD; echo $?) | ||
version=$(cat pyproject.toml | grep -m1 "version = " | sed 's/.* = //' | sed 's/"//g') | ||
#if [[ "${CLEAN}" == "0" ]]; then | ||
export BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') | ||
export GIT_HASH=$(git rev-parse --verify HEAD) | ||
export repo=theporndatabase | ||
docker build . --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "GIT_HASH=${GIT_HASH}" --build-arg "PROJECT_VERSION=${version}" -t "ghcr.io/${repo}/namer:${version}" -t "ghcr.io/${repo}/namer:latest" | ||
#else | ||
# echo Not building for dirty code. | ||
#fi | ||
export BUILD_DATE | ||
|
||
GIT_HASH=$(git rev-parse --verify HEAD) | ||
export GIT_HASH | ||
|
||
docker build . --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "GIT_HASH=${GIT_HASH}" --build-arg "PROJECT_VERSION=${version}" -t "ghcr.io/${repo}/namer:${version}" -t "ghcr.io/${repo}/namer:latest" |