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

Build: Add version release number in unreleased docs #1621

Merged
merged 1 commit into from
Jun 5, 2021

Conversation

ventuno
Copy link
Member

@ventuno ventuno commented Jun 5, 2021

Following up on this conversation: replace "unreleased" with the version number in docs when releasing a new version.

git diff                                                          
diff --git a/docs/QUnit/test.each.md b/docs/QUnit/test.each.md                            
index 463537b..52e9ce0 100644                                                                                                                                                        
--- a/docs/QUnit/test.each.md                                                                                                                                                        
+++ b/docs/QUnit/test.each.md                                                             
@@ -4,7 +4,7 @@ title: QUnit.test.each()                                                  
 excerpt: Add tests using a data provider.                                                                                                                                           
 categories:                                                                              
   - main                                                                                 
-version_added: "unreleased"                 
+version_added: "10.0.0"                                                                                                                                                              ---                                         
                                                                                          
 `QUnit.test.each( name, dataset, callback )`<br>

@ventuno ventuno requested a review from Krinkle June 5, 2021 21:12
@Krinkle Krinkle merged commit 20f746f into qunitjs:main Jun 5, 2021
@Krinkle
Copy link
Member

Krinkle commented Jun 5, 2021

Perfect. Thank you!

@Krinkle
Copy link
Member

Krinkle commented Jun 7, 2021

@ventuno Looks like it didn't go exactly as planned. The link at https://api.qunitjs.com/QUnit/test.each/ is now a 404 Error, looking for 2.16.0.0 instead of 2.16.0. We don't add new features in patch releases, and as such our doc pages are able to use a version number without trailing .0.

Could you take another look?

I think it would be tricky to handle this in the build script since from its perspective there is no right answer (stripping the patch number unconditionally means it would link to the wrong version if something did get released in a patch version, stripping the patch number only if it is 0 would mean the link is broken e.g. to 1.1.1.0).

Perhaps we can embrace the way you did it here and update the markdown files to use the fulll version instead. That seems simpler in the long run. If you go that route, remember to also update _includes/version.html to not append .0 anymore.

@ventuno
Copy link
Member Author

ventuno commented Jun 9, 2021

@Krinkle sorry if this introduced an issue. I now see how existing md files only have the x.y format. I also agree that having the full version should be the best fix. I'm assuming for all existing files updating them to x.y.0 is fine?

@Krinkle
Copy link
Member

Krinkle commented Jun 9, 2021

@ventuno Yep, no problem!

@ventuno
Copy link
Member Author

ventuno commented Jun 12, 2021

@Krinkle #1625 should fix the issue mentioned above.

@ventuno ventuno deleted the replace-version_added-in-docs branch June 12, 2021 21:17
Krinkle added a commit that referenced this pull request Sep 9, 2021
The grep command exits non-zero if there are no matches. Default to
an empty array so that the prep continues.

Ref #1621.
Krinkle added a commit that referenced this pull request Sep 9, 2021
The grep command exits non-zero if there are no matches. Default to
an empty array so that the prep continues.

Ref #1621.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants