This repository was archived by the owner on Oct 10, 2025. It is now read-only.
Repository navigation
Update documentation to use dynamic versioning #593
Merged
Merged
Changes from 7 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d4dae44
Update documentation to use dynamic versioning
mewim a64a09a
Remove outdated update-kuzu-version workflow and implement version up…
mewim f4886f7
Add version update step to build workflow
mewim ce5186f
Fix log messages to correctly reference version.json in update-versio…
mewim 99f4358
Update src/content/docs/installation.mdx
mewim 20b50e4
Add update-version step in Dockerfile build process
mewim fcf1bf9
Reorder Dockerfile commands to ensure update-version runs after copyi…
mewim 65df16a
Remove 'scripts' from .dockerignore to include it in the Docker build…
mewim d54ee66
Remove release script to streamline versioning process
mewim 9485b10
Allow skipping version update
mewim 1623f5f
Add skipVersionUpdate input to workflow_dispatch in GitHub Actions
mewim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| const GITHUB_API_URL = "https://api.github.com/repos/kuzudb/kuzu/releases/latest"; | ||
| const fs = require('fs/promises'); | ||
| const path = require('path'); | ||
|
|
||
| (async () => { | ||
| console.log("Fetching latest version from GitHub..."); | ||
| const response = await fetch(GITHUB_API_URL); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should have a way to manually specify the version, as this script should be run as part of the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have changed the behavior:
Since now it is just a JSON file that can easily be edited directly. Using the script or workflow to do version update is mainly for automatically version maintaining but not necessary. |
||
| const data = await response.json(); | ||
| let version = data.tag_name; | ||
| version = version.trim(); | ||
| version = version.substring(1); | ||
| console.log(`Latest version is ${version}`); | ||
| console.log("Updating version.json..."); | ||
| const pathToJson = path.resolve(path.join(__dirname, "..", "src", "version.json")); | ||
| console.log("Path to version.json: ", pathToJson); | ||
| const json = JSON.stringify({ version }, null, 2); | ||
| await fs.writeFile(pathToJson, json); | ||
| console.log("version.json updated successfully."); | ||
| console.log("Done."); | ||
| })(); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking some more, instead of auto updating on deploy, how about we just check for changes and fail the build. This way, there won't ever me a mismatch between what we see locally on
npm run devvs what is actually deployed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally do not mind too much about the mismatching. I would prefer to just keep the JSON as a placeholder and allow the script to automatically do it. For https://github.com/kuzudb/kuzudb.github.io I do not update
LatestVersion.jsonat all and solely rely on the script to maintain it during the deployment.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although auto check won't really work for a new release.
I don't really like the magical version rewrite during deploy. I think the better way is to add a commit with the new version, like the auto format CI job.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will work for new release though. We usually build the binaries first and then push the docs. Anyway, feel free to change the behavior to allow manual triggering or committing to the branch. I just personally do not care about it.