From d2c0e6b25d796269e1fc2388fbc36f03a69ed1d5 Mon Sep 17 00:00:00 2001 From: Jon Pretty Date: Sat, 19 Nov 2022 11:17:20 +0100 Subject: [PATCH] Don't store version number in two places --- Dockerfile | 9 +++++---- Makefile | 2 +- build.irk | 2 +- doc/.version | 1 - 4 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 doc/.version diff --git a/Dockerfile b/Dockerfile index de4b57b..fa16463 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ FROM openjdk:11 +RUN apt update +RUN apt install -y jq RUN mkdir /irk RUN git clone https://github.com/lampepfl/dotty /irk/scala RUN mkdir -p /irk/bin @@ -170,13 +172,13 @@ RUN unzip -q -o -d /irk/bin /irk/scala/dist/target/pack/lib/scala3-interfaces*.j RUN unzip -q -o -d /irk/bin /irk/scala/dist/target/pack/lib/scala3-tasty-inspector*.jar RUN unzip -q -o -d /irk/bin /irk/scala/dist/target/pack/lib/scala-asm*.jar RUN cp /one/mod/exoskeleton/res/exoskeleton/invoke /irk/bin/exoskeleton/invoke -ADD doc/.version /irk/.version +ADD build.irk /irk/build.irk RUN echo 'Manifest-Version: 1.0' > /irk/manifest RUN echo -n 'Created-By: Irk ' >> /irk/manifest -RUN cat /irk/.version >> /irk/manifest +RUN jq -r '.modules[0].version' /irk/build.irk >> /irk/manifest RUN echo 'Implementation-Title: Irk' >> /irk/manifest RUN echo -n 'Implementation-Version: ' >> /irk/manifest -RUN cat /irk/.version >> /irk/manifest +RUN jq -r '.modules[0].version' /irk/build.irk >> /irk/manifest RUN echo 'Main-Class: irk.Irk' >> /irk/manifest RUN jar cmf /irk/manifest /irk/irk.jar \ @@ -234,7 +236,6 @@ RUN jar cmf /irk/manifest /irk/irk.jar \ RUN cat /one/mod/exoskeleton/res/exoskeleton/invoke /irk/irk.jar > /irk/bootstrap RUN chmod +x /irk/bootstrap RUN rm /irk/irk.jar -ADD build.irk /irk/build.irk RUN cd /irk && ./bootstrap RUN mv /irk/irk /irk/irk-bootstrap RUN rm -rf /root/.cache/irk diff --git a/Makefile b/Makefile index a930cef..e035919 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = $(shell cat doc/.version) +VERSION = $(shell jq -r '.modules[0].version' build.irk) distribution: dist/irk-$(VERSION) dist/launcher-$(VERSION) diff --git a/build.irk b/build.irk index c0cddc6..15011d0 100644 --- a/build.irk +++ b/build.irk @@ -26,7 +26,7 @@ "exoskeleton/core", "anticipation/time", "imperial/core", "tarantula/core", "surveillance/core", "escritoire/core", "oubliette/core"], "sources": ["src/core"], - "version": "0.6.0", + "version": "0.6.1", "docs": ["doc"], "artifact": { "main": "irk.Irk", diff --git a/doc/.version b/doc/.version deleted file mode 100644 index a918a2a..0000000 --- a/doc/.version +++ /dev/null @@ -1 +0,0 @@ -0.6.0