Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Commit

Permalink
fix make release-docker to remove sudo since docker container runs …
Browse files Browse the repository at this point in the history
…as root (#2650)
  • Loading branch information
davidvonthenen authored Dec 3, 2021
1 parent 2a659e2 commit 514c57b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions hack/ensure-deps/ensure-gh-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ set -o nounset
set -o pipefail
set -o xtrace

TCE_CI_BUILD="${TCE_CI_BUILD:-""}"
BUILD_OS=$(uname 2>/dev/null || echo Unknown)
BUILD_ARCH=$(uname -m 2>/dev/null || echo Unknown)
GH_CLI_VERSION="2.2.0"

SUDO_CMD="sudo"
if [[ "${TCE_CI_BUILD}" == "true" ]]; then
SUDO_CMD=""
fi

CMD="gh"
if [[ -z "$(command -v ${CMD})" ]]; then
echo "Attempting install of ${CMD}..."
Expand All @@ -23,7 +29,7 @@ case "${BUILD_OS}" in
tar -xvf gh_${GH_CLI_VERSION}_linux_amd64.tar.gz
pushd "./gh_${GH_CLI_VERSION}_linux_amd64/bin" || exit 1
chmod +x ${CMD}
sudo install ./${CMD} /usr/local/bin
${SUDO_CMD} install ./${CMD} /usr/local/bin
popd || exit 1
rm -rf ./gh_${GH_CLI_VERSION}_linux_amd64
rm gh_${GH_CLI_VERSION}_linux_amd64.tar.gz
Expand All @@ -35,7 +41,7 @@ case "${BUILD_OS}" in
tar -xvf gh_${GH_CLI_VERSION}_macOS_amd64.tar.gz
pushd "./gh_${GH_CLI_VERSION}_macOS_amd64/bin" || exit 1
chmod +x ${CMD}
sudo install ./${CMD} /usr/local/bin
${SUDO_CMD} install ./${CMD} /usr/local/bin
popd || exit 1
rm -rf ./gh_${GH_CLI_VERSION}_macOS_amd64
rm gh_${GH_CLI_VERSION}_macOS_amd64.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion hack/fix-for-ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ set -o xtrace

# make user CI directory
apt update
apt install make zip unzip curl sudo
apt install make zip unzip curl

0 comments on commit 514c57b

Please sign in to comment.