fix(ping/rust): Don't set PR ref for master build (#79)
When building the `master` image we would previously mistakingly set the ref to the PR commit hash. This surfaced when testing a pull request from a fork. `master` would be pointed at the forks HEAD commit hash, but not the fork URL. Thus the build could not find the commit and would fail. See https://github.com/libp2p/rust-libp2p/pull/3154
This commit is contained in:
parent
17dcc6cd49
commit
da5bbf715a
|
@ -25,7 +25,7 @@
|
|||
|
||||
[groups.build_config.build_args]
|
||||
BINARY_NAME = '{{ .BinaryName }}'
|
||||
GIT_REF = '{{ $.Env.GitReference }}'
|
||||
GIT_REF = "master"
|
||||
{{ end }}
|
||||
|
||||
{{ if $.Env.GitReference }}
|
||||
|
|
|
@ -11,7 +11,7 @@ ARG GIT_TARGET=""
|
|||
RUN if [ ! -z "${GIT_TARGET}" ]; then sed -i "s,^git.*,git = \"https://${GIT_TARGET}\"," ./plan/Cargo.toml; fi
|
||||
|
||||
ARG GIT_REF=""
|
||||
RUN if [ ! -z "${GIT_REF}" ]; then sed -i "s/^rev.*/rev = \"${GIT_REF}\"/" ./plan/Cargo.toml; fi
|
||||
RUN if [ ! -z "${GIT_REF}" ]; then sed -i "s/^rev.*/branch = \"${GIT_REF}\"/" ./plan/Cargo.toml; fi
|
||||
|
||||
# Build the requested binary: Cargo will update lockfile on changed manifest (i.e. if one of the above `sed`s patched it).
|
||||
ARG BINARY_NAME
|
||||
|
|
Loading…
Reference in New Issue