Skip to content

Commit fd46cd8

Browse files
committed
Tweak generation to not compile too much
1 parent 70843f6 commit fd46cd8

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/update-generated-docs.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ jobs:
2222
- run: |
2323
git clone https://github.com/gitbutlerapp/gitbutler ../gitbutler
2424
25-
- id: versions
25+
- name: Compare versions
26+
id: versions
2627
run: |
2728
LATEST_RELEASE=$(git -C ../gitbutler tag --sort=-version:refname | grep '^release/' | head -n 1)
2829
@@ -34,11 +35,13 @@ jobs:
3435
echo "should_update=false" >> "$GITHUB_OUTPUT"
3536
fi
3637
37-
- if: steps.versions.outputs.should_update == 'true'
38+
- name: Update generated docs
39+
if: steps.versions.outputs.should_update == 'true'
3840
run: |
3941
sudo apt-get update
4042
sudo apt-get install -y libdbus-1-dev libglib2.0-dev pkg-config
4143
44+
git -C ../gitbutler checkout "${{ steps.versions.outputs.latest_release }}"
4245
./scripts/update-manpages.sh
4346
4447
sed -i "s|CURRENT_DOCS_VERSION: .*|CURRENT_DOCS_VERSION: ${{ steps.versions.outputs.latest_release }}|" .github/workflows/update-generated-docs.yml
@@ -54,7 +57,8 @@ jobs:
5457
5558
echo "branch=$branch" >> "$GITHUB_ENV"
5659
57-
- if: steps.versions.outputs.should_update == 'true'
60+
- name: Create pull request
61+
if: steps.versions.outputs.should_update == 'true'
5862
run: |
5963
gh pr create \
6064
--title "Update generated CLI documentation" \

scripts/update-manpages.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ rm -f cli-docs/*
3838

3939
# Regenerate documentation using cargo
4040
echo "Regenerating CLI documentation with cargo..."
41-
cargo run --bin but-clap --features raw-clap-docs
41+
cargo run -p but-clap --bin but-clap --features raw-clap-docs
4242

4343
echo "Documentation files regenerated successfully!"
4444
echo

0 commit comments

Comments
 (0)