Skip to content

Commit 42cb344

Browse files
committed
infra(site) Fix fetchPackages script when running locally
1 parent 9e8fab8 commit 42cb344

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/scripts/fetch.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#!/bin/bash
22
set -e # Exit with nonzero exit code if anything fails
33

4-
SOURCE_BRANCH="master"
5-
64
fetchPackages() {
75
# Fetch webpack-contrib (and various other) loader repositories
86
node ./src/utilities/fetch_packages.js "webpack-contrib" "-loader" "README.md" "./src/content/loaders"
@@ -15,10 +13,14 @@ fetchPackages() {
1513
node ./src/utilities/fetch_packages.js "webpack-contrib" "-extract-plugin" "README.md" "./src/content/plugins"
1614
}
1715

18-
if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]; then
19-
echo "PR running, not fetching packages."
20-
else
16+
# If not defined, means running locally, so, fetch packages
17+
if [ -z "$TRAVIS_PULL_REQUEST" ]; then
2118
fetchPackages
19+
# If defined and equal to false, means running in master, so, fetch packages
20+
elif [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
21+
fetchPackages
22+
else
23+
echo "PR running, not fetching packages."
2224
fi
2325

2426
# Fetch sponsors and backers from opencollective

0 commit comments

Comments
 (0)