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

Upgrade Hugo to 0.52 #11552

Merged
merged 5 commits into from
Jan 15, 2019
Merged

Upgrade Hugo to 0.52 #11552

merged 5 commits into from
Jan 15, 2019

Conversation

lucperkins
Copy link
Contributor

Hugo version 0.52 adds support for HTML minification via the --minify flag. This PR updates the "current" Hugo version to 0.52.

This change will not impact users running the site locally with an earlier version of Hugo. This will only affect the production build of the site. For users who do upgrade to 0.52 to run the site locally, the in-browser error feature is disabled to ensure a smooth transition. We can discuss enabling that (very nice but potentially disruptive) functionality in the future.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 5, 2018
@lucperkins
Copy link
Contributor Author

/assign @chenopis

@k8sio-netlify-preview-bot
Copy link
Collaborator

k8sio-netlify-preview-bot commented Dec 5, 2018

Deploy preview for kubernetes-io-master-staging ready!

Built with commit 2d51b3f

https://deploy-preview-11552--kubernetes-io-master-staging.netlify.com

@zacharysarah
Copy link
Contributor

@lucperkins Apart from netlify building successfully (which it did) and travis passing (which it did), is there a way we should be testing these changes prior to merge?

@lucperkins
Copy link
Contributor Author

@zacharysarah I ran the site locally via both a standard Hugo binary and the Docker image and it worked just fine, as far as I can tell. I think that's about as much of a testing battery as we can throw at it. Perhaps it'd be useful to codify this somewhere?

@zacharysarah
Copy link
Contributor

@lucperkins I didn't test with a docker image, but I also ran locally with success. What are you thinking we should codify outside the issue itself?

@GuessWhoSamFoo
Copy link
Contributor

Maybe something in the Makefile to verify HUGO_VERSION is consistent across config files?

@zacharysarah
Copy link
Contributor

@GuessWhoSamFoo Good point--I could foresee potential issues arising if Dockerfile passed in HUGO_VERSION from a Makefile that doesn't match with .travis.yml and/or netlify.toml.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 6, 2018
@lucperkins
Copy link
Contributor Author

@zacharysarah @GuessWhoSamFoo Okay, I think I've found a good solution. I removed the need for a HUGO_VERSION variable in the .travis.yml by delegating the Hugo installation logic to a make command (which can use the env var in the Makefile). I also added a simple version checker script that will fail the CI build and provide a clear warning if there's ever a discrepancy.

@chenopis
Copy link
Contributor

chenopis commented Dec 6, 2018

This approach makes sense to me.
/LGTM

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 6, 2018
@jimangel
Copy link
Member

jimangel commented Dec 6, 2018

/lgtm

@@ -7,7 +7,7 @@ functions = "functions"
command = "make non-production-build"

[build.environment]
HUGO_VERSION = "0.52"
HUGO_VERSION = "0.49"

[context.production.environment]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucperkins, can you further explain why the HUGO_VERSION in netlify.toml is remaining at 0.49? Who/what calls the non-production-build target (why should version 0.49 vs 0.52 matter)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. This should indeed also be 0.52. Fixed.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 10, 2018
@jimangel
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 15, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jimangel, lucperkins

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 15, 2019
@k8s-ci-robot k8s-ci-robot merged commit aac7862 into kubernetes:master Jan 15, 2019
bsalamat pushed a commit to bsalamat/kubernetes.github.io that referenced this pull request Jan 29, 2019
* Update Hugo version and apply HTML minification to production builds

* Use full flag names for clarity

* Remove Hugo installation logic out of Travis config and into Makefile

* Add Hugo version checking script

* Fix Netlify config version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants