release: Add an option for only building a native toolchain
This commit is contained in:
1 parent
2094638569
commit
869b038152
1 file changed
+11
-2
+11
-2
@@ -17,18 +17,27 @@
|
|||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
if [ $# -lt 1 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
echo $0 tag
|
echo $0 tag [nativeonly]
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TAG=$1
|
TAG=$1
|
||||||
|
|
||||||
|
if [ "$2" = "nativeonly" ]; then
|
||||||
|
NATIVEONLY=1
|
||||||
|
fi
|
||||||
|
|
||||||
time docker build -f Dockerfile . -t mstorsjo/llvm-mingw:latest -t mstorsjo/llvm-mingw:$TAG
|
time docker build -f Dockerfile . -t mstorsjo/llvm-mingw:latest -t mstorsjo/llvm-mingw:$TAG
|
||||||
time docker build -f Dockerfile.dev . -t mstorsjo/llvm-mingw:dev -t mstorsjo/llvm-mingw:dev-$TAG
|
|
||||||
|
|
||||||
DISTRO=ubuntu-18.04
|
DISTRO=ubuntu-18.04
|
||||||
docker run --rm mstorsjo/llvm-mingw:latest sh -c "cd /opt && mv llvm-mingw llvm-mingw-$TAG-ucrt-$DISTRO && tar -Jcvf - llvm-mingw-$TAG-ucrt-$DISTRO" > llvm-mingw-$TAG-ucrt-$DISTRO.tar.xz
|
docker run --rm mstorsjo/llvm-mingw:latest sh -c "cd /opt && mv llvm-mingw llvm-mingw-$TAG-ucrt-$DISTRO && tar -Jcvf - llvm-mingw-$TAG-ucrt-$DISTRO" > llvm-mingw-$TAG-ucrt-$DISTRO.tar.xz
|
||||||
|
|
||||||
|
if [ -n "$NATIVEONLY" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
time docker build -f Dockerfile.dev . -t mstorsjo/llvm-mingw:dev -t mstorsjo/llvm-mingw:dev-$TAG
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
for i in $temp_images; do
|
for i in $temp_images; do
|
||||||
docker rmi --no-prune $i || true
|
docker rmi --no-prune $i || true
|
||||||
|
|||||||
Reference in new issue
Block a user