File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,15 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
16
16
git \
17
17
gnupg \
18
18
jq \
19
+ libssl-dev \
20
+ openssl \
21
+ pkg-config \
19
22
python3 \
20
23
socat
21
24
22
25
# Install rustup while removing the pre-installed stable toolchain.
23
- RUN curl https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init >/tmp/rustup-init && \
24
- chmod +x /tmp/rustup-init && \
25
- /tmp/rustup-init -y --no-modify-path --profile minimal --default-toolchain stable && \
26
+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
27
+ sh -s -- -y --no-modify-path --profile minimal --default-toolchain stable && \
26
28
/root/.cargo/bin/rustup toolchain remove stable
27
29
ENV PATH=/root/.cargo/bin:$PATH
28
30
Original file line number Diff line number Diff line change @@ -101,6 +101,14 @@ for file in "${DOWNLOAD_STANDALONE[@]}"; do
101
101
download " ${file} "
102
102
done
103
103
104
+ # Build the promote-release binary if it hasn't been pre-built
105
+ if [[ ! -f " /src/target/release/promote-release" ]]; then
106
+ echo " ==> building promote-release"
107
+ cd /src
108
+ cargo build --release
109
+ cd ..
110
+ fi
111
+
104
112
echo " ==> configuring the environment"
105
113
# Point to the right GnuPG environment
106
114
export GNUPGHOME=/persistent/gpg-home
Original file line number Diff line number Diff line change @@ -43,8 +43,10 @@ if [[ "${container_status}" != "running" ]]; then
43
43
exit 1
44
44
fi
45
45
46
- # Ensure the release build is done
47
- cargo build --release
46
+ # Pre-built the binary if the host and Docker environments match
47
+ if [[ " $( uname) " == " Linux" ]]; then
48
+ cargo build --release
49
+ fi
48
50
49
51
# Run the command inside the docker environment.
50
52
docker-compose exec -T local " /src/local/${command} .sh" " ${channel} " " ${override_commit} "
You can’t perform that action at this time.
0 commit comments