Merge branch 'develop' into 'develop'
authorlain <lain@soykaf.club>
Mon, 21 Dec 2020 17:13:52 +0000 (17:13 +0000)
committerlain <lain@soykaf.club>
Mon, 21 Dec 2020 17:13:52 +0000 (17:13 +0000)
WebFinger: add subscribe_address in return data of JSON responses

See merge request pleroma/pleroma!3206

config/description.exs
installation/download-mastofe-build.sh

index a916a0711f5559c8248a30b2dc48847de6f209b7..cf004f0cfe32426cc916a3698e48e2a7348a81a7 100644 (file)
@@ -1953,14 +1953,8 @@ config :pleroma, :config_description, [
     group: :pleroma,
     key: Oban,
     type: :group,
-    description: """
-    [Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.
-
-    Note: if you are running PostgreSQL in [`silent_mode`](https://postgresqlco.nf/en/doc/param/silent_mode?version=9.1),
-      it's advised to set [`log_destination`](https://postgresqlco.nf/en/doc/param/log_destination?version=9.1) to `syslog`,
-      otherwise `postmaster.log` file may grow because of "you don't own a lock of type ShareLock" warnings
-      (see https://github.com/sorentwo/oban/issues/52).
-    """,
+    description:
+      "[Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.",
     children: [
       %{
         key: :log,
index ee9e1c21782eae3947f48ebe88c7745e5f3a39f8..b8a021ef3dc5ee7f060484013ba7f0134247d23d 100755 (executable)
@@ -9,29 +9,32 @@ static_dir="instance/static"
 # project_branch="pleroma"
 # static_dir="priv/static"
 
-if [[ ! -d "${static_dir}" ]]
+if [ ! -d "${static_dir}" ]
 then
        echo "Error: ${static_dir} directory is missing, are you sure you are running this script at the root of pleroma’s repository?"
        exit 1
 fi
 
-last_modified="$(curl -s -I 'https://git.pleroma.social/api/v4/projects/'${project_id}'/jobs/artifacts/'${project_branch}'/download?job=build' | grep '^Last-Modified:' | cut -d: -f2-)"
+last_modified="$(curl --fail -s -I 'https://git.pleroma.social/api/v4/projects/'${project_id}'/jobs/artifacts/'${project_branch}'/download?job=build' | grep '^Last-Modified:' | cut -d: -f2-)"
 
 echo "branch:${project_branch}"
 echo "Last-Modified:${last_modified}"
 
 artifact="mastofe.zip"
 
-if [[ -e mastofe.timestamp ]] && [[ "${last_modified}" != "" ]]
+if [ "${last_modified}x" = "x" ]
 then
-       if [[ "$(cat mastofe.timestamp)" == "${last_modified}" ]]
-       then
-               echo "MastoFE is up-to-date, exiting…"
-               exit 0
-       fi
+       echo "ERROR: Couldn't get the modification date of the latest build archive, maybe it expired, exiting..."
+       exit 1
+fi
+
+if [ -e mastofe.timestamp ] && [ "$(cat mastofe.timestamp)" = "${last_modified}" ]
+then
+       echo "MastoFE is up-to-date, exiting..."
+       exit 0
 fi
 
-curl -c - "https://git.pleroma.social/api/v4/projects/${project_id}/jobs/artifacts/${project_branch}/download?job=build" -o "${artifact}" || exit
+curl --fail -c - "https://git.pleroma.social/api/v4/projects/${project_id}/jobs/artifacts/${project_branch}/download?job=build" -o "${artifact}" || exit
 
 # TODO: Update the emoji as well
 rm -fr "${static_dir}/sw.js" "${static_dir}/packs" || exit