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

Release artifacts should match proper os and architecture naming #10073

Closed
mblaschke-daimlertruck opened this issue Jul 6, 2022 · 7 comments
Closed
Assignees
Milestone

Comments

@mblaschke-daimlertruck
Copy link

Currently release artifacts are created eg:

  • hugo_0.101.0_Linux-64bit.deb
  • hugo_0.101.0_Linux-ARM64.deb

It would be good if that would match eg TARGETOS and TARGETARCH and/or TARGETVARIANT (also dpkg --print-architecture) from docker so these variables could be used inside Dockerfiles.

TARGETOS: linux, darwin, windows
TARGETARCH: amd64, arm64

Currently amd64 must be mapped to 64bit and arm64 to ARM64.

Suggestion:

  • hugo_0.101.0_linux-amd64.deb
  • hugo_0.101.0_linux-arm64.deb
  • hugo_0.101.0_darwin-amd64.deb (or keep it macos)
  • hugo_0.101.0_darwin-arm64.deb (or keep it macos)
@bep
Copy link
Member

bep commented Jul 6, 2022

So, I don't disagree, but we have had this naming scheme like ... forever, so changing it will create some havoc in the wild.

@mblaschke-daimlertruck
Copy link
Author

But it would make much more sense and it would make it easier to install it. Now we have to map it for each os/arch to get it installed.

And *_Linux-64bit doesn't make sense as 64bit is not an architecture 😉

Maybe this request is more a bug report then a feature report 🙂

@sid-r-singh
Copy link

sid-r-singh commented Aug 7, 2022

I agree with you, @mblaschke-daimlertruck that it would make more sense to have such naming.

But I wonder what will happen the moment this is done. In my limited knowledge, this can lead to:

  • Thousands of websites which depend on Netlify will suffer (unless Netlify also recognises the change & implements fix). Same with Cloudfare pages & other similar services.
  • All Hugo websites which pull the latest Hugo binaries in their CI/CD pipeline will fail.
  • Any organisation which uses Hugo in production (which includes government websites in some countries) will have their builds fail if they are trying to fetch the latest Hugo binaries.

This might create convenience for some people. It is obviously logical to name binaries like you mentioned.
But don't you think the inconvenience which this will create outweighs the convenience it will create?

What can be done ?

Maybe this can be introduced in Hugo v1.000 which denotes breaking changes as per conventional commit guidelines.

@mblaschke-daimlertruck
Copy link
Author

  • Thousands of websites which depend on Netlify will suffer (unless Netlify also recognises the change & implements fix). Same with Cloudfare pages & other similar services.
  • All Hugo websites which pull the latest Hugo binaries in their CI/CD pipeline will fail.
  • Any organisation which uses Hugo in production (which includes government websites in some countries) will have their builds fail if they are trying to fetch the latest Hugo binaries.

But that would also mean gohugo should never ever introduce breaking changes in their codebase 🤔
From the last 2 years I can tell that there were many breaking changes which broke our builds but that is expected when using latest. It's the same when using docker tag :latest.

What about shipping Docker images? Many people and GitHub actions are using Docker based builds but https://hub.docker.com/r/gohugoio/hugo was updated 5 years ago.

You could also upload the old layout and deprecate them but also upload the new one so people have time to adapt it.

@bep bep modified the milestones: v0.102.0, v0.103.0 Aug 28, 2022
@paolomainardi
Copy link

paolomainardi commented Sep 8, 2022

This is a quick and dirty dockerfile I am using to multiplatform building:

FROM alpine:3.11.3
RUN apk add --no-cache vim py-pip python curl build-base libc6-compat

# Download and install hugo
ARG TARGETARCH
ENV HUGO_VERSION 0.102.3

# Install Hugo.
RUN if [ $TARGETARCH == 'arm64' ]; then  \
      export HUGO_BINARY=hugo_extended_${HUGO_VERSION}_Linux-ARM64.tar.gz; \
    else \
      export HUGO_BINARY=hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz; \
    fi && \
    curl -Lo /tmp/${HUGO_BINARY} https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY} \
    && tar xzf /tmp/${HUGO_BINARY} -C /usr/local/bin \
    && rm -rf /tmp/*

# Add sources.
WORKDIR /app
ADD src/ .

# By default, serve site.
EXPOSE 1313 35729
CMD hugo server --bind 0.0.0.0

@bep
Copy link
Member

bep commented Sep 8, 2022

https://hub.docker.com/r/gohugoio/hugo was updated 5 years ago.

That's not our Docker account. And yes, you could argue that we should do something about that.

I have since this issue was created I have spent a stupid amount of energy rewriting Hugo's build/release setup, which makes it considerably cheaper to keep one or more "alias archives". So I suggest that for the next release we release with new names, but keep the Linux AMD64 as a duplicate for the forseaable future, which should cover the Netlify people etc.

@bep bep added Enhancement and removed Proposal labels Sep 15, 2022
@bep bep self-assigned this Sep 15, 2022
@bep bep closed this as completed in 0bd79d3 Sep 15, 2022
bep added a commit that referenced this issue Sep 15, 2022
But create aliases with old filenames for the 2 most downloaded archives (to avoid Netlify etc. breaking).

Fixes #10073
@github-actions
Copy link

github-actions bot commented Oct 7, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants