@@ -6,26 +6,23 @@ RUN wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add - && \
66 apt-get update && \
77 apt-get install -y llvm-8-dev libclang-8-dev git
88
9- RUN wget -O- https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
10-
11- COPY . /go/src/github.com/tinygo-org/tinygo
9+ COPY . /tinygo
1210
1311# remove submodules directories and re-init them to fix any hard-coded paths
1412# after copying the tinygo directory in the previous step.
15- RUN cd /go/src/github.com/tinygo-org/ tinygo/ && \
13+ RUN cd /tinygo/ && \
1614 rm -rf ./lib/* && \
1715 git submodule update --init --recursive --force
1816
19- RUN cd /go/src/github.com/tinygo-org/tinygo/ && \
20- dep ensure --vendor-only && \
21- go install /go/src/github.com/tinygo-org/tinygo/
17+ RUN cd /tinygo/ && \
18+ go install /tinygo/
2219
2320# tinygo-wasm stage installs the needed dependencies to compile TinyGo programs for WASM.
2421FROM tinygo-base AS tinygo-wasm
2522
2623COPY --from=tinygo-base /go/bin/tinygo /go/bin/tinygo
27- COPY --from=tinygo-base /go/src/github.com/ tinygo-org/tinygo/ src /go/src/github.com/tinygo-org /tinygo/src
28- COPY --from=tinygo-base /go/src/github.com/ tinygo-org/tinygo/ targets /go/src/github.com/tinygo-org /tinygo/targets
24+ COPY --from=tinygo-base /tinygo/ src /tinygo/src
25+ COPY --from=tinygo-base /tinygo/ targets /tinygo/targets
2926
3027RUN wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add - && \
3128 echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" >> /etc/apt/sources.list && \
@@ -36,13 +33,13 @@ RUN wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add - && \
3633FROM tinygo-base AS tinygo-avr
3734
3835COPY --from=tinygo-base /go/bin/tinygo /go/bin/tinygo
39- COPY --from=tinygo-base /go/src/github.com/ tinygo-org/tinygo/ src /go/src/github.com/tinygo-org /tinygo/src
40- COPY --from=tinygo-base /go/src/github.com/ tinygo-org/tinygo/ targets /go/src/github.com/tinygo-org /tinygo/targets
41- COPY --from=tinygo-base /go/src/github.com/ tinygo-org/tinygo/ Makefile /go/src/github.com/tinygo-org /tinygo/
42- COPY --from=tinygo-base /go/src/github.com/ tinygo-org/tinygo/ tools /go/src/github.com/tinygo-org /tinygo/tools
43- COPY --from=tinygo-base /go/src/github.com/ tinygo-org/tinygo/ lib /go/src/github.com/tinygo-org /tinygo/lib
36+ COPY --from=tinygo-base /tinygo/ src /tinygo/src
37+ COPY --from=tinygo-base /tinygo/ targets /tinygo/targets
38+ COPY --from=tinygo-base /tinygo/ Makefile /tinygo/
39+ COPY --from=tinygo-base /tinygo/ tools /tinygo/tools
40+ COPY --from=tinygo-base /tinygo/ lib /tinygo/lib
4441
45- RUN cd /go/src/github.com/tinygo-org/ tinygo/ && \
42+ RUN cd /tinygo/ && \
4643 apt-get update && \
4744 apt-get install -y apt-utils python3 make binutils-avr gcc-avr avr-libc && \
4845 make gen-device-avr && \
@@ -54,13 +51,13 @@ RUN cd /go/src/github.com/tinygo-org/tinygo/ && \
5451FROM tinygo-base AS tinygo-arm
5552
5653COPY --from=tinygo-base /go/bin/tinygo /go/bin/tinygo
57- COPY --from=tinygo-base /go/src/github.com/ tinygo-org/tinygo/ src /go/src/github.com/tinygo-org /tinygo/src
58- COPY --from=tinygo-base /go/src/github.com/ tinygo-org/tinygo/ targets /go/src/github.com/tinygo-org /tinygo/targets
59- COPY --from=tinygo-base /go/src/github.com/ tinygo-org/tinygo/ Makefile /go/src/github.com/tinygo-org /tinygo/
60- COPY --from=tinygo-base /go/src/github.com/ tinygo-org/tinygo/ tools /go/src/github.com/tinygo-org /tinygo/tools
61- COPY --from=tinygo-base /go/src/github.com/ tinygo-org/tinygo/ lib /go/src/github.com/tinygo-org /tinygo/lib
54+ COPY --from=tinygo-base /tinygo/ src /tinygo/src
55+ COPY --from=tinygo-base /tinygo/ targets /tinygo/targets
56+ COPY --from=tinygo-base /tinygo/ Makefile /tinygo/
57+ COPY --from=tinygo-base /tinygo/ tools /tinygo/tools
58+ COPY --from=tinygo-base /tinygo/ lib /tinygo/lib
6259
63- RUN cd /go/src/github.com/tinygo-org/ tinygo/ && \
60+ RUN cd /tinygo/ && \
6461 apt-get update && \
6562 apt-get install -y apt-utils python3 make clang-8 && \
6663 make gen-device-nrf && make gen-device-stm32 && \
@@ -71,11 +68,11 @@ RUN cd /go/src/github.com/tinygo-org/tinygo/ && \
7168# tinygo-all stage installs the needed dependencies to compile TinyGo programs for all platforms.
7269FROM tinygo-wasm AS tinygo-all
7370
74- COPY --from=tinygo-base /go/src/github.com/ tinygo-org/tinygo/ Makefile /go/src/github.com/tinygo-org /tinygo/
75- COPY --from=tinygo-base /go/src/github.com/ tinygo-org/tinygo/ tools /go/src/github.com/tinygo-org /tinygo/tools
76- COPY --from=tinygo-base /go/src/github.com/ tinygo-org/tinygo/ lib /go/src/github.com/tinygo-org /tinygo/lib
71+ COPY --from=tinygo-base /tinygo/ Makefile /tinygo/
72+ COPY --from=tinygo-base /tinygo/ tools /tinygo/tools
73+ COPY --from=tinygo-base /tinygo/ lib /tinygo/lib
7774
78- RUN cd /go/src/github.com/tinygo-org/ tinygo/ && \
75+ RUN cd /tinygo/ && \
7976 apt-get update && \
8077 apt-get install -y apt-utils python3 make clang-8 binutils-avr gcc-avr avr-libc && \
8178 make gen-device && \
0 commit comments