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

attempt at fixing versions in user-facing docs #1544

Merged
merged 1 commit into from Feb 10, 2022
Merged

attempt at fixing versions in user-facing docs #1544

merged 1 commit into from Feb 10, 2022

Conversation

bjaglin
Copy link
Collaborator

@bjaglin bjaglin commented Feb 10, 2022

Since versions used in docs (and in metadata available for clients) come from https://github.com/sbt/sbt-dynver, I don't understand how this ever worked with a shallow clone, so this might help with #1538

@@ -8,8 +8,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/actions/checkout

# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Default: 1

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this number is wrong ...but let's try!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/sbt/sbt-dynver#setup

In CI, you may need to run git fetch --unshallow (or, sometimes, git fetch --depth=10000), to avoid situations where a shallow clone will result in the last tag not being fetched. Additionally git fetch --tags if the repo is cloned with --no-tags.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record the release job gets proper versions because it does an explicit unshallow

- run: git fetch --unshallow

I guess either approach is correct. The unshallow is maybe a bit more efficient but I like that fetch-depth is a flag on the checkout as it's more apparent.

@bjaglin bjaglin marked this pull request as ready for review February 10, 2022 14:49
@bjaglin bjaglin merged commit 6d991eb into main Feb 10, 2022
@bjaglin
Copy link
Collaborator Author

bjaglin commented Feb 10, 2022

It looks like it worked: c151ae6! I have no idea why it worked without this before though... Maybe to be continued.

@bjaglin bjaglin deleted the versions branch April 3, 2022 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants