Skip to content

Commit

Permalink
chore: add bash directive to shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
yusinto committed Sep 21, 2023
1 parent 71ee878 commit ca881de
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions scripts/doc-name.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
# Given a path get the name for the documentation.
# ./scripts/doc-name.sh packages/sdk/server-node
# Produces something like:
Expand Down
1 change: 1 addition & 0 deletions scripts/package-name.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
# Given a path get the name of the package.
# ./scripts/package-name.sh packages/sdk/server-node
# Produces something like:
Expand Down
11 changes: 6 additions & 5 deletions scripts/publish-doc.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
# Run this script like:
# ./scripts/publish-doc.sh packages/sdk/node

Expand Down Expand Up @@ -55,24 +56,24 @@ set +e

while true
do

git pull origin gh-pages --no-edit # should accept the default message
after_pull_sha=$(git rev-parse HEAD)

# The first time this runs the head_sha will be empty and they will not match.
# If the push fails, then we pull again, and if the SHA does not change, then
# the push will not succeed.
if [ "$head_sha" == "$after_pull_sha" ]; then
echo "Failed to get changes. Could not publish docs."
exit 1
fi

head_sha=$after_pull_sha

if git push; then
break
fi

echo "Push failed, trying again."
done

Expand Down
1 change: 1 addition & 0 deletions scripts/publish.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
if $LD_RELEASE_IS_DRYRUN ; then
# Dry run just pack the workspace.
echo "Doing a dry run of publishing."
Expand Down
1 change: 1 addition & 0 deletions scripts/replace-version.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
# Run this script like:
# ./scripts/replace-version.sh packages/sdk/node

Expand Down

0 comments on commit ca881de

Please sign in to comment.