Skip to content

Commit

Permalink
build(scripts): lint with shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Frazer Smith committed Feb 23, 2021
1 parent 2a27d13 commit b15e3c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/publish-bundles
Expand Up @@ -10,7 +10,7 @@ if [[ $GITHUB_REF == refs/tags/v* ]]; then
git config --global user.name "$GIT_USER_NAME"
git config --global user.email "$GIT_USER_EMAIL"

git clone https://${GH_TOKEN_PUBLIC}@github.com/ajv-validator/ajv-dist.git ../ajv-dist
git clone https://"${GH_TOKEN_PUBLIC}"@github.com/ajv-validator/ajv-dist.git ../ajv-dist

rm -rf ../ajv-dist/dist
mkdir ../ajv-dist/dist
Expand All @@ -22,7 +22,7 @@ if [[ $GITHUB_REF == refs/tags/v* ]]; then
sed -E "s/\"version\": \"([^\"]*)\"/\"version\": \"$VERSION\"/" package.json > new_package.json
mv new_package.json package.json

if [[ `git status --porcelain` ]]; then
if [[ $(git status --porcelain) ]]; then
echo "Changes detected. Updating master branch..."
git add -A
git commit -m "$VERSION: updated by ajv workflow https://github.com/ajv-validator/ajv/actions/runs/$GITHUB_RUN_ID"
Expand Down
4 changes: 2 additions & 2 deletions scripts/publish-gh-pages
Expand Up @@ -8,7 +8,7 @@ rm -rf ../gh-pages

git config --global user.name "$GIT_USER_NAME"
git config --global user.email "$GIT_USER_EMAIL"
git clone -b gh-pages --single-branch https://${GH_TOKEN_PUBLIC}@github.com/ajv-validator/ajv.git ../gh-pages
git clone -b gh-pages --single-branch https://"${GH_TOKEN_PUBLIC}"@github.com/ajv-validator/ajv.git ../gh-pages
SOURCE=../gh-pages/_source
mkdir -p $SOURCE
cp *.md $SOURCE
Expand All @@ -21,7 +21,7 @@ node ./generate
sed -E "s/<img[^>]+ajv_logo[^>]+>//" index.md > new-index.md
mv new-index.md index.md

if [[ `git status --porcelain` ]]; then
if [[ $(git status --porcelain) ]]; then
echo "Changes detected. Updating gh-pages branch..."
git add -A
git commit -m "updated by ajv workflow https://github.com/ajv-validator/ajv/actions/runs/$GITHUB_RUN_ID"
Expand Down

0 comments on commit b15e3c5

Please sign in to comment.