-
Notifications
You must be signed in to change notification settings - Fork 227
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
Add pre-commit linting, version checking, and upgrade to Hugo latest (0.126.0) #11872
Conversation
4cf958e
to
98a7f98
Compare
Your site preview for commit 4cf958e is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-11872-4cf958e5.s3-website.us-west-2.amazonaws.com. |
98a7f98
to
812a4f3
Compare
Your site preview for commit 98a7f98 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-11872-98a7f987.s3-website.us-west-2.amazonaws.com. |
812a4f3
to
6a95c5e
Compare
Your site preview for commit 812a4f3 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-11872-812a4f3f.s3-website.us-west-2.amazonaws.com. |
6a95c5e
to
ba6ff45
Compare
Your site preview for commit 6a95c5e is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-11872-6a95c5e7.s3-website.us-west-2.amazonaws.com. |
Your site preview for commit ba6ff45 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-11872-ba6ff450.s3-website.us-west-2.amazonaws.com. |
scripts/ensure.sh
Outdated
fi | ||
} | ||
check_version "Node.js" "node" "node -v | sed 's/v\([0-9\.]*\).*$/\1/'" "18" | ||
check_version "Hugo" "hugo" "hugo version | sed 's/hugo v\([0-9\.]*\).*$/\1/'" "0.111" |
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.
hmmm, I think this is good, but I do wonder if this is too strict. I think many people are probably going to run into this error, even if they are building fine right now, since there are quite a few other versions other than 0.111.x that work. I think only a handful of us are currently running that specific version. Maybe something more along the lines of a warning message would be better?
Just trying to avoid having to answer a million slack questions about from people having trouble figuring out how to upgrade/downgrade to 0.111.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.
Yeah, agreed. I felt the same so went and looked into understanding what it'd take to address #11855, and it's not too big a deal, looks like. So I'll add that here and turn these into warnings instead.
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.
Oh nice, yeah if it's not too much trouble to do the upgrade that would be awesome!!
ba6ff45
to
798d4c6
Compare
798d4c6
to
9a96cb7
Compare
9a96cb7
to
0973176
Compare
0973176
to
48c870d
Compare
48c870d
to
63e7c52
Compare
Your site preview for commit 0973176 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-11872-0973176d.s3-website.us-west-2.amazonaws.com. |
Your site preview for commit 48c870d is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-11872-48c870d4.s3-website.us-west-2.amazonaws.com. |
"ancestors" (after 1 $ancestors) | ||
) | ||
-}} | ||
{{- if ne $page.File nil -}} |
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.
Turns out the only pages that have nil File
references are the tag and author pages, whose .UniqueID
values already resolve to ""
(so are currently being filtered out anyway). So keeping only on those pages that contain File
references looks like it's fine after all.
@@ -57,7 +57,7 @@ <h2 class="text-4xl md:text-6xl bg-white px-6 mb-0 pb-6">We are Pulumi</h2> | |||
<h3 class="font-medium text-6xl">Our purpose</h3> | |||
<h4 class="font-medium text-4-xl">To democratize the cloud for every engineer.</h4> | |||
<p class="text-gray-700 text-xl mb-10">We help engineers ship infrastructure faster with Infrastructure as Code in general-purpose languages.</p> | |||
<a href="{{ relref . " /leadership" }}" class="btn-primary">Meet our leaders</a> | |||
<a href="{{ relref . "/leadership" }}" class="btn-primary">Meet our leaders</a> |
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.
Several of these were warning on make serve
, so I went ahead and fixed them.
Your site preview for commit 63e7c52 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-11872-63e7c52e.s3-website.us-west-2.amazonaws.com. |
check_version "Node.js" "node" "node -v | sed 's/v\([0-9\.]*\).*$/\1/'" "18" | ||
check_version "Hugo" "hugo" "hugo version | sed 's/hugo v\([0-9\.]*\).*$/\1/'" "0.126.0" | ||
check_version "Yarn" "yarn" "yarn -v | sed 's/v\([0-9\.]*\).*$/\1/'" "1.22" |
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.
It'd be awesome if we could specify these versions in one place and use them everywhere. Don't yet have any great ideas for how to do this in a way that's work both locally and in our GHA workflows, though. 🤔
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.
for hugo
not sure, but I wouldn't be surprised if there is a way to enforce the node and yarn versions in the package.json
file somehow.
63e7c52
to
c15cd58
Compare
Your site preview for commit c15cd58 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-11872-c15cd58e.s3-website.us-west-2.amazonaws.com. |
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.
thanks @cnunciato!! looks good to me. I also verified the search-index.json file produced in the preview is identical to what is in prod now, so those updates to the index.json file work and didn't regress anything! 🚀
Adds the pre-commit hook (to run the linter) that we were using in pulumi-hugo, and also adds a bit of scripting to ensure required tools and versions are installed, warning on differences. Also upgrades to the latest version of Hugo (0.126.0).
Fixes #11855.