Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Support installing tools via homebrew #411

Merged
merged 4 commits into from
May 7, 2020
Merged

Support installing tools via homebrew #411

merged 4 commits into from
May 7, 2020

Conversation

mraerino
Copy link
Member

@mraerino mraerino commented May 3, 2020

Adding support for Homebrew aka Linuxbrew: https://docs.brew.sh/Homebrew-on-Linux

This shall be amazing because:

I also hope this will allow us to remove some lesser-used tooling from the image and offer users to install it via Homebrew instead.
Good candidates for that:

  • pandoc
  • hugo
  • doxygen
  • jq
  • optipng
  • asciidoctor
  • emacs
  • gifsicle
  • graphicsmagick
  • graphviz
  • imagemagick
  • jpegoptim
  • pngcrush
  • rsync
  • sqlite3
  • swig

Test plan

Has been verified locally with Brewfile and custom Brewfile name via $HOMEBREW_BUNDLE_FILE

Cute animal

@mraerino mraerino requested a review from a team as a code owner May 3, 2020 23:43
@mraerino mraerino added the type: feature code contributing to the implementation of a feature and/or user facing functionality label May 3, 2020
@mheffner
Copy link
Contributor

mheffner commented May 4, 2020

Nice, I hadn't heard of Homebrew for Linux before. 💥

@mraerino
Copy link
Member Author

mraerino commented May 4, 2020

yup, i remembered that a german webhosting company offered it along with full-fledged ssh access on a shared host and how this is exactly what we need (hope you can google-translate it): https://blog.uberspace.de/brauen-oder-toasten/

@mraerino
Copy link
Member Author

mraerino commented May 5, 2020

this is now based on an older commit, because the swift commit fails all builds

@mraerino
Copy link
Member Author

mraerino commented May 6, 2020

This is an example build which uses this feature successfully: https://app.netlify.com/sites/edge-functions-ts/deploys/5eb20aaf6ddfc20006027e9d

@mheffner
Copy link
Contributor

mheffner commented May 6, 2020

What if we removed this from the included_software doc so that we made it clear it's not generally available, then we could continue testing without officially "supporting" it? Then we could decide on a release date if this is a pattern we like.

@calavera
Copy link
Contributor

calavera commented May 6, 2020

What if we removed this from the included_software doc so that we made it clear it's not generally available, then we could continue testing without officially "supporting" it? Then we could decide on a release date if this is a pattern we like.

I think that it's a good idea, or even mark it as experimental. This change as it is makes much more sense than other tools that we've merged before, and I don't think we should hold it back.

@mraerino
Copy link
Member Author

mraerino commented May 6, 2020

this is currently blocked on #401
once that is merged i'm happy to rebase and update notes

@mraerino
Copy link
Member Author

mraerino commented May 7, 2020

@netlify/backend are you happy to merge this change?

Copy link
Contributor

@mheffner mheffner left a comment

Choose a reason for hiding this comment

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

Yeah, let's get it out

@@ -449,6 +450,13 @@ install_dependencies() {
fi
fi

# Homebrew from Brewfile
if [ -f Brewfile ] || [ ! -z "$HOMEBREW_BUNDLE_FILE" ]
Copy link
Contributor

Choose a reason for hiding this comment

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

fwiw, -n should also be equivalent to ! -z

#
################################################################################
USER buildbot
RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Copy link
Contributor

Choose a reason for hiding this comment

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

Any concern that we aren't pulling from a static/stable tag?

Copy link
Member Author

Choose a reason for hiding this comment

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

that's a good point. let's do that as part of a general release

@mraerino mraerino merged commit 7d42e47 into xenial May 7, 2020
@mraerino mraerino deleted the feat/homebrew branch May 7, 2020 14:52
mheffner added a commit that referenced this pull request May 8, 2020
@calavera calavera restored the feat/homebrew branch September 28, 2020 20:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants