variabilized build script, added makefile
make is good, make is life, use make
This commit is contained in:
parent
8533c8bf5c
commit
c5d7ae2e96
7
.makeVars
Normal file
7
.makeVars
Normal file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2024 Bryan Joshua Pedini
|
||||
# License: MIT · see LICENSE file for more details
|
||||
|
||||
export REGISTRY=bryanpedini
|
||||
export IMAGE=gobuilder
|
6
build.sh
Normal file → Executable file
6
build.sh
Normal file → Executable file
@ -8,8 +8,8 @@ REGEX="^[ ]*(#.*)?$"
|
||||
while read -r VERSION; do
|
||||
if [[ ! "${VERSION}" =~ $REGEX ]]; then
|
||||
docker pull golang:${VERSION}
|
||||
docker build --force-rm --build-arg GO_VERSION=${VERSION} -t bryanpedini/gobuilder:${VERSION} .
|
||||
docker push bryanpedini/gobuilder:${VERSION}
|
||||
docker image rm bryanpedini/gobuilder:${VERSION} golang:${VERSION}
|
||||
docker build --force-rm --build-arg GO_VERSION=${VERSION} -t ${REGISTRY}/${IMAGE}:${VERSION} .
|
||||
docker push ${REGISTRY}/${IMAGE}:${VERSION}
|
||||
docker image rm ${REGISTRY}/${IMAGE}:${VERSION} golang:${VERSION}
|
||||
fi
|
||||
done < versionlist
|
||||
|
Loading…
Reference in New Issue
Block a user