-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
echo "Running pre-commit checks..." | ||
make lint |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,4 +142,4 @@ lint: | |
|
||
.PHONY: format | ||
format: | ||
yarn prettier --write . | ||
./scripts/format.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Several of these were warning on |
||
</section> | ||
|
||
<section id="what-we-believe" class="text-center text-lg py-8 relative"> | ||
|
@@ -98,7 +98,7 @@ <h4 class="font-display font-medium">{{ $value.title }}</h4> | |
</div> | ||
</div> | ||
<div class="careers-cta py-6 w-full mt-28 bg-white"> | ||
<h4>Like what we stand for? <a href="{{ relref . " /careers" }}" class="font-bold text-blue-600">Join us.</a></h4> | ||
<h4>Like what we stand for? <a href="{{ relref . "/careers" }}" class="font-bold text-blue-600">Join us.</a></h4> | ||
<p>We are looking for new teammates who want to build the future of cloud infrastructure together.</p> | ||
</div> | ||
</section> | ||
|
@@ -119,7 +119,7 @@ <h3 class="font-medium text-6xl">Pulumi is about community</h3> | |
<img src="/images/mascot/victory-medal-pulumipus.svg" alt="Pulumipus wearing a medal with two hands raised" /> | ||
<div class="header mt-6 mb-1.5 text-medium text-2xl">The Puluminaries</div> | ||
<p class="text-left flex-grow">A group for stellar Pulumi community members who have made "above and beyond" contributions to the community.</p> | ||
<a href="{{ relref . " /community/puluminaries" }}" class="btn-primary">Meet our Puluminaries</a> | ||
<a href="{{ relref . "/community/puluminaries" }}" class="btn-primary">Meet our Puluminaries</a> | ||
</div> | ||
<div class="community-spotlight mx-auto flex flex-col justify-cetner items-center w-72 md:w-1/3 my-6 px-3"> | ||
<img src="/images/mascot/rocketpus.svg" alt="Pulumipus wearing a medal with two hands raised" /> | ||
|
@@ -129,9 +129,9 @@ <h3 class="font-medium text-6xl">Pulumi is about community</h3> | |
</div> | ||
<div class="community-spotlight mx-auto flex flex-col justify-cetner items-center w-72 md:w-1/3 my-6 px-3"> | ||
<img src="/images/mascot/hoodie-pulumipus.svg" alt="Pulumipus wearing a Pulumi hoodie" /> | ||
<div class="header mt-6 mb-1.5 text-medium text-2xl">Pulumi users</div> | ||
<div class="header /leadershipt-6 mb-1.5 text-medium text-2xl">Pulumi users</div> | ||
<p class="text-left flex-grow">Engineers love Pulumi! Don’t believe us? Check out what our users have to say.</p> | ||
<a href="{{ relref . " /testimonials" }}" class="btn-primary ">Read user quotes</a> | ||
<a href="{{ relref . "/testimonials" }}" class="btn-primary ">Read user quotes</a> | ||
</div> | ||
</div> | ||
</section> | ||
|
@@ -226,7 +226,7 @@ <h2 class="font-medium text-6xl mt-10 mb-8">Our awards & recognition</h2> | |
{{ end }} | ||
</ul> | ||
<div> | ||
<a class="inline-block mt-6 text-bold text-blue-600 mt-12 font-bold" href="{{ relref . " /awards" }}">View all achievements</a> | ||
<a class="inline-block mt-6 text-bold text-blue-600 mt-12 font-bold" href="{{ relref . "/awards" }}">View all achievements</a> | ||
</div> | ||
</div> | ||
</section> | ||
|
@@ -248,7 +248,7 @@ <h5 class="mt-2 mb-0">{{ .title }}</h5> | |
</li> | ||
{{ end }} | ||
</ul> | ||
<a class="text-blue-600 font-bold" href="{{ relref . " /newsroom" }}">View all press releases</a> | ||
<a class="text-blue-600 font-bold" href="{{ relref . "/newsroom" }}">View all press releases</a> | ||
</div> | ||
<div class="md:w/1-2 md:px-8"> | ||
<h3 class="text-center md:text-left font-medium text-6xl">Recent News</h3> | ||
|
@@ -262,7 +262,7 @@ <h5 class="mt-2 mb-0">{{ .title }}</h5> | |
</li> | ||
{{ end }} | ||
</ul> | ||
<a class="text-blue-600 font-bold" href="{{ relref . " /newsroom" }}">View all recent news</a> | ||
<a class="text-blue-600 font-bold" href="{{ relref . "/newsroom" }}">View all recent news</a> | ||
</div> | ||
</div> | ||
</section> | ||
|
@@ -275,6 +275,6 @@ <h5 class="mt-2 mb-0">{{ .title }}</h5> | |
<h3 class="font-medium text-6xl">Join our team</h3> | ||
<h4>We are fully remote and hiring!</h4> | ||
<p class="mb-9">Our team is a diverse and talented group of individuals from all walks of life.</p> | ||
<a href="{{ relref . " /careers" }}" class="btn-primary">Browse open positions</a> | ||
<a href="{{ relref . "/careers" }}" class="btn-primary">Browse open positions</a> | ||
</section> | ||
{{ end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,34 @@ | ||
#!/bin/bash | ||
|
||
# Make sure the Node version matches what's in .nvmrc (and in our GitHub Actions workflows). | ||
current_version="$(node -v)" | ||
required_version="$(cat .nvmrc)" | ||
set -o errexit -o pipefail | ||
|
||
if [ ! $(echo ${current_version} | grep ${required_version}) ]; then | ||
printf "\nIt looks like you're running Node %s, but this project uses Node %s.\n" ${current_version} ${required_version} | ||
printf "If you're using nvm, try running nvm use.\n\n" | ||
exit 1 | ||
fi | ||
check_version() { | ||
tool_name="$1" | ||
executable="$2" | ||
version_string="$(eval $3)" | ||
required_version="$4" | ||
level="$5" | ||
|
||
color_red=$(echo -e "\033[0;31m") | ||
color_yellow=$(echo -e "\033[0;33m") | ||
color_end=$(echo -e "\033[0m") | ||
|
||
details="See the README at https://github.com/pulumi/docs for a list of required tools and versions." | ||
|
||
if ! command -v "$executable" &> /dev/null; then | ||
echo -e "${color_red}error${color_end} This project requires $1, but the '$2' executable is either not installed or not on your PATH." | ||
echo $details | ||
exit 1 | ||
fi | ||
|
||
if [ ! $(echo ${version_string} | grep ${required_version}) ]; then | ||
printf "${color_yellow}warning${color_end} It looks like you're running %s %s, but this project uses version %s.\n" ${tool_name} ${version_string} ${required_version} | ||
echo $details | ||
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.126.0" | ||
check_version "Yarn" "yarn" "yarn -v | sed 's/v\([0-9\.]*\).*$/\1/'" "1.22" | ||
Comment on lines
+29
to
+31
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. 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 commentThe reason will be displayed to describe this comment to others. Learn more. for |
||
|
||
# Install the Node dependencies for the website and the infrastructure. | ||
yarn install | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit -o pipefail | ||
|
||
yarn prettier --write . |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2894,6 +2894,11 @@ humanize-duration@^3.9.1: | |
resolved "https://registry.yarnpkg.com/humanize-duration/-/humanize-duration-3.27.3.tgz#db654e72ebf5ccfe232c7f56bc58aa3a6fe4df88" | ||
integrity sha512-iimHkHPfIAQ8zCDQLgn08pRqSVioyWvnGfaQ8gond2wf7Jq2jJ+24ykmnRyiz3fIldcn4oUuQXpjqKLhSVR7lw== | ||
|
||
husky@^9.0.11: | ||
version "9.0.11" | ||
resolved "https://registry.yarnpkg.com/husky/-/husky-9.0.11.tgz#fc91df4c756050de41b3e478b2158b87c1e79af9" | ||
integrity sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw== | ||
|
||
[email protected]: | ||
version "0.6.3" | ||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" | ||
|
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 containFile
references looks like it's fine after all.