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

Update Hugo repo & version; add missing Zola alias #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ The `install` subcommand Installs a new binary. If that version is not already i
cache, Binrc will try to fetch it from GitHub's releases and keep it in its cache.

```
binrc install spf13/hugo 0.19
binrc install gohugoio/hugo 0.94.2
```

### Versions as environment variables
@@ -42,15 +42,16 @@ Binrc supports settings binary version numbers as environment variables. It will
in the environment to configure the right version.

```
HUGO_VERSION=0.19 binrc install spf13/hugo
HUGO_VERSION=0.94.2 binrc install gohugoio/hugo

Choose a reason for hiding this comment

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

Well… this version is already a year old. Would make sense to make it more current before merging.

Related: (question is… whether there should not be a "latest" option?)

```

### Aliases

Binrc keeps a list of aliases to make installing binaries more easy. If a project name is not in `OWNER/NAME` for, Binrc will
Binrc keeps [a list of aliases](cache/cache.go) to make installing binaries more easy. If a project name is not in `OWNER/NAME` format, Binrc will
check the list of aliases to try to resolve the project.

This is the current known list:

- hugo: spf13/hugo
- hugo: gohugoio/hugo
- gutenberg: keats/gutenberg
- zola: getzola/zola
Comment on lines 56 to +57

Choose a reason for hiding this comment

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

Well… actually Zola is the new repo for Gutenberg (and keats/gutenberg redirects to getzola/zola …) — so the question is whether the older aliases shoud be even kept?

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for taking a look! You make a good point; I think it makes sense to keep guttenberg alias in cache/cache.go (to avoid breaking old configs which were created when the project was called guttenberg and haven't been updated since then), but new projects should use zola instead, so we can remove it from the README.

Maybe it makes sense to also add a comment to cache/cache.go to specify the lineage and mark one of them as deprecated so folks don't use it?

Copy link

@janbrasna janbrasna Jul 5, 2022

Choose a reason for hiding this comment

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

But given GH keeps the redirects it should still work, specifying old gutenberg version should fetch the correct tarball from zola repo eventually without breaking (GH actually keeps the old release artifact filenames intact when moving repos)… well, in theory, as back in the day the tgz/bin naming convention was different from the template used currently — so yea I guess nowadays it really doesn't do anything but get the binary from local cache, not sure if it still works for downloading arbitrary archaic releases remotely…

Choose a reason for hiding this comment

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

(I actually ended up here trying to sync the versions/aliases with a proposed update to build_images installed software list to streamline the GUTENBERG_/ZOLA_ info to probably make more prominent that <=0.4 was gutenberg and >=0.5 is zola to make it more obvious…)

Choose a reason for hiding this comment

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

@mbrukman Actually it's well described in:

gutenberg = [
{ range = ">0.0.5, <0.4.3", tarball = "%s-v%s-x86_64-unknown-linux-gnu.tar.gz", bin = "gutenberg" }
]
zola = [
{ range = ">=0.5.0", tarball = "%s-v%s-x86_64-unknown-linux-gnu.tar.gz", bin = "zola" }
]

incl. the correct templates so things are probably still working even now, five years later;)

Choose a reason for hiding this comment

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

So maybe just a hint along the way:

Suggested change
- gutenberg: keats/gutenberg
- zola: getzola/zola
- zola: getzola/zola (formerly gutenberg: keats/gutenberg)

would suffice?

Otherwise the rest of the PR is all golden, it's about time to update the outdated refs, good job!