-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
Pilosa: Add build step that generates static media assets for WebUI #15311
Conversation
This adds a build step that embeds static media assets for the Pilosa WebUI (FeatureBaseDB/general#27).
I would appreciate a review of this PR. We are close to cutting a new release soon and would love to have this merged prior to the release. Thanks! |
@@ -15,13 +17,23 @@ class Pilosa < Formula | |||
depends_on "go" => :build | |||
depends_on "glide" => :build | |||
|
|||
go_resource "github.com/rakyll/statik" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be far preferable to use a Go vendor directory for this.
glide, govendor, godep, and dep are some good choices for managing a vendor directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pilosa already uses dep
for library dependencies (recently switched from Glide). However, statik
in this case is a binary dependency and is used as part of the build process (via go generate
). As far as I'm aware, it is not possible to install a binary from a vendored dependency.
Here is a relevant ticket in the Glide issue tracker: Masterminds/glide#418
And here is an existing homebrew-core package that includes statik
using the same method: https://github.com/Homebrew/homebrew-core/blob/master/Formula/aurora.rb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be preferable to create a homebrew package for statik (similar to the glide one) and depend on it?
Closing this in favor of #16336, which combines this change with a version bump. |
This uses
statik
to generate Go files containing the static media assets needed to display the Pilosa WebUI. This allows the WebUI to be accessed by HTTP on port 10101 after invokingpilosa server
.This fixes FeatureBaseDB/general#27.
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?