Skip to content

Commit d1ef3d3

Browse files
pks-tgitster
authored andcommitted
ci: merge custom PATH directories
We're downloading various executables required by our tests. Each of these executables goes into its own directory, which is then appended to the PATH variable. Consequently, whenever we add a new dependency and thus a new directory, we would have to adapt to this change in several places. Refactor this to instead put all binaries into a single directory. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 40c60f4 commit d1ef3d3

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

ci/install-dependencies.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@ ubuntu-*)
2929
libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl \
3030
$CC_PACKAGE $PYTHON_PACKAGE
3131

32-
mkdir --parents "$P4_PATH"
33-
wget --quiet --directory-prefix="$P4_PATH" \
32+
mkdir --parents "$CUSTOM_PATH"
33+
wget --quiet --directory-prefix="$CUSTOM_PATH" \
3434
"$P4WHENCE/bin.linux26x86_64/p4d" "$P4WHENCE/bin.linux26x86_64/p4"
35-
chmod u+x "$P4_PATH/p4d" "$P4_PATH/p4"
35+
chmod u+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4"
3636

37-
mkdir --parents "$GIT_LFS_PATH"
3837
wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
3938
tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" \
40-
-C "$GIT_LFS_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs"
39+
-C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs"
4140
rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
4241
;;
4342
macos-*)
@@ -48,10 +47,10 @@ macos-*)
4847
brew install $BREW_INSTALL_PACKAGES
4948
brew link --force gettext
5049

51-
mkdir -p "$P4_PATH"
50+
mkdir -p "$CUSTOM_PATH"
5251
wget -q "$P4WHENCE/bin.macosx1015x86_64/helix-core-server.tgz" &&
53-
tar -xf helix-core-server.tgz -C "$P4_PATH" p4 p4d &&
54-
sudo xattr -d com.apple.quarantine "$P4_PATH/p4" "$P4_PATH/p4d" 2>/dev/null || true
52+
tar -xf helix-core-server.tgz -C "$CUSTOM_PATH" p4 p4d &&
53+
sudo xattr -d com.apple.quarantine "$CUSTOM_PATH/p4" "$CUSTOM_PATH/p4d" 2>/dev/null || true
5554
rm helix-core-server.tgz
5655

5756
if test -n "$CC_PACKAGE"

ci/lib.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -340,23 +340,19 @@ ubuntu-*)
340340
# image.
341341
# Keep that in mind when you encounter a broken OS X build!
342342
export LINUX_GIT_LFS_VERSION="1.5.2"
343-
344-
P4_PATH="$HOME/custom/p4"
345-
GIT_LFS_PATH="$HOME/custom/git-lfs"
346-
export PATH="$GIT_LFS_PATH:$P4_PATH:$PATH"
347343
;;
348344
macos-*)
349345
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)"
350346
if [ "$jobname" != osx-gcc ]
351347
then
352348
MAKEFLAGS="$MAKEFLAGS APPLE_COMMON_CRYPTO_SHA1=Yes"
353349
fi
354-
355-
P4_PATH="$HOME/custom/p4"
356-
export PATH="$P4_PATH:$PATH"
357350
;;
358351
esac
359352

353+
CUSTOM_PATH="$HOME/path"
354+
export PATH="$CUSTOM_PATH:$PATH"
355+
360356
case "$jobname" in
361357
linux32)
362358
CC=gcc

0 commit comments

Comments
 (0)