mirror of
https://github.com/guggero/chantools.git
synced 2026-08-13 12:33:34 +02:00
make+release.sh: add release helper script for docker
This commit is contained in:
parent
0f09a63b90
commit
69c5c28d0a
2 changed files with 16 additions and 0 deletions
4
Makefile
4
Makefile
|
|
@ -81,6 +81,10 @@ release:
|
|||
rm -rf chantools-v*
|
||||
./release.sh build-release "$(VERSION_TAG)" "$(BUILD_SYSTEM)" "$(RELEASE_LDFLAGS)"
|
||||
|
||||
docker-release:
|
||||
@$(call print, "Creating docker release of chantools.")
|
||||
./release.sh docker-release "$(VERSION_TAG)"
|
||||
|
||||
docker-tools:
|
||||
@$(call print, "Building tools docker image.")
|
||||
docker build -q -t chantools-tools $(TOOLS_DIR)
|
||||
|
|
|
|||
12
release.sh
12
release.sh
|
|
@ -10,6 +10,7 @@
|
|||
set -e
|
||||
|
||||
PKG="github.com/lightninglabs/chantools"
|
||||
DOCKER_USER="guggero"
|
||||
PACKAGE=chantools
|
||||
|
||||
# green prints one line of green text (if the terminal supports it).
|
||||
|
|
@ -79,6 +80,13 @@ function build_release() {
|
|||
shasum -a 256 * >manifest-$tag.txt
|
||||
}
|
||||
|
||||
# docker_release builds the Docker images for all supported platforms.
|
||||
# arguments: <version-tag>
|
||||
function docker_release() {
|
||||
local tag=$1
|
||||
docker buildx build --platform linux/arm64,linux/amd64 --tag $DOCKER_USER/$PACKAGE:$tag --output "type=registry" .
|
||||
}
|
||||
|
||||
# usage prints the usage of the whole script.
|
||||
function usage() {
|
||||
red "Usage: "
|
||||
|
|
@ -103,6 +111,10 @@ build-release)
|
|||
green "Building release"
|
||||
build_release "$@"
|
||||
;;
|
||||
docker-release)
|
||||
green "Building docker release"
|
||||
docker_release "$@"
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue