1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/discourse_ynh.git synced 2024-09-03 18:26:18 +02:00

Upgrade to upstream version 2.0.3

This commit is contained in:
Jimmy Monin 2018-08-01 23:08:07 +02:00
parent 7774cfef4b
commit b76905fdec
5 changed files with 29 additions and 6 deletions

View file

@ -32,7 +32,7 @@ Finally, if installing on a low-end ARM device (e.g. Raspberry Pi):
To learn more about the philosophy and goals of the project, [visit **discourse.org**](http://www.discourse.org).
**Shipped version:** 2.0.2
**Shipped version:** 2.0.3
## Screenshots

View file

@ -1,3 +1,3 @@
SOURCE_URL=https://github.com/discourse/discourse/archive/v2.0.2.tar.gz
SOURCE_SUM=74ca79758a808664a6d9e18e76c2ea543f72494627ea0eccb29372b97a6c836a
SOURCE_URL=https://github.com/discourse/discourse/archive/v2.0.3.tar.gz
SOURCE_SUM=ce6d91e429cea8f5e7c2ac005ae3908986c086a83a684d21a0c608bc3b21e757
SOURCE_FORMAT=tar.gz

View file

@ -6,7 +6,7 @@
"en": "Discussion platform",
"fr": "Plateforme de discussion"
},
"version": "2.0.2~ynh1",
"version": "2.0.3~ynh1",
"url": "http://Discourse.org",
"license": "GPL-2.0",
"maintainer": {

View file

@ -153,6 +153,9 @@ redis_db=$(ynh_redis_get_free_db)
ynh_app_setting_set "$app" redis_db "$redis_db"
ynh_replace_string "redis_db = 0" "redis_db = $redis_db" "$discourse_config_file"
# Don't notify on new versions (handled by the YunoHost package)
ynh_replace_string "new_version_emails = true" "new_version_emails = false" "$discourse_config_file"
# Calculate and store the config file checksum
ynh_store_file_checksum "$discourse_config_file"
@ -191,10 +194,19 @@ chown -R $app: $final_path
gem install bundler
# Install without documentation
exec_as $app echo "gem: --no-ri --no-rdoc" >> "$final_path/.gemrc")
# If on ARM architecture, define the platform specificly to retrieve binaries
# for libv8 because it currently doesn't compile on ARM devices
# Specific actions on ARM architecture
if [ -n "$(uname -m | grep arm)" ] ; then
# Define the platform specifically to retrieve binaries
# for libv8 because it currently doesn't compile on ARM devices
exec_login_as $app bundle config specific_platform arm-linux
# Unapply commit cf9b4a789b855b5199e98a13424e409854a8e848 that breaks ARM
# compatibility by pointing to a recent libv8 version
# This is due to this libv8 issue (https://github.com/cowboyd/libv8/issues/261)
# that prevents it from being compiled on ARM hence no binary gem is available yet
(cd $final_path
wget https://github.com/discourse/discourse/commit/cf9b4a789b855b5199e98a13424e409854a8e848.diff -O libv8-patch.diff
patch -R -p1 < libv8-patch.diff
rm libv8-patch.diff)
fi
# Install dependencies
exec_login_as $app MAKEFLAGS=-j2 bundle install --jobs 2 --path vendor/bundle --with development

View file

@ -172,6 +172,17 @@ if ! ynh_is_upstream_up_to_date ; then
gem install bundler
# Install without documentation
exec_as $app echo "gem: --no-ri --no-rdoc" >> "$final_path/.gemrc"
# Specific actions on ARM architecture
if [ -n "$(uname -m | grep arm)" ] ; then
# Unapply commit cf9b4a789b855b5199e98a13424e409854a8e848 that breaks ARM
# compatibility by pointing to a recent libv8 version
# This is due to this libv8 issue (https://github.com/cowboyd/libv8/issues/261)
# that prevents it from being compiled on ARM hence no binary gem is available yet
(cd $final_path
wget https://github.com/discourse/discourse/commit/cf9b4a789b855b5199e98a13424e409854a8e848.diff -O libv8-patch.diff
patch -R -p1 < libv8-patch.diff
rm libv8-patch.diff)
fi
# Install dependencies
exec_login_as $app bundle install --path vendor/bundle --with development)
# On ARM architecture, replace bundled libpsl by system native libpsl