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.3.0

This commit is contained in:
Jimmy Monin 2019-06-25 21:22:10 +02:00
parent 52be2336ba
commit 62557e6c9f
9 changed files with 67 additions and 16 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.2.6
**Shipped version:** 2.3.0
## Screenshots

View file

@ -1,3 +1,3 @@
SOURCE_URL=https://github.com/discourse/discourse/archive/v2.2.6.tar.gz
SOURCE_SUM=6d64745f50f9fb6d99e3c766d758869a9baa36ad0ccfc254b215fbcba232f52a
SOURCE_URL=https://github.com/discourse/discourse/archive/v2.3.0.tar.gz
SOURCE_SUM=22a8c9dbc6df396f7ee4946f5a2ecdca3e42fad2d1c238dab17f65b316cce754
SOURCE_FORMAT=tar.gz

View file

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

View file

@ -3,7 +3,7 @@
# Common variables
#
pkg_dependencies="libjemalloc1 libjemalloc-dev zlib1g-dev libreadline-dev libpq-dev libssl-dev libyaml-dev libcurl4-openssl-dev libapr1-dev libxslt1-dev checkinstall libxml2-dev vim imagemagick postgresql postgresql-server-dev-all postgresql-contrib optipng jhead jpegoptim gifsicle"
pkg_dependencies="libjemalloc1 libjemalloc-dev zlib1g-dev libreadline-dev libpq-dev libssl-dev libyaml-dev libcurl4-openssl-dev libapr1-dev libxslt1-dev checkinstall libxml2-dev vim imagemagick postgresql postgresql-server-dev-all postgresql-contrib optipng jhead jpegoptim gifsicle brotli"
RUBY_VERSION="2.6.0"
# Execute a command as another user with login

View file

@ -114,7 +114,17 @@ if ! ynh_is_upstream_up_to_date ; then
if [ -d $tmpdir/log ] ; then
cp -Rp $tmpdir/log $final_path
fi
cp -Rp $tmpdir/plugins/* $final_path/plugins
(
cd $tmpdir/plugins/
for discourse_plugin_dir in */
do
# Only copy plugins not included in Discourse archive
if [ ! -d "$final_path/plugins/$discourse_plugin_dir" ]
then
cp -a "$discourse_plugin_dir" "$final_path/plugins/$discourse_plugin_dir"
fi
done
)
cp -Rp $tmpdir/log $final_path
cp -p $tmpdir/discourse.conf $final_path/config

View file

@ -1,5 +1,5 @@
diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake
index 8575ca11dc..a643316bac 100644
index 4a02d5f1b1..7b47f21658 100644
--- a/lib/tasks/assets.rake
+++ b/lib/tasks/assets.rake
@@ -94,6 +94,7 @@ def compress_ruby(from, to)

View file

@ -0,0 +1,29 @@
diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake
index 7b47f21658..ea6d0da2c4 100644
--- a/lib/tasks/assets.rake
+++ b/lib/tasks/assets.rake
@@ -116,9 +116,21 @@ def gzip(path)
end
# different brotli versions use different parameters
-def brotli_command(path, max_compress)
- compression_quality = max_compress ? "11" : "6"
- "brotli -f --quality=#{compression_quality} #{path} --output=#{path}.br"
+ver_out, _ver_err, ver_status = Open3.capture3('brotli --version')
+if !ver_status.success?
+ # old versions of brotli don't respond to --version
+ def brotli_command(path, max_compress)
+ compression_quality = max_compress ? "11" : "6"
+ "brotli --quality 11 --input #{path} --output #{path}.br"
+ end
+elsif ver_out >= "brotli 1.0.0"
+ def brotli_command(path, max_compress)
+ compression_quality = max_compress ? "11" : "6"
+ "brotli -f --quality=11 #{path} --output=#{path}.br"
+ end
+else
+ # not sure what to do here, not expecting this
+ raise "cannot determine brotli version"
end
def brotli(path, max_compress)

View file

@ -0,0 +1,12 @@
diff --git a/lib/discourse.rb b/lib/discourse.rb
index 2b53a91eb3..eec55647d5 100644
--- a/lib/discourse.rb
+++ b/lib/discourse.rb
@@ -439,7 +439,7 @@ module Discourse
$full_version ||=
begin
git_cmd = 'git describe --dirty --match "v[0-9]*"'
- self.try_git(git_cmd, 'unknown')
+ self.try_git(git_cmd, Discourse::VERSION::STRING)
end
end

View file

@ -1,24 +1,24 @@
diff --git a/Gemfile.lock b/Gemfile.lock
index df7187902b..04c80a956c 100644
index 0fa35801f0..2b7c4a3fc8 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -172,7 +172,7 @@ GEM
jwt (2.1.0)
@@ -154,7 +154,7 @@ GEM
json (2.2.0)
jwt (2.2.1)
kgio (2.11.2)
kramdown (1.17.0)
- libv8 (7.3.492.27.1)
+ libv8 (6.3.292.48.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
@@ -200,8 +200,8 @@ GEM
method_source (0.8.2)
@@ -182,8 +182,8 @@ GEM
method_source (0.9.2)
mini_mime (1.0.1)
mini_portile2 (2.4.0)
- mini_racer (0.2.5)
- mini_racer (0.2.6)
- libv8 (>= 6.9.411)
+ mini_racer (0.1.15)
+ libv8 (~> 6.3)
mini_scheduler (0.9.1)
mini_scheduler (0.9.2)
sidekiq
mini_sql (0.1.10)
mini_sql (0.2.2)