From bbdbb4499b9617207b72eceda50f71f99fd1e6de Mon Sep 17 00:00:00 2001 From: Josue-T Date: Wed, 5 Dec 2018 07:37:41 +0100 Subject: [PATCH] Update to discourse v2.1.4 (#8) * Update to discourse v2.1.4 * Update patch name --- README.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- scripts/install | 1 + sources/patches/app-1-use-latest_uglify-js.patch | 12 ++++++++++++ 5 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 sources/patches/app-1-use-latest_uglify-js.patch diff --git a/README.md b/README.md index b077341..b450a6b 100644 --- a/README.md +++ b/README.md @@ -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.5 +**Shipped version:** 2.1.4 ## Screenshots diff --git a/conf/app.src b/conf/app.src index 622d78e..7af5795 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,3 +1,3 @@ -SOURCE_URL=https://github.com/discourse/discourse/archive/v2.0.5.tar.gz -SOURCE_SUM=3e02f90a14ef43f4801792e1811ee7601c897f11c9b27ed5cc9f52b806d0f4ec +SOURCE_URL=https://github.com/discourse/discourse/archive/v2.1.4.tar.gz +SOURCE_SUM=d9d4e6b4450b3de9e79e9149babbfd6e3e3d82b88168b6af1b976e524fdbfe94 SOURCE_FORMAT=tar.gz diff --git a/manifest.json b/manifest.json index 73ebae3..679e3f3 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Discussion platform", "fr": "Plateforme de discussion" }, - "version": "2.0.5~ynh1", + "version": "2.1.4~ynh1", "url": "http://Discourse.org", "license": "GPL-2.0", "maintainer": { diff --git a/scripts/install b/scripts/install index a263987..9a25b25 100644 --- a/scripts/install +++ b/scripts/install @@ -92,6 +92,7 @@ CREATE EXTENSION IF NOT EXISTS hstore; CREATE EXTENSION IF NOT EXISTS pg_trgm;" #================================================= # Download, check integrity, uncompress and patch the source from app.src +# Use the patch from https://meta.discourse.org/t/uglifier-error-during-assets-precompile/96970/4 to fix the Uglifier error ynh_setup_source "$final_path" # Install LDAP plugin mkdir -p "$final_path/plugins/discourse-ldap-auth" diff --git a/sources/patches/app-1-use-latest_uglify-js.patch b/sources/patches/app-1-use-latest_uglify-js.patch new file mode 100644 index 0000000..c8b9584 --- /dev/null +++ b/sources/patches/app-1-use-latest_uglify-js.patch @@ -0,0 +1,12 @@ +diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake +index bdca7c30ed..847a8d07c2 100644 +--- a/lib/tasks/assets.rake ++++ b/lib/tasks/assets.rake +@@ -95,6 +95,7 @@ def compress_ruby(from, to) + data = File.read("#{assets_path}/#{from}") + + uglified, map = Uglifier.new(comments: :none, ++ harmony: true, + source_map: { + filename: File.basename(from), + output_filename: File.basename(to) \ No newline at end of file