Switch to yarn from npm
This commit is contained in:
parent
1a1d85effb
commit
3ddd53cf97
5 changed files with 20 additions and 3 deletions
2
debian/gitlab.links
vendored
2
debian/gitlab.links
vendored
|
@ -2,12 +2,14 @@ var/lib/gitlab/public usr/share/gitlab/public
|
||||||
var/lib/gitlab/shared usr/share/gitlab/shared
|
var/lib/gitlab/shared usr/share/gitlab/shared
|
||||||
var/lib/gitlab/db usr/share/gitlab/db
|
var/lib/gitlab/db usr/share/gitlab/db
|
||||||
var/lib/gitlab/node_modules usr/share/gitlab/node_modules
|
var/lib/gitlab/node_modules usr/share/gitlab/node_modules
|
||||||
|
var/lib/gitlab/yarn.lock usr/share/gitlab/yarn.lock
|
||||||
var/lib/gitlab/.ssh usr/share/gitlab/.ssh
|
var/lib/gitlab/.ssh usr/share/gitlab/.ssh
|
||||||
var/lib/gitlab/.bundle usr/share/gitlab/.bundle
|
var/lib/gitlab/.bundle usr/share/gitlab/.bundle
|
||||||
var/lib/gitlab/secrets.yml etc/gitlab/secrets.yml
|
var/lib/gitlab/secrets.yml etc/gitlab/secrets.yml
|
||||||
var/lib/gitlab/locale usr/share/gitlab/app/assets/javascripts/locale
|
var/lib/gitlab/locale usr/share/gitlab/app/assets/javascripts/locale
|
||||||
usr/share/gitlab/app/assets/javascripts/locale.static/index.js var/lib/gitlab/locale/index.js
|
usr/share/gitlab/app/assets/javascripts/locale.static/index.js var/lib/gitlab/locale/index.js
|
||||||
var/log/gitlab usr/share/gitlab/log
|
var/log/gitlab usr/share/gitlab/log
|
||||||
|
var/log/gitlab/yarn-error.log usr/share/gitlab/yarn-error.log
|
||||||
var/log/gitlab/builds usr/share/gitlab/builds
|
var/log/gitlab/builds usr/share/gitlab/builds
|
||||||
run/gitlab usr/share/gitlab/tmp
|
run/gitlab usr/share/gitlab/tmp
|
||||||
etc/gitlab usr/share/gitlab/config
|
etc/gitlab usr/share/gitlab/config
|
||||||
|
|
11
debian/patches/0430-use-yarn.patch
vendored
Normal file
11
debian/patches/0430-use-yarn.patch
vendored
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/package.json
|
||||||
|
+++ b/package.json
|
||||||
|
@@ -13,7 +13,7 @@
|
||||||
|
"webpack-prod": "NODE_ENV=production webpack --config config/webpack.config.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
- "npm": "^5.6.0",
|
||||||
|
+ "yarn": "^1.5.1",
|
||||||
|
"autosize": "^4.0.0",
|
||||||
|
"axios": "^0.17.1",
|
||||||
|
"blackst0ne-mermaid": "^7.1.0-fixed",
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
|
@ -22,6 +22,7 @@ pid-log-paths.patch
|
||||||
0392-relax-flipper.patch
|
0392-relax-flipper.patch
|
||||||
0410-set-webpack-root.patch
|
0410-set-webpack-root.patch
|
||||||
0420-use-system-libs.patch
|
0420-use-system-libs.patch
|
||||||
|
0430-use-yarn.patch
|
||||||
890757.patch
|
890757.patch
|
||||||
add-system-lib-path-for-webpack.patch
|
add-system-lib-path-for-webpack.patch
|
||||||
remove-bundle-analyzer.patch
|
remove-bundle-analyzer.patch
|
||||||
|
|
5
debian/postinst
vendored
5
debian/postinst
vendored
|
@ -70,10 +70,13 @@ gitlab_user=$RET >/dev/null
|
||||||
. /usr/lib/gitlab/scripts/adduser.sh
|
. /usr/lib/gitlab/scripts/adduser.sh
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# update Gemfile.lock, always
|
# update Gemfile.lock and yarn.lock, always
|
||||||
#######################################################################
|
#######################################################################
|
||||||
runuser -u ${gitlab_user} -- sh -c "touch ${gitlab_data_dir}/Gemfile.lock && \
|
runuser -u ${gitlab_user} -- sh -c "touch ${gitlab_data_dir}/Gemfile.lock && \
|
||||||
truncate -s 0 ${gitlab_data_dir}/Gemfile.lock"
|
truncate -s 0 ${gitlab_data_dir}/Gemfile.lock"
|
||||||
|
runuser -u ${gitlab_user} -- sh -c "touch ${gitlab_data_dir}/yarn.lock && \
|
||||||
|
truncate -s 0 ${gitlab_data_dir}/yarn.lock"
|
||||||
|
runuser -u ${gitlab_user} -- sh -c "touch ${gitlab_log_dir}/yarn-error.log"
|
||||||
cd ${gitlab_app_root}
|
cd ${gitlab_app_root}
|
||||||
if ! runuser -u ${gitlab_user} -- sh -c 'bundle --local --quiet'; then
|
if ! runuser -u ${gitlab_user} -- sh -c 'bundle --local --quiet'; then
|
||||||
if [ "$1" = "triggered" ]; then
|
if [ "$1" = "triggered" ]; then
|
||||||
|
|
4
debian/rake-tasks.sh
vendored
4
debian/rake-tasks.sh
vendored
|
@ -30,8 +30,8 @@ chmod 0700 ${gitlab_data_dir}/.gitlab_shell_secret
|
||||||
|
|
||||||
echo "Installing node modules..."
|
echo "Installing node modules..."
|
||||||
runuser -u ${gitlab_user} -- sh -c 'install -d /var/lib/gitlab/node_modules'
|
runuser -u ${gitlab_user} -- sh -c 'install -d /var/lib/gitlab/node_modules'
|
||||||
runuser -u ${gitlab_user} -- sh -c 'npm install npm@5 ajv-keywords@2.1'
|
runuser -u ${gitlab_user} -- sh -c 'npm install yarn'
|
||||||
runuser -u ${gitlab_user} -- sh -c 'node_modules/.bin/npm install'
|
runuser -u ${gitlab_user} -- sh -c 'node_modules/.bin/yarn install'
|
||||||
|
|
||||||
echo "Precompiling locales..."
|
echo "Precompiling locales..."
|
||||||
runuser -u ${gitlab_user} -- sh -c 'bundle exec rake gettext:po_to_json'
|
runuser -u ${gitlab_user} -- sh -c 'bundle exec rake gettext:po_to_json'
|
||||||
|
|
Loading…
Reference in a new issue