Merge pull request #41268 from jbboehr/consul-ui-fix-master-3

consul-ui: fix build
This commit is contained in:
Michael Raskin 2018-05-31 07:39:36 +00:00 committed by GitHub
commit 5737e1f729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 67 additions and 43 deletions

View File

@ -3,4 +3,3 @@ source "https://rubygems.org"
gem "uglifier" gem "uglifier"
gem "sass" gem "sass"
gem "therubyracer"

View File

@ -1,22 +1,25 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
execjs (2.3.0) execjs (2.7.0)
json (1.8.2) ffi (1.9.23)
libv8 (3.16.14.11) rb-fsevent (0.10.3)
ref (1.0.5) rb-inotify (0.9.10)
sass (3.4.11) ffi (>= 0.5.0, < 2)
therubyracer (0.12.1) sass (3.5.6)
libv8 (~> 3.16.14.0) sass-listen (~> 4.0.0)
ref sass-listen (4.0.0)
uglifier (2.7.0) rb-fsevent (~> 0.9, >= 0.9.4)
execjs (>= 0.3.0) rb-inotify (~> 0.9, >= 0.9.7)
json (>= 1.8.0) uglifier (4.1.10)
execjs (>= 0.3.0, < 3)
PLATFORMS PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
sass sass
therubyracer
uglifier uglifier
BUNDLED WITH
1.14.6

View File

@ -1,59 +1,62 @@
{ {
execjs = { execjs = {
version = "2.3.0";
source = { source = {
remotes = ["https://rubygems.org"];
sha256 = "1yz55sf2nd3l666ms6xr18sm2aggcvmb8qr3v53lr4rir32y1yp1";
type = "gem"; type = "gem";
sha256 = "097v02bhmzc70j7n0yyf8j0z5wms88zcmgpmggby4hnvqxf41y1h";
}; };
version = "2.7.0";
}; };
json = { ffi = {
version = "1.8.2";
source = { source = {
remotes = ["https://rubygems.org"];
sha256 = "0zw6pbyvmj8wafdc7l5h7w20zkp1vbr2805ql5d941g2b20pk4zr";
type = "gem"; type = "gem";
sha256 = "0zzvv25vjikavd3b1bp6lvbgj23vv9jvmnl4vpim8pv30z8p6vr5";
}; };
version = "1.9.23";
}; };
libv8 = { rb-fsevent = {
version = "3.16.14.11";
source = { source = {
remotes = ["https://rubygems.org"];
sha256 = "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8";
type = "gem"; type = "gem";
sha256 = "000vbiy78wk5r1f6p7qncab8ldg7qw5pjz7bchn3lw700gpaacxp";
}; };
version = "0.10.3";
}; };
ref = { rb-inotify = {
version = "1.0.5"; dependencies = ["ffi"];
source = { source = {
remotes = ["https://rubygems.org"];
sha256 = "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71";
type = "gem"; type = "gem";
sha256 = "19qgpsfszwc2sfh6wixgky5agn831qq8ap854i1jqqhy1zsci3la";
}; };
version = "0.9.10";
}; };
sass = { sass = {
version = "3.4.11"; dependencies = ["sass-listen"];
source = { source = {
remotes = ["https://rubygems.org"];
sha256 = "19wyzp9qsg8hdkkxlsv713w0qmy66qrdp0shj42587ssx4qhrlag";
type = "gem"; type = "gem";
sha256 = "10dncnv7g5v8d1xpw2aaarxjjlm68f7nm02ns2kl8nf3yxi6wzdf";
}; };
version = "3.5.6";
}; };
therubyracer = { sass-listen = {
version = "0.12.1"; dependencies = ["rb-fsevent" "rb-inotify"];
source = { source = {
remotes = ["https://rubygems.org"];
sha256 = "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df";
type = "gem"; type = "gem";
sha256 = "106fqimqyaalh7p6czbl5m2j69z8gv7cm10mjb8bbb2p2vlmqmi6";
}; };
dependencies = [ version = "4.0.0";
"libv8"
"ref"
];
}; };
uglifier = { uglifier = {
version = "2.7.0"; dependencies = ["execjs"];
source = { source = {
remotes = ["https://rubygems.org"];
sha256 = "0dycp9c5xiricla6sgvg0vf22i3axs5k1v1607dvl7nv1xkkaczi";
type = "gem"; type = "gem";
sha256 = "1x1mnakx086l83a3alj690c6n8kfmb4bk243a6m6yz99s15gbxfq";
}; };
dependencies = [ version = "4.1.10";
"execjs"
"json"
];
}; };
} }

View File

@ -0,0 +1,17 @@
diff --git a/ui/scripts/dist.sh b/ui/scripts/dist.sh
index 0ad6e28e..db340da0 100755
--- a/ui/scripts/dist.sh
+++ b/ui/scripts/dist.sh
@@ -15,10 +15,9 @@ DEPLOY="../pkg/web_ui"
rm -rf $DEPLOY
mkdir -p $DEPLOY
-bundle check >/dev/null 2>&1 || bundle install
-bundle exec sass styles/base.scss static/base.css
+sass styles/base.scss static/base.css
-bundle exec ruby scripts/compile.rb
+ruby scripts/compile.rb
# Copy into deploy
shopt -s dotglob

View File

@ -1,4 +1,4 @@
{ stdenv, consul, ruby, bundlerEnv, zip }: { stdenv, consul, ruby, bundlerEnv, zip, nodejs }:
let let
# `sass` et al # `sass` et al
@ -13,9 +13,11 @@ stdenv.mkDerivation {
src = consul.src; src = consul.src;
buildInputs = [ ruby gems zip ]; buildInputs = [ ruby gems zip nodejs ];
patchPhase = "patchShebangs ./ui/scripts/dist.sh"; patches = [ ./ui-no-bundle-exec.patch ];
postPatch = "patchShebangs ./ui/scripts/dist.sh";
buildPhase = '' buildPhase = ''
# Build ui static files # Build ui static files