From 7ea7c1aa833a2f6ec8eb9f973db90ab4b3cbcf57 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 6 Dec 2016 12:11:04 +0100 Subject: [PATCH] packager.io need to have a working ruby env to download zammad locales and translations. --- .pkgr.yml | 3 +-- contrib/packager.io/after.sh | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100755 contrib/packager.io/after.sh diff --git a/.pkgr.yml b/.pkgr.yml index 706357181..528e4cbdc 100644 --- a/.pkgr.yml +++ b/.pkgr.yml @@ -26,8 +26,7 @@ before: - "cat Gemfile.lock" - contrib/cleanup.sh after: - - rails r 'Locale.fetch' - - rails r 'Translation.fetch' + - contrib/after.sh env: - RAILS_ENV=production - PORT=3000 diff --git a/contrib/packager.io/after.sh b/contrib/packager.io/after.sh new file mode 100755 index 000000000..b53ea91ad --- /dev/null +++ b/contrib/packager.io/after.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# packager.io after script +# + +PATH=`pwd`/bin:`pwd`/vendor/bundle/bin:$PATH + +set -e + +# download locales and translations to make a offline installation possible +gem install bundle +bundle install + +rake db:migrate +rake db:seed + +rails r 'Locale.fetch' +rails r 'Translation.fetch' + +rm -rf tmp/cache*