Skip to content

Commit

Permalink
Format scripts using beautysh
Browse files Browse the repository at this point in the history
  • Loading branch information
infinisil committed Apr 17, 2024
1 parent 65c6f82 commit e0d6f01
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ let

programs.rustfmt.enable = true;
programs.nixfmt-rfc-style.enable = true;
programs.beautysh.enable = true;
};

results = {
Expand Down
6 changes: 3 additions & 3 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ version=$(nixeval "$root" -A version)
echo "Current version is $version"

if existingRelease=$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/"$repository"/releases/tags/"$version"); then
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/"$repository"/releases/tags/"$version"); then
echo "Release $version already exists, no new release necessary"
exit 0
else
Expand Down
12 changes: 6 additions & 6 deletions scripts/update-github-actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ job:
EOF

if create_pull_request=$(LOCAL_GITHUB_ACCESS_TOKEN="$githubToken" \
dependabot update --file "$tmp/input.yml" --local "$REPO_ROOT" \
| jq --exit-status 'select(.type == "create_pull_request").data'); then
dependabot update --file "$tmp/input.yml" --local "$REPO_ROOT" \
| jq --exit-status 'select(.type == "create_pull_request").data'); then

jq --exit-status --raw-output '."pr-body"' <<< "$create_pull_request"

jq --compact-output '."updated-dependency-files"[]' <<< "$create_pull_request" \
| while read -r fileUpdate; do
file=$(jq --exit-status --raw-output '.name' <<< "$fileUpdate")
# --join-output makes sure to not output a trailing newline
jq --exit-status --raw-output --join-output '.content' <<< "$fileUpdate" > "$REPO_ROOT/$file"
done
file=$(jq --exit-status --raw-output '.name' <<< "$fileUpdate")
# --join-output makes sure to not output a trailing newline
jq --exit-status --raw-output --join-output '.content' <<< "$fileUpdate" > "$REPO_ROOT/$file"
done
fi

echo '</details>'

0 comments on commit e0d6f01

Please sign in to comment.