Skip to content

Commit

Permalink
Don't store version number in two places
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Nov 19, 2022
1 parent 2ed4478 commit d2c0e6b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
2 changes: 1 addition & 1 deletion build.irk
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion doc/.version

This file was deleted.

0 comments on commit d2c0e6b

Please sign in to comment.