Skip to content

Commit

Permalink
workflow/push.yml: potentially fix enchantment texts being emptied
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPigGuy committed Dec 22, 2022
1 parent d104e05 commit 1133785
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Fetch Contributors
run: >
echo -e "// Code generated by .github/workflows/push.yml; DO NOT EDIT\n\npackage session\n\n// enchantNames are names translated to the 'Standard Galactic Alphabet' client-side. The names generally have no meaning\n// on the vanilla server implementation, so we can sneak some easter eggs in here without anyone noticing.\nvar enchantNames = []string{"$(curl -H "Accept: application/vnd.github+json" https://api.github.com/repos/df-mc/dragonfly/contributors?per_page=9999 | jq .[].login | sed -r -e "s/([^A-Z\"])([A-Z])/\1 \2/g" | sed "s/./\L&/g" | sort | sed -z "s/\n/,/g")"}" > server/session/enchantment_texts.go
- run: gofmt -w server/session/enchantment_texts.go
run: |
CONTRIBUTOR_DATA=$(curl -H "Accept: application/vnd.github+json" https://api.github.com/repos/df-mc/dragonfly/contributors?per_page=9999)
if [ $(echo $CONTRIBUTOR_DATA | jq length) != 0 ]; then echo -e "// Code generated by .github/workflows/push.yml; DO NOT EDIT\n\npackage session\n\n// enchantNames are names translated to the 'Standard Galactic Alphabet' client-side. The names generally have no meaning\n// on the vanilla server implementation, so we can sneak some easter eggs in here without anyone noticing.\nvar enchantNames = []string{"$(echo $CONTRIBUTOR_DATA | jq .[].login | sed -r -e "s/([^A-Z\"])([A-Z])/\1 \2/g" | sed "s/./\L&/g" | sort | sed -z "s/\n/,/g")"}" > server/session/enchantment_texts.go && gofmt -w server/session/enchantment_texts.go; fi
- name: Push Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down

0 comments on commit 1133785

Please sign in to comment.