aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2019-03-28 09:48:33 +0100
committerPatrick Spek <p.spek@tyil.nl>2019-03-28 09:48:33 +0100
commit8cbe04cfa7f2fd3c659f27c03df2f666a67ee42a (patch)
tree9cb66fa9e9d1263a3a45f7c521b76c997b6e6f8c
parent806b128c31cdf7fc75649f239281b4bfb68b7c71 (diff)
downloadApp::CPAN::UploadNotifier::IRC-8cbe04cfa7f2fd3c659f27c03df2f666a67ee42a.tar.gz
App::CPAN::UploadNotifier::IRC-8cbe04cfa7f2fd3c659f27c03df2f666a67ee42a.tar.bz2
Update mkdocker
-rwxr-xr-xdev-bin/mkdocker.pl619
1 files changed, 17 insertions, 2 deletions
diff --git a/dev-bin/mkdocker.pl6 b/dev-bin/mkdocker.pl6
index 61b8186..1a31160 100755
--- a/dev-bin/mkdocker.pl6
+++ b/dev-bin/mkdocker.pl6
@@ -4,19 +4,34 @@ use v6.c;
use JSON::Fast;
-sub MAIN ()
+#| Build a latest image, generally used for testing a new release before making
+#| it official.
+multi sub MAIN ("latest")
{
my IO::Path $basedir = $*PROGRAM.parent(2);
my %meta = $basedir.add("META6.json").slurp.&from-json;
run <<
docker build
- -t "{docker-tag(%meta)}"
-t "{docker-tag(%meta, version => "latest")}"
"$basedir.absolute()"
>>;
}
+#| Build a release image, which has it's tag set depending on the current
+#| version specified in META6.json.
+multi sub MAIN ("release")
+{
+ my IO::Path $basedir = $*PROGRAM.parent(2);
+ my %meta = $basedir.add("META6.json").slurp.&from-json;
+
+ run <<
+ docker build
+ -t "{docker-tag(%meta)}"
+ "$basedir.absolute()"
+ >>;
+}
+
#| Generate the docker tag.
sub docker-tag (
#| Hash of META6 info.