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

Match package version number to Hugo version number #105

Open
jakejarvis opened this issue Dec 3, 2019 · 8 comments
Open

Match package version number to Hugo version number #105

jakejarvis opened this issue Dec 3, 2019 · 8 comments

Comments

@jakejarvis
Copy link

At first glance browsing npmjs.com I thought this hadn't been updated since Hugo v0.48 — I'm glad I was wrong since this package is incredibly useful, but is there any reason the version numbers for this package can't match the version numbers for the Hugo binary that's downloaded (going forward of course)? Not a huge deal but it might make things more intuitive (and it'd be nice to know which version of Hugo a site is using just by looking at package.json).

Thanks for actually keeping this package up to date, though! 😉

@markgaze
Copy link

markgaze commented Dec 4, 2019

Agreed, it would be nice to be able to choose the version of Hugo by choosing the matching version of this package.

@TheOddler
Copy link

I concur, its very confusing that (hugo-bin) version 0.49.0 is (hugo) version 0.61.0.

@pavelbinar
Copy link

Yes, I was about to create a ticket for that but found out that this is actually a common problem.

Please consider aligning the hugo and hugo-bin version.

@XhmikosR
Copy link
Collaborator

XhmikosR commented Feb 20, 2020

I wanted to do that, but there's no guarantee the versions will stay in sync. So I left things as they were since the beginning.

/CC @satoshun00

@dkebler
Copy link

dkebler commented Sep 26, 2020

Make your new commits (don't publish)
npm version <new hugo release version>
npm publish

as long at the version you set with npm version is > the current published version npm publish will work.

this could be part of a bash script that you run. I have one to update hugo(extended) on any linux machine and it checks for updates first and parses the version number that could be used in npm version. Could been done as a 'cron' job that way no one need to manually update this package when hugo binary is updated. Anyway might be of some help/inspiration.

Here is my script
https://gist.github.com/dkebler/1188d098d62166fdc6065fb2658a71dd

another thought
Since the hugo binary is not huge (45mb uncompressed) maybe both could be downloaded together and the default export could be hugo with hugoext being a named export of the extended version. Then users don't have to do all those gyrations with environment or package.json and rerunning install but just import the version they want in their code.

@satoshun00
Copy link
Member

Thank you for suggestion.
I commented to same issues before:
#33 (comment)

But it's not make sense to me, because "mirroring Hugo versions" prevents reasonable versioning of hugo-bin itself.
When hugo-bin v0.30.2 ships gohugoio/hugo v0.30.2, and if hugo-bin needs to upgrade some dependencies, hugo-bin cannot increment patch version

@chalin
Copy link

chalin commented Oct 13, 2021

I wanted to do that, but there's no guarantee the versions will stay in sync. So I left things as they were since the beginning.

@XhmikosR @satoshun00: you can use version suffixes +1, +2, etc to ensure that you stay in sync with Hugo versions. For example: 0.88.1+1.

/cc @austinlparker @nate-double-u

@XhmikosR
Copy link
Collaborator

Sorry, personally I have no interest in this. So, unless it's automated, I will continue using npm version minor or npm version patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants