Skip to content

Commit

Permalink
working out some bugs in version command
Browse files Browse the repository at this point in the history
  • Loading branch information
mbellotti committed Jan 7, 2022
1 parent 915cede commit 9807b85
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ NAME := fault-lang/fault
TAG := $$(git log -1 --pretty=%h)
IMG := ${NAME}:${TAG}
LATEST := ${NAME}:latest
VERSION := $$(git describe --tags --abbrev=0)

fault-z3:
$(shell touch "fault.Dockerfile")
cat Dockerfile ./solvers/z3.Dockerfile > fault.Dockerfile
@docker build -t ${NAME}-z3:${TAG} --no-cache --build-arg BUILD_VERSION=$(git describe --tags --abbrev=0) --build-arg BUILD_DATE=$(date) . -f fault.Dockerfile .
@docker build -t ${NAME}-z3:${TAG} --no-cache --build-arg BUILD_VERSION=${VERSION} --build-arg BUILD_DATE=$(date) -f fault.Dockerfile .
@docker tag ${NAME}-z3:${TAG} ${NAME}-z3:latest
@rm fault.Dockerfile
@cp fault-lang.sh /usr/local/bin/fault
Expand Down
2 changes: 1 addition & 1 deletion fault-lang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Help()
Version()
{
# Lookup the current version of Fault
docker inspect fault-lang/fault-z3 --format='{{ .Id }} {{ index .Config.Labels "org.opencontainers.image.version" }}'
docker inspect fault-lang/fault-z3 -f='{{ index .Config.Labels "org.opencontainers.image.version" }}'
}


Expand Down
10 changes: 4 additions & 6 deletions solvers/z3.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ ENV SOLVERARG="-in"
ENV FAULT_HOST="/host"

# set label info
LABEL org.opencontainers.image.vendor=""
LABEL org.opencontainers.image.vendor="Fault-lang"
LABEL org.opencontainers.image.authors="Marianne Bellotti"

LABEL org.opencontainers.image.created=${BUILD_DATE} \
org.opencontainers.image.version=${BUILD_VERSION} \
org.opencontainers.image.licenses="MIT" \

LABEL org.opencontainers.image.created=${BUILD_DATE}
LABEL org.opencontainers.image.version=${BUILD_VERSION}
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.description="Fault using Z3Solver as its engine"


Expand Down

0 comments on commit 9807b85

Please sign in to comment.