Skip to content

Commit

Permalink
update workflow to align updated filename
Browse files Browse the repository at this point in the history
  • Loading branch information
brentchang committed Dec 3, 2023
1 parent 92e033d commit 4627d63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/scripts/clasp_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@ function contains_changes() {
changed_files=$(echo "${@:1}" | xargs realpath | xargs -I {} dirname {}| sort -u | uniq)
dirs=()

IFS=$'\n' read -r -d '' -a dirs < <( find . -name '.clasp.json' -exec dirname '{}' \; | sort -u | xargs realpath )
IFS=$'\n' read -r -d '' -a dirs < <( find . -name '.clasp.google-only.json' -exec dirname '{}' \; | sort -u | xargs realpath )

exit_code=0

for dir in "${dirs[@]}"; do
pushd "${dir}" > /dev/null || exit
contains_changes "$dir" "${changed_files[@]}" || continue
echo "Publishing ${dir}"
mv ./.clasp.google-only.json ./.clasp.json
clasp push -f
mv ./.clasp.json ./.clasp.google-only.json
status=$?
if [ $status -ne 0 ]; then
exit_code=$status
Expand Down

0 comments on commit 4627d63

Please sign in to comment.