-
Notifications
You must be signed in to change notification settings - Fork 182
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
historic docs v2 #1770
historic docs v2 #1770
Conversation
✅ Deploy Preview for dlt-hub-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Cool! Let's merge it and then we can enable it on netlify even before 1.0 release. Both master and devel branch changes should trigger the same build (as we do both devel and master + tags in each)
const selectedVersions = ["master"]; | ||
let lastVersion = versions[0]; | ||
for (let ver of versions) { | ||
if (semver.minor(ver) != semver.minor(lastVersion) || semver.major(ver) != semver.major(lastVersion)) { |
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 do not want to nitpick but this works correctly for 0.x.x version. For 1.x.x we want to keep only
1,x,x,
2,x,x
tldr;> check only the difference on major
VERSIONED_SIDEBARS_FOLDER = "versioned_sidebars" | ||
|
||
// no doc versions below this version will be deployed | ||
MINIMUM_SEMVER_VERSION = "0.4.0" |
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'd drop 0.4
|
||
// go through the versions and find all newest versions of minor versions | ||
const selectedVersions = ["master"]; | ||
let lastVersion = versions[0]; |
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.
can we add 0.5.4 (latest)
to the top tag?
console.log("Checking branch") | ||
const branch = proc.execSync(`cd ${REPO_DIR} && git rev-parse --abbrev-ref HEAD`).toString().trim() | ||
|
||
if (branch != "devel") { |
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 I do not understand this part. We should not use the REPO_DIR to build the current (development) docs. What IMO we should do:
- what we call
devel
we should build using the already checked out repo including uncommitted local changes. this will also allow to build previews for PRs (or this already works like that? because we still build local docs) - the highest tag found should not be built from this tag but from
master
. this will allow to update docs in master branch and get then online without increasing the tag
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.
Yes, this is how it works, this line only is a sanity check wether the repo could be checked out properly. the devel branch of the checked out repo never actually is built, check further down, it only ever builds stuff collected in the versions.
2c49693
to
48fa9d4
Compare
48fa9d4
to
cb9c44c
Compare
Description
PR for adding historic docs without checking these historic docs into the repo. Mechanism:
TODO after merging: