Skip to content

Commit

Permalink
Update build.sh to include new options for Docker image tag and PADD …
Browse files Browse the repository at this point in the history
…branch

Signed-off-by: Adam Warner <[email protected]>
  • Loading branch information
PromoFaux committed May 27, 2024
1 parent 5f8b177 commit 5ab7c19
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
usage() {
echo "Usage: $0 [-l] [-f <ftl_branch>] [-c <core_branch>] [-w <web_branch>] [-t <tag>] [use_cache]"
echo "Options:"
echo " -f, --ftlbranch <branch> Specify FTL branch (cannot be used in conjunction with -l)"
echo " -c, --corebranch <branch> Specify Core branch"
echo " -w, --webbranch <branch> Specify Web branch"
echo " -t, --tag <tag> Specify Docker image tag (default: pihole)"
echo " -l, --local Use locally built FTL binary (requires src/pihole-FTL file)"
echo " use_cache Enable caching (by default --no-cache is used)"
echo " -f, --ftlbranch <branch> Specify FTL branch (cannot be used in conjunction with -l)"
echo " -c, --corebranch <branch> Specify Core branch"
echo " -w, --webbranch <branch> Specify Web branch"
echo " -t, --tag <tag> Specify Docker image tag (default: pihole)"
echo " -l, --local Use locally built FTL binary (requires src/pihole-FTL file)"
echo " -v, --dockerversion <version> Specify a version number for the image (default: dev-unknown - must match following pattern: https://regex101.com/r/RsENuz/1)"
echo " -p, --paddbranch <branch> Specify PADD branch"
echo " use_cache Enable caching (by default --no-cache is used)"
echo ""
echo "If no options are specified, the following command will be executed:"
echo " docker buildx build src/. --tag pihole --no-cache"
Expand Down Expand Up @@ -67,6 +69,18 @@ while [[ $# -gt 0 ]]; do
shift
shift
;;
-v | --dockerversion)
PIHOLE_DOCKER_TAG="$2"
DOCKER_BUILD_CMD+=" --build-arg PIHOLE_DOCKER_TAG=$PIHOLE_DOCKER_TAG"
shift
shift
;;
-p | --paddbranch)
PADD_BRANCH="$2"
DOCKER_BUILD_CMD+=" --build-arg PADD_BRANCH=$PADD_BRANCH"
shift
shift
;;
use_cache)
DOCKER_BUILD_CMD=${DOCKER_BUILD_CMD/--no-cache/}
shift
Expand Down

0 comments on commit 5ab7c19

Please sign in to comment.