-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To make sure git commit hash properly passed
- Loading branch information
1 parent
029d75e
commit 0763487
Showing
2 changed files
with
27 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
|
||
GIT_COMMIT_HASH=$(git rev-parse --short HEAD) | ||
COMPOSE=docker-compose | ||
COMPOSE_FILE=compose.local.yaml | ||
|
||
if ! command -v $COMPOSE > /dev/null 2>&1; then | ||
if command -v podman-compose > /dev/null 2>&1; then | ||
COMPOSE=podman-compose | ||
else | ||
echo "Error: Neither docker-compose nor podman-compose found." | ||
exit 1 | ||
fi | ||
fi | ||
|
||
if ! [ -f "$COMPOSE_FILE" ]; then | ||
if [ -f "compose.yaml" ]; then | ||
COMPOSE_FILE=compose.yaml | ||
else | ||
echo "Error: Neither compose.local.yaml nor compose.yaml found." | ||
exit 1 | ||
fi | ||
fi | ||
|
||
$COMPOSE -f $COMPOSE_FILE down | ||
$COMPOSE -f $COMPOSE_FILE up -d --build |
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