diff --git a/.github/other/apply-doc-cfg.sh b/.github/other/apply-doc-cfg.sh index be077e833..7ea7b5e79 100755 --- a/.github/other/apply-doc-cfg.sh +++ b/.github/other/apply-doc-cfg.sh @@ -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." diff --git a/.github/workflows/release-version.yml b/.github/workflows/release-version.yml index eda323c4b..56d6e63f9 100644 --- a/.github/workflows/release-version.yml +++ b/.github/workflows/release-version.yml @@ -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/ . @@ -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