From 6a336f0167393318639b6bc1c9ccf0484219c970 Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Wed, 8 Apr 2020 14:16:48 +0200
Subject: Rewrite the build-docker action
---
lib/main.bash | 39 +++++++++++++++++++++++----------------
1 file changed, 23 insertions(+), 16 deletions(-)
(limited to 'lib/main.bash')
diff --git a/lib/main.bash b/lib/main.bash
index c535ba5..7b08ed6 100644
--- a/lib/main.bash
+++ b/lib/main.bash
@@ -27,10 +27,11 @@ main() {
# Declare some global variables
declare -a RSTAR_TOOLS
- declare RSTAR_BACKEND=moar
- declare RSTAR_PREFIX="$BASEDIR"
declare -A RSTAR_PLATFORM
+ [[ -z $RSTAR_BACKEND ]] && RSTAR_BACKEND="moar"
+ [[ -z $RSTAR_PREFIX ]] && RSTAR_PREFIX="$BASEDIR"
+
# Figure out system details
debug "Discovering system information"
discover_system
@@ -74,6 +75,7 @@ usage() {
cat <
rstar clean [-s]
rstar dist [version]
rstar fetch
@@ -84,20 +86,25 @@ Usage:
rstar is the entry point for all utilities to deal with Rakudo Star.
Actions:
- clean Clean up the repository. If -s is given, the src directory
- will also be removed.
- dist Create a distributable tarball of this repository. If no
- version identifier is specified, it will use the current year
- and month in "yyyy.mm" notation.
- fetch Fetch all required sources.
- install Install Raku on this system. By default, MoarVM will be used
- as the only backend, and the Rakudo Star directory will be
- used as prefix. If neither core nor modules are given as
- explicit targets, all targets will be installed.
- sysinfo Show information about your system. Useful for debugging.
- test Run tests on Raku and the bundled ecosystem modules. If
- neither spectest nor modules are given as explicit targets,
- all targets will be tested.
+ build-docker Build a Docker image for Rakudo Star. You can specify the
+ tag of the resulting image using -T, which will cause -d,
+ -t, and -l to be ignored. -n specifies the name of the
+ image. If -l is passed, a "latest" tag will also be made.
+ You can specify a specific backend with -b.
+ clean Clean up the repository. If -s is given, the src
+ directory will also be removed.
+ dist Create a distributable tarball of this repository. If no
+ version identifier is specified, it will use the current
+ year and month in "yyyy.mm" notation.
+ fetch Fetch all required sources.
+ install Install Raku on this system. By default, MoarVM will be
+ used as the only backend, and the Rakudo Star directory
+ will be used as prefix. If neither core nor modules are
+ given as explicit targets, all targets will be installed.
+ sysinfo Show information about your system. Useful for debugging.
+ test Run tests on Raku and the bundled ecosystem modules. If
+ neither spectest nor modules are given as explicit
+ targets, all targets will be tested.
EOF
}
--
cgit v1.1