Skip to content

Commit

Permalink
shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Jun 12, 2020
1 parent b54532b commit 644e37c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .travis/affects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

(
set -x
git diff --name-only $TRAVIS_COMMIT_RANGE
git diff --name-only "$TRAVIS_COMMIT_RANGE"
)

for file in $(git diff --name-only $TRAVIS_COMMIT_RANGE); do
for file in $(git diff --name-only "$TRAVIS_COMMIT_RANGE"); do
if [[ $file =~ ^"$1" ]]; then
exit 0
fi
Expand Down
8 changes: 4 additions & 4 deletions .travis/export-github-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ pip3 install git-filter-repo
declare subdir=$1
declare repo_name=$2

[[ -n $subdir ]] || {
[[ -n "$subdir" ]] || {
echo "Error: subdir not specified"
exit 1
}
[[ -n $repo_name ]] || {
[[ -n "$repo_name" ]] || {
echo "Error: repo_name not specified"
exit 1
}
Expand All @@ -30,9 +30,9 @@ echo "Exporting $subdir"

set -x
rm -rf .github_export/"$repo_name"
git clone https://${GITHUB_TOKEN}@github.com/solana-labs/"$repo_name" .github_export/"$repo_name"
git clone https://"$GITHUB_TOKEN"@github.com/solana-labs/"$repo_name" .github_export/"$repo_name"

# TODO: Try using `--refs $TRAVIS_COMMIT_RANGE` to speed up the filtering
git filter-repo --subdirectory-filter "$subdir" --target .github_export/"$repo_name"

git -C .github_export/"$repo_name" push https://${GITHUB_TOKEN}@github.com/solana-labs/"$repo_name"
git -C .github_export/"$repo_name" push https://"$GITHUB_TOKEN"@github.com/solana-labs/"$repo_name"

0 comments on commit 644e37c

Please sign in to comment.