[packages/gitlab-ce] 8.17 uses webpack
glen
glen at pld-linux.org
Tue Apr 18 20:51:39 CEST 2017
commit c7498e232ad083691535b180c44a1dd9557b9c44
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Apr 18 21:50:25 2017 +0300
8.17 uses webpack
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7288
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/8.16-to-8.17.md#4-update-node
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/8.16-to-8.17.md#6-install-libs-migrations-etc
clean-vendor.sh | 8 ++++++++
gitlab-ce.spec | 13 +++++++++++--
2 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/gitlab-ce.spec b/gitlab-ce.spec
index f724151..a1b66d2 100644
--- a/gitlab-ce.spec
+++ b/gitlab-ce.spec
@@ -19,7 +19,7 @@
Summary: A Web interface to create projects and repositories, manage access and do code reviews
Name: gitlab-ce
Version: 8.17.5
-Release: 0.86
+Release: 0.88
License: MIT
Group: Applications/WWW
# md5 deliberately omitted until this package is useful
@@ -48,6 +48,8 @@ BuildRequires: libicu-devel
BuildRequires: libstdc++-devel
BuildRequires: libxml2-devel
BuildRequires: mysql-devel
+BuildRequires: nodejs >= 4.3
+BuildRequires: npm
BuildRequires: postgresql-devel
BuildRequires: rpm-rubyprov
BuildRequires: rpmbuild(macros) >= 1.647
@@ -138,12 +140,19 @@ v=0.25.0b7
test -d vendor/bundle/ruby/gems/rugged-$v || \
bundle exec gem install -v $v rugged --no-rdoc --no-ri --verbose
+# install webpack deps, used later by rake webpack:compile:
+# node_modules/.bin/webpack --config config/webpack.config.js --bail
+# see vendor/bundle/ruby/gems/webpack-rails-0.9.9/lib/tasks/webpack.rake
+test -d node_modules || \
+npm install
+
# precompile assets
+# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/8.17.5+ce.0/config/software/gitlab-rails.rb
# use modified config so it doesn't croak
cp -p config/gitlab.yml{,.production}
sed -i -e '/secret_file:/d' config/gitlab.yml
sed -i -e 's#/var/lib/gitlab/repositories/#./#' config/gitlab.yml
-bundle exec rake RAILS_ENV=production assets:clean assets:precompile USE_DB=false
+bundle exec rake RAILS_ENV=production assets:clean assets:precompile webpack:compile USE_DB=false
mv -f config/gitlab.yml{.production,}
# avoid bogus ruby dep
diff --git a/clean-vendor.sh b/clean-vendor.sh
index e9ebdbb..c110f0b 100755
--- a/clean-vendor.sh
+++ b/clean-vendor.sh
@@ -97,7 +97,15 @@ clean_rubygems() {
rm -rfv gems/rugged-*/vendor
}
+clean_node() {
+ cd $root
+
+ # needed only for webpack during build
+ rm -r node_modules
+}
+
root=$1
clean_rootfiles
clean_rubygems
+clean_node
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gitlab-ce.git/commitdiff/c7498e232ad083691535b180c44a1dd9557b9c44
More information about the pld-cvs-commit
mailing list