Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve on ShellCheck and Markdown sprinkle, from #19 #21

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/rebar3_depup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ git config user.name "GitHub Actions"
git config user.email "[email protected]"

BRANCH=feature/rebar3-depup-updates

if git branch -a | grep "${BRANCH}" >/dev/null || true; then
# already exists
if (git branch -a || true) | grep "${BRANCH}" >/dev/null; then
# exists
exit
fi

Expand All @@ -18,15 +17,15 @@ mkdir -p "${HOME}/.config/rebar3"
echo "{plugins, [rebar3_depup]}." >"${HOME}/.config/rebar3/rebar.config"
rebar3 up

if ! git diff --exit-code 1>/dev/null; then
if ! git diff --exit-code >/dev/null; then
# there's stuff to push
TITLE="[automation] Update \`rebar.config\` versions (via \`rebar3 depup\`)"

# there's stuff to push
git add rebar.config
git commit -m "${TITLE}"
git push origin "${BRANCH}"

gh pr create --fill \
--title "${TITLE}" \
--body "This is an automated action to update the repositories rebar.config versions"
--body "This is an automated action to update the repository's \`rebar.config\` versions."
fi