Skip to content

Commit

Permalink
Merge pull request #129 from ayapapa/3.4.7
Browse files Browse the repository at this point in the history
3.4.7
  • Loading branch information
ayapapa authored Feb 12, 2019
2 parents c3b3f89 + 4064bb7 commit 30997a0
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 24 deletions.
13 changes: 10 additions & 3 deletions inst-script/gems
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,25 @@ then
gem update --system 2.7.4
fi

# インストールするディレクトリ名
# あらかじめインストールしておくrubygems
BUNDLER=bundle
NAME=(`grep -v "^#" inst-script/rubygems.lst | awk -F, '{print $1}'`)
VER=(`grep -v "^#" inst-script/rubygems.lst | awk -F, '{print $2}'`)

for (( i = 0; i < ${#NAME[@]}; ++i ))
do
NAME=${NAME[$i]}
VER=${VER[$i]}
echo "**** install ${NAME} (ver. = ${VER}) ****"
if [ "${VER}" = "-" ]
then
${GEM} install -f ${NAME} --no-rdoc --no-ri
${GEM} install -f ${NAME} --no-document
else
${GEM} install -f ${NAME} -v=${VER} --no-rdoc --no-ri
${GEM} install -f ${NAME} -v=${VER} --no-document
# issue #128対応:特定バージョンのbundlerが必要。
if [ "${NAME}" = "bundler" ]
then
BUNDLER="bundle _${VER}_"
fi
fi
done
4 changes: 2 additions & 2 deletions inst-script/install-redmine
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ install_gems() {
fi

# redmineに必要なgemをインストール
bundle install --path vendor/bundle \
${BUNDLER} install --path vendor/bundle \
--without development test postgresql sqlite xapian
popd
}

# create secret token
create_redmine_token() {
pushd ${ALM_INSTALL_DIR}
bundle exec rake generate_secret_token
${BUNDLER} exec rake generate_secret_token
popd
}

Expand Down
8 changes: 4 additions & 4 deletions inst-script/post-install
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ else
# installed from gem. so configure with bundle exec i
# passenger-install-apache2-module
pushd ${ALM_INSTALL_DIR}
bundle exec passenger-install-apache2-module --snippet > ${ALM_ETC_DIR}/passenger.conf
if [ `echo ${OS} | grep rhel` != "" ]; then
bundle exec passenger-install-apache2-module --auto
${BUNDLER} exec passenger-install-apache2-module --snippet > ${ALM_ETC_DIR}/passenger.conf
if [ "`echo ${OS} | grep rhel`" != "" ]; then
${BUNDLER} exec passenger-install-apache2-module --auto
else
bundle exec passenger-install-apache2-module --auto --apxs2-path='/usr/bin/apxs'
${BUNDLER} exec passenger-install-apache2-module --auto --apxs2-path='/usr/bin/apxs'
fi
popd
ln -sf "${ALM_ETC_DIR}/passenger.conf" "${APACHE_CONF_DIR}/"
Expand Down
2 changes: 1 addition & 1 deletion inst-script/rubygems.lst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# for redmine
bundler,-
bundler,1.17.3
rake,-
rake-compiler,-
4 changes: 2 additions & 2 deletions redmine/setup/install-plugins-jenkins
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ if [ "${ALM_DB_SETUP}" = "y" ]; then

# install gems and migrate database
cd ..
bundle install --path vendor/bundle \
${BUNDLER} install --path vendor/bundle \
--without development test postgresql sqlite xapian
bundle exec rake redmine:plugins:migrate \
${BUNDLER} exec rake redmine:plugins:migrate \
RAILS_ENV=production NAME=redmine_jenkins
fi

Expand Down
16 changes: 8 additions & 8 deletions redmine/setup/setup-db
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ echo "*** run initialize DB ***"
pushd ${ALM_INSTALL_DIR}

# データベースにテーブルを作成
bundle exec rake db:migrate RAILS_ENV=production
${BUNDLER} exec rake db:migrate RAILS_ENV=production

# データベースにデフォルトデータを登録
echo 'ja' |\
bundle exec rake redmine:load_default_data RAILS_ENV=production
${BUNDLER} exec rake redmine:load_default_data RAILS_ENV=production

# プラグインをデータベースに登録
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
${BUNDLER} exec rake redmine:plugins:migrate RAILS_ENV=production

# for XLS export
if [ -d plugins/redmine_xls_export ]; then
bundle exec rake redmine:plugins:process_version_change RAILS_ENV=production
${BUNDLER} exec rake redmine:plugins:process_version_change RAILS_ENV=production
fi

# for backlogs
if [ -d plugins/redmine_backlogs ]; then
if [ "$(db_setupped)" = "" ]; then
bundle exec rake redmine:backlogs:install task_tracker=サポート \
${BUNDLER} exec rake redmine:backlogs:install task_tracker=サポート \
story_trackers=機能 labels=false RAILS_ENV=production
else
bundle exec rake redmine:backlogs:install task_tracker=タスク \
${BUNDLER} exec rake redmine:backlogs:install task_tracker=タスク \
story_trackers=機能 labels=false RAILS_ENV=production
fi
fi

# キャッシュクリア
bundle exec rake tmp:cache:clear RAILS_ENV=production
bundle exec rake tmp:sessions:clear RAILS_ENV=production
${BUNDLER} exec rake tmp:cache:clear RAILS_ENV=production
${BUNDLER} exec rake tmp:sessions:clear RAILS_ENV=production

# DB Customize
if [ "$(db_setupped)" = "" ]; then
Expand Down
8 changes: 4 additions & 4 deletions restore
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ if [ "${ALM_DB_RESTORE}" != "no" ]; then
#データベースのマイグレーション
echo "データベースのマイグレーションを実施します。"
cd ${ALM_INSTALL_DIR}
bundle exec rake db:migrate RAILS_ENV=production
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
bundle exec rake tmp:cache:clear RAILS_ENV=production
bundle exec rake tmp:sessions:clear RAILS_ENV=production
${BUNDLER} exec rake db:migrate RAILS_ENV=production
${BUNDLER} exec rake redmine:plugins:migrate RAILS_ENV=production
${BUNDLER} exec rake tmp:cache:clear RAILS_ENV=production
${BUNDLER} exec rake tmp:sessions:clear RAILS_ENV=production
echo "データベースのマイグレーションが完了しました。"
fi

Expand Down

0 comments on commit 30997a0

Please sign in to comment.