]> git.puffer.fish Git - mirror/frr.git/commitdiff
docker: update alpine build enable set own version 10283/head
authorStephen Worley <sworley@nvidia.com>
Tue, 4 Jan 2022 18:14:51 +0000 (13:14 -0500)
committerStephen Worley <sworley@nvidia.com>
Tue, 4 Jan 2022 18:14:51 +0000 (13:14 -0500)
Add ability to set your own env for the version of the docker
container alpine image. This is useful for applications like GNS3
who pin a specific version to look for when they boot up. When you build
locally to test your code you can just set the version to 0 so you don't
have to update configs/scripts looking for a specific image version.

Also fix a shebang in docker start for alpine.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
docker/alpine/build.sh
docker/alpine/docker-start

index 22a36877c039d1f0f4301d86a05704b1845b0690..3132feb9f1e5ebee5bc761b3744f1589bb471092 100755 (executable)
@@ -6,7 +6,15 @@ set -x
 ##
 # Package version needs to be decimal
 ##
-GITREV="$(git rev-parse --short=10 HEAD)"
+
+##
+# Set GITREV=0 or similar in ENV if you want the tag to just be updated to -0
+# everytime for automation usage/scripts/etc locally.
+#
+# Ex) GITREV=0 ./build.sh
+##
+
+GITREV="${GITREV:=$(git rev-parse --short=10 HEAD)}"
 PKGVER="$(printf '%u\n' 0x$GITREV)"
 
 docker build \
index 698f4f93c9da7b521d93115b78900e5e070afd36..995cea411993c1eed833513afa3e53978618895c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/ash
+#!/bin/bash
 
 if [ -r "/lib/lsb/init-functions" ]; then
         . /lib/lsb/init-functions