variabilized build script, added makefile
make is good, make is life, use make
This commit is contained in:
1 parent
8533c8bf5c
commit
c5d7ae2e96
3 files changed
+20
-3
No files matched your search
@@ -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
|
||||
@@ -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
|
||||
Reference in new issue
Block a user