Skip to content

Commit

Permalink
Correct build.sh to deal with paths with empty spaces
Browse files Browse the repository at this point in the history
When building the project at a path with empty spaces,
Docker was not able to correctly understand the path and
the build would fail.

Correct the way the path is returned, so Docker can correctly
understand it.

Signed-off-by: Ricardo Amaro <[email protected]>
  • Loading branch information
rjmAmaro committed Mar 18, 2021
1 parent ea631f9 commit a294364
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@

docker-compose -f docker/docker-compose-build.yaml build

docker run -it --rm -v $HOME/.m2:/root/.m2 -v `pwd`:/project/daml-on-sawtooth \
docker run -it --rm -v $HOME/.m2:/root/.m2 -v "$(pwd):/project/daml-on-sawtooth" \
daml-on-sawtooth-build-local:${ISOLATION_ID} mvn -B clean

docker run -it --rm -v $HOME/.m2:/root/.m2 -v `pwd`:/project/daml-on-sawtooth \
docker run -it --rm -v $HOME/.m2:/root/.m2 -v "$(pwd):/project/daml-on-sawtooth" \
daml-on-sawtooth-build-local:${ISOLATION_ID} mvn -B package

docker run -it --rm -v $HOME/.m2:/root/.m2 -v `pwd`:/project/daml-on-sawtooth \
docker run -it --rm -v $HOME/.m2:/root/.m2 -v "$(pwd):/project/daml-on-sawtooth" \
daml-on-sawtooth-build-local:${ISOLATION_ID} chown -R $UID:$GROUPS /root/.m2/repository

docker run -it --rm -v $HOME/.m2:/root/.m2 -v `pwd`:/project/daml-on-sawtooth \
docker run -it --rm -v $HOME/.m2:/root/.m2 -v "$(pwd):/project/daml-on-sawtooth" \
daml-on-sawtooth-build-local:${ISOLATION_ID} find /project -type d -name target \
-exec chown -R $UID:$GROUPS {} \;

Expand Down

0 comments on commit a294364

Please sign in to comment.