Skip to content

Commit

Permalink
Skip rustfmt, fix git switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Bromeon committed Jun 23, 2024
1 parent 65dc8d9 commit 1f1028f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/other/apply-doc-cfg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ done

if [[ "$rustfmt" == "true" ]]; then
echo "$PRE Format code using rustfmt..."
cargo fmt
cargo fmt --all
fi

echo "$PRE Docs post-processed."
10 changes: 6 additions & 4 deletions .github/workflows/release-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
# Backup current repo, so we can checkout.
mkdir -p /tmp/repo
rsync -av --exclude .git --exclude target ./ /tmp/repo/
git switch releases || git switch --orphan releases
git fetch origin releases && git switch releases || git switch --orphan releases
find . -mindepth 1 -maxdepth 1 ! -name '.git' -exec rm -rf {} +
# Restore.
rsync -av --ignore-existing /tmp/repo/ .
Expand All @@ -167,13 +167,15 @@ jobs:
git config user.name "Godot-Rust Automation"
git config user.email "GodotRust@users.noreply.github.com"
git add .
git commit -m "Repo state for v${{ env.GDEXT_PUBLISHED_VERSION }}."
git commit -m "Repo state for v${{ env.GDEXT_PUBLISHED_VERSION }}"
- name: "Apply #[doc(cfg(...))]"
run: .github/other/apply-doc-cfg.sh --install-sd --rustfmt
# Skip --rustfmt, as it causes weird reformatting of quote! {} statements.
# #[doc(cfg(...))] on the same line is the lesser evil.
run: .github/other/apply-doc-cfg.sh --install-sd

- name: "Commit post-processed changes"
run: git commit -am "Postprocess docs for v${{ env.GDEXT_PUBLISHED_VERSION }}."
run: git commit -am "Postprocess docs for v${{ env.GDEXT_PUBLISHED_VERSION }}"

- name: "Push changes"
run: git push origin releases
Expand Down

0 comments on commit 1f1028f

Please sign in to comment.