From de1e4876952c4962382af7d53c3152647bc239f5 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Thu, 20 Jul 2023 17:01:29 +0100 Subject: [PATCH 01/11] add potential arm setup --- .woodpecker/arm.yml | 65 +++++++++++++++++++++ .woodpecker.yml => .woodpecker/pipeline.yml | 0 2 files changed, 65 insertions(+) create mode 100644 .woodpecker/arm.yml rename .woodpecker.yml => .woodpecker/pipeline.yml (100%) diff --git a/.woodpecker/arm.yml b/.woodpecker/arm.yml new file mode 100644 index 000000000..b3240abe5 --- /dev/null +++ b/.woodpecker/arm.yml @@ -0,0 +1,65 @@ +platform: linux/arm64 + +variables: + - &scw-secrets + - SCW_ACCESS_KEY + - SCW_SECRET_KEY + - SCW_DEFAULT_ORGANIZATION_ID + - &setup-hex "mix local.hex --force && mix local.rebar --force" + - &on-release + when: + event: + - push + - tag + branch: + - develop + - stable + - refs/tags/v* + - refs/tags/stable-* + - &on-stable + when: + event: + - push + - tag + branch: + - stable + - refs/tags/stable-* + - &on-point-release + when: + event: + - push + branch: + - develop + - stable + - &on-pr-open + when: + event: + - pull_request + + - &tag-build "export BUILD_TAG=$${CI_COMMIT_TAG:-\"$CI_COMMIT_BRANCH\"} && export PLEROMA_BUILD_BRANCH=$BUILD_TAG" + + - &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)" + - &mix-clean "mix deps.clean --all && mix clean" + +pipeline: + # Canonical amd64 + ubuntu22: + image: hexpm/elixir:1.14.3-erlang-25.2.2-ubuntu-jammy-20221130 + when: + event: + - push + branch: + - arm + <<: *on-release + environment: + MIX_ENV: prod + DEBIAN_FRONTEND: noninteractive + commands: + - apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev git build-essential g++ wget + - *clean + - echo "import Config" > config/prod.secret.exs + - *setup-hex + - *tag-build + - mix deps.get --only prod + - mix release --path release + - zip akkoma-ubuntu-jammy.zip -r release diff --git a/.woodpecker.yml b/.woodpecker/pipeline.yml similarity index 100% rename from .woodpecker.yml rename to .woodpecker/pipeline.yml From f7a4147788872676d515e407c751dd088f0a792d Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Thu, 20 Jul 2023 17:02:41 +0100 Subject: [PATCH 02/11] split by architecture --- .woodpecker/{pipeline.yml => amd64.yml} | 2 ++ 1 file changed, 2 insertions(+) rename .woodpecker/{pipeline.yml => amd64.yml} (99%) diff --git a/.woodpecker/pipeline.yml b/.woodpecker/amd64.yml similarity index 99% rename from .woodpecker/pipeline.yml rename to .woodpecker/amd64.yml index 49718d630..0c7645a63 100644 --- a/.woodpecker/pipeline.yml +++ b/.woodpecker/amd64.yml @@ -1,3 +1,5 @@ +platform: linux/amd64 + variables: - &scw-secrets - SCW_ACCESS_KEY From a91a3f6e60bb17b55d40eafb8373ed31fd6b9725 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Thu, 20 Jul 2023 17:02:54 +0100 Subject: [PATCH 03/11] test on push --- .woodpecker/arm.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.woodpecker/arm.yml b/.woodpecker/arm.yml index b3240abe5..579ffba0c 100644 --- a/.woodpecker/arm.yml +++ b/.woodpecker/arm.yml @@ -50,7 +50,6 @@ pipeline: - push branch: - arm - <<: *on-release environment: MIX_ENV: prod DEBIAN_FRONTEND: noninteractive From 827c6b334453f23df9d179457eb14bfe6607abd9 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Thu, 20 Jul 2023 17:13:14 +0100 Subject: [PATCH 04/11] release --- .woodpecker/arm.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.woodpecker/arm.yml b/.woodpecker/arm.yml index 579ffba0c..82934038a 100644 --- a/.woodpecker/arm.yml +++ b/.woodpecker/arm.yml @@ -62,3 +62,16 @@ pipeline: - mix deps.get --only prod - mix release --path release - zip akkoma-ubuntu-jammy.zip -r release + + release-ubuntu22: + image: akkoma/releaser:arm64 + when: + event: + - push + branch: + - arm + secrets: *scw-secrets + commands: + - export SOURCE=akkoma-ubuntu-jammy.zip + - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-arm64-ubuntu-jammy.zip + - /bin/sh /entrypoint.sh From f44babd130fa3be18b1787cac61a5050d06dfddf Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Thu, 20 Jul 2023 17:27:58 +0100 Subject: [PATCH 05/11] restructure CI --- .woodpecker/arm.yml | 77 ----------- .woodpecker/{amd64.yml => build-amd64.yml} | 42 ------ .woodpecker/build-arm64.yml | 146 +++++++++++++++++++++ .woodpecker/docs.yml | 69 ++++++++++ .woodpecker/test.yml | 96 ++++++++++++++ 5 files changed, 311 insertions(+), 119 deletions(-) delete mode 100644 .woodpecker/arm.yml rename .woodpecker/{amd64.yml => build-amd64.yml} (82%) create mode 100644 .woodpecker/build-arm64.yml create mode 100644 .woodpecker/docs.yml create mode 100644 .woodpecker/test.yml diff --git a/.woodpecker/arm.yml b/.woodpecker/arm.yml deleted file mode 100644 index 82934038a..000000000 --- a/.woodpecker/arm.yml +++ /dev/null @@ -1,77 +0,0 @@ -platform: linux/arm64 - -variables: - - &scw-secrets - - SCW_ACCESS_KEY - - SCW_SECRET_KEY - - SCW_DEFAULT_ORGANIZATION_ID - - &setup-hex "mix local.hex --force && mix local.rebar --force" - - &on-release - when: - event: - - push - - tag - branch: - - develop - - stable - - refs/tags/v* - - refs/tags/stable-* - - &on-stable - when: - event: - - push - - tag - branch: - - stable - - refs/tags/stable-* - - &on-point-release - when: - event: - - push - branch: - - develop - - stable - - &on-pr-open - when: - event: - - pull_request - - - &tag-build "export BUILD_TAG=$${CI_COMMIT_TAG:-\"$CI_COMMIT_BRANCH\"} && export PLEROMA_BUILD_BRANCH=$BUILD_TAG" - - - &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)" - - &mix-clean "mix deps.clean --all && mix clean" - -pipeline: - # Canonical amd64 - ubuntu22: - image: hexpm/elixir:1.14.3-erlang-25.2.2-ubuntu-jammy-20221130 - when: - event: - - push - branch: - - arm - environment: - MIX_ENV: prod - DEBIAN_FRONTEND: noninteractive - commands: - - apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev git build-essential g++ wget - - *clean - - echo "import Config" > config/prod.secret.exs - - *setup-hex - - *tag-build - - mix deps.get --only prod - - mix release --path release - - zip akkoma-ubuntu-jammy.zip -r release - - release-ubuntu22: - image: akkoma/releaser:arm64 - when: - event: - - push - branch: - - arm - secrets: *scw-secrets - commands: - - export SOURCE=akkoma-ubuntu-jammy.zip - - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-arm64-ubuntu-jammy.zip - - /bin/sh /entrypoint.sh diff --git a/.woodpecker/amd64.yml b/.woodpecker/build-amd64.yml similarity index 82% rename from .woodpecker/amd64.yml rename to .woodpecker/build-amd64.yml index 0c7645a63..53f7e5939 100644 --- a/.woodpecker/amd64.yml +++ b/.woodpecker/build-amd64.yml @@ -53,48 +53,6 @@ services: POSTGRES_PASSWORD: postgres pipeline: - lint: - <<: *on-pr-open - image: akkoma/ci-base:1.14 - commands: - - mix local.hex --force - - mix local.rebar --force - - mix format --check-formatted - - build: - image: akkoma/ci-base:1.14 - <<: *on-pr-open - environment: - MIX_ENV: test - POSTGRES_DB: pleroma_test - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - DB_HOST: postgres - commands: - - mix local.hex --force - - mix local.rebar --force - - mix deps.get - - mix compile - - test: - image: akkoma/ci-base:1.14 - <<: *on-pr-open - environment: - MIX_ENV: test - POSTGRES_DB: pleroma_test - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - DB_HOST: postgres - commands: - - mix local.hex --force - - mix local.rebar --force - - mix deps.get - - mix compile - - mix ecto.drop -f -q - - mix ecto.create - - mix ecto.migrate - - mix test --preload-modules --exclude erratic --exclude federated --max-cases 4 - # Canonical amd64 ubuntu22: image: hexpm/elixir:1.14.3-erlang-25.2.2-ubuntu-jammy-20221130 diff --git a/.woodpecker/build-arm64.yml b/.woodpecker/build-arm64.yml new file mode 100644 index 000000000..045e2df7d --- /dev/null +++ b/.woodpecker/build-arm64.yml @@ -0,0 +1,146 @@ +platform: linux/arm64 + +variables: + - &scw-secrets + - SCW_ACCESS_KEY + - SCW_SECRET_KEY + - SCW_DEFAULT_ORGANIZATION_ID + - &setup-hex "mix local.hex --force && mix local.rebar --force" + - &on-release + when: + event: + - push + - tag + branch: + - develop + - stable + - refs/tags/v* + - refs/tags/stable-* + - &on-stable + when: + event: + - push + - tag + branch: + - stable + - refs/tags/stable-* + - &on-point-release + when: + event: + - push + branch: + - develop + - stable + - &on-pr-open + when: + event: + - pull_request + + - &tag-build "export BUILD_TAG=$${CI_COMMIT_TAG:-\"$CI_COMMIT_BRANCH\"} && export PLEROMA_BUILD_BRANCH=$BUILD_TAG" + + - &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)" + - &mix-clean "mix deps.clean --all && mix clean" + +pipeline: + # Canonical arm64 + ubuntu22: + image: hexpm/elixir:1.14.3-erlang-25.2.2-ubuntu-jammy-20221130 + <<: *on-release + environment: + MIX_ENV: prod + DEBIAN_FRONTEND: noninteractive + commands: + - apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev git build-essential g++ wget + - *clean + - echo "import Config" > config/prod.secret.exs + - *setup-hex + - *tag-build + - mix deps.get --only prod + - mix release --path release + - zip akkoma-ubuntu-jammy.zip -r release + + release-ubuntu22: + image: akkoma/releaser:arm64 + <<: *on-release + secrets: *scw-secrets + commands: + - export SOURCE=akkoma-ubuntu-jammy.zip + - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-ubuntu-jammy.zip + - /bin/sh /entrypoint.sh + - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-arm64-ubuntu-jammy.zip + - /bin/sh /entrypoint.sh + + debian-bullseye: + image: hexpm/elixir:1.14.3-erlang-25.2.2-debian-bullseye-20230109 + <<: *on-release + environment: + MIX_ENV: prod + DEBIAN_FRONTEND: noninteractive + commands: + - apt-get update && apt-get install -y cmake libmagic-dev rclone zip imagemagick libmagic-dev git build-essential gcc make g++ wget + - *clean + - echo "import Config" > config/prod.secret.exs + - *setup-hex + - *tag-build + - *mix-clean + - mix deps.get --only prod + - mix release --path release + - zip akkoma-arm64.zip -r release + + release-debian: + image: akkoma/releaser:arm64 + <<: *on-release + secrets: *scw-secrets + commands: + - export SOURCE=akkoma-arm64.zip + - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-arm64.zip + - /bin/sh /entrypoint.sh + - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-debian-stable.zip + - /bin/sh /entrypoint.sh + + # Canonical arm64-musl + musl: + image: hexpm/elixir:1.14.3-erlang-25.2.2-alpine-3.15.6 + <<: *on-release + environment: + MIX_ENV: prod + commands: + - apk add git gcc g++ musl-dev make cmake file-dev rclone wget zip imagemagick + - *clean + - *setup-hex + - *mix-clean + - *tag-build + - mix deps.get --only prod + - mix release --path release + - zip akkoma-arm64-musl.zip -r release + + release-musl: + image: akkoma/releaser:arm64 + <<: *on-release + secrets: *scw-secrets + commands: + - export SOURCE=akkoma-arm64-musl.zip + - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-arm64-musl.zip + - /bin/sh /entrypoint.sh + + docs: + <<: *on-point-release + secrets: + - SCW_ACCESS_KEY + - SCW_SECRET_KEY + - SCW_DEFAULT_ORGANIZATION_ID + environment: + CI: "true" + image: python:3.10-slim + commands: + - apt-get update && apt-get install -y rclone wget git zip + - wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_arm64 + - mv scaleway-cli_2.5.1_linux_arm64 scaleway-cli + - chmod +x scaleway-cli + - ./scaleway-cli object config install type=rclone + - cd docs + - pip install -r requirements.txt + - mkdocs build + - zip -r docs.zip site/* + - cd site + - rclone copy . scaleway:akkoma-docs/$CI_COMMIT_BRANCH/ diff --git a/.woodpecker/docs.yml b/.woodpecker/docs.yml new file mode 100644 index 000000000..cc4017659 --- /dev/null +++ b/.woodpecker/docs.yml @@ -0,0 +1,69 @@ +platform: linux/amd64 + +depends_on: + - test + - build-amd64 + +variables: + - &scw-secrets + - SCW_ACCESS_KEY + - SCW_SECRET_KEY + - SCW_DEFAULT_ORGANIZATION_ID + - &setup-hex "mix local.hex --force && mix local.rebar --force" + - &on-release + when: + event: + - push + - tag + branch: + - develop + - stable + - refs/tags/v* + - refs/tags/stable-* + - &on-stable + when: + event: + - push + - tag + branch: + - stable + - refs/tags/stable-* + - &on-point-release + when: + event: + - push + branch: + - develop + - stable + - &on-pr-open + when: + event: + - pull_request + + - &tag-build "export BUILD_TAG=$${CI_COMMIT_TAG:-\"$CI_COMMIT_BRANCH\"} && export PLEROMA_BUILD_BRANCH=$BUILD_TAG" + + - &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)" + - &mix-clean "mix deps.clean --all && mix clean" + +pipeline: + docs: + <<: *on-point-release + secrets: + - SCW_ACCESS_KEY + - SCW_SECRET_KEY + - SCW_DEFAULT_ORGANIZATION_ID + environment: + CI: "true" + image: python:3.10-slim + commands: + - apt-get update && apt-get install -y rclone wget git zip + - wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64 + - mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli + - chmod +x scaleway-cli + - ./scaleway-cli object config install type=rclone + - cd docs + - pip install -r requirements.txt + - mkdocs build + - zip -r docs.zip site/* + - cd site + - rclone copy . scaleway:akkoma-docs/$CI_COMMIT_BRANCH/ diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml new file mode 100644 index 000000000..958c642d5 --- /dev/null +++ b/.woodpecker/test.yml @@ -0,0 +1,96 @@ +platform: linux/amd64 + +variables: + - &scw-secrets + - SCW_ACCESS_KEY + - SCW_SECRET_KEY + - SCW_DEFAULT_ORGANIZATION_ID + - &setup-hex "mix local.hex --force && mix local.rebar --force" + - &on-release + when: + event: + - push + - tag + branch: + - develop + - stable + - refs/tags/v* + - refs/tags/stable-* + - &on-stable + when: + event: + - push + - tag + branch: + - stable + - refs/tags/stable-* + - &on-point-release + when: + event: + - push + branch: + - develop + - stable + - &on-pr-open + when: + event: + - pull_request + + - &tag-build "export BUILD_TAG=$${CI_COMMIT_TAG:-\"$CI_COMMIT_BRANCH\"} && export PLEROMA_BUILD_BRANCH=$BUILD_TAG" + + - &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)" + - &mix-clean "mix deps.clean --all && mix clean" + +services: + postgres: + image: postgres:15 + when: + event: + - pull_request + environment: + POSTGRES_DB: pleroma_test + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + +pipeline: + lint: + <<: *on-pr-open + image: akkoma/ci-base:1.14 + commands: + - mix local.hex --force + - mix local.rebar --force + - mix format --check-formatted + + build: + image: akkoma/ci-base:1.14 + <<: *on-pr-open + environment: + MIX_ENV: test + POSTGRES_DB: pleroma_test + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + DB_HOST: postgres + commands: + - mix local.hex --force + - mix local.rebar --force + - mix deps.get + - mix compile + + test: + image: akkoma/ci-base:1.14 + <<: *on-pr-open + environment: + MIX_ENV: test + POSTGRES_DB: pleroma_test + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + DB_HOST: postgres + commands: + - mix local.hex --force + - mix local.rebar --force + - mix deps.get + - mix compile + - mix ecto.drop -f -q + - mix ecto.create + - mix ecto.migrate + - mix test --preload-modules --exclude erratic --exclude federated --max-cases 4 From 0fa0f60520caa122cf2d37b6d731415b737bff29 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Thu, 20 Jul 2023 17:29:23 +0100 Subject: [PATCH 06/11] fix deps --- .woodpecker/build-amd64.yml | 3 +++ .woodpecker/build-arm64.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.woodpecker/build-amd64.yml b/.woodpecker/build-amd64.yml index 53f7e5939..13fd73005 100644 --- a/.woodpecker/build-amd64.yml +++ b/.woodpecker/build-amd64.yml @@ -1,5 +1,8 @@ platform: linux/amd64 +depends_on: + - test + variables: - &scw-secrets - SCW_ACCESS_KEY diff --git a/.woodpecker/build-arm64.yml b/.woodpecker/build-arm64.yml index 045e2df7d..b2584c0ed 100644 --- a/.woodpecker/build-arm64.yml +++ b/.woodpecker/build-arm64.yml @@ -1,5 +1,8 @@ platform: linux/arm64 +depends_on: + - test + variables: - &scw-secrets - SCW_ACCESS_KEY From 6fe7bdba465c307ba3bbd0f934586f4cdd272325 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Thu, 20 Jul 2023 17:31:55 +0100 Subject: [PATCH 07/11] bump alpine version --- .woodpecker/build-amd64.yml | 2 +- .woodpecker/build-arm64.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.woodpecker/build-amd64.yml b/.woodpecker/build-amd64.yml index 13fd73005..b47b3d6c6 100644 --- a/.woodpecker/build-amd64.yml +++ b/.woodpecker/build-amd64.yml @@ -114,7 +114,7 @@ pipeline: # Canonical amd64-musl musl: - image: hexpm/elixir:1.14.3-erlang-25.2.2-alpine-3.15.6 + image: hexpm/elixir:1.14.3-erlang-25.2.2-alpine-3.18.0 <<: *on-release environment: MIX_ENV: prod diff --git a/.woodpecker/build-arm64.yml b/.woodpecker/build-arm64.yml index b2584c0ed..f45a91db0 100644 --- a/.woodpecker/build-arm64.yml +++ b/.woodpecker/build-arm64.yml @@ -103,7 +103,7 @@ pipeline: # Canonical arm64-musl musl: - image: hexpm/elixir:1.14.3-erlang-25.2.2-alpine-3.15.6 + image: hexpm/elixir:1.14.3-erlang-25.2.2-alpine-3.18.0 <<: *on-release environment: MIX_ENV: prod From d2d2bbe213212ad914c9df6645479e19cececf64 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Thu, 20 Jul 2023 17:32:02 +0100 Subject: [PATCH 08/11] bump docker alpine --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c6506c48c..b175d7835 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM hexpm/elixir:1.14.3-erlang-25.3-alpine-3.17.2 +FROM hexpm/elixir:1.14.3-erlang-25.2.2-alpine-3.18.0 ENV MIX_ENV=prod ENV ERL_EPMD_ADDRESS=127.0.0.1 From 394174c0a9953d3cc37a51027c4a98658c5c9b88 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Thu, 20 Jul 2023 17:33:41 +0100 Subject: [PATCH 09/11] remove postgres from amd64 build --- .woodpecker/build-amd64.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.woodpecker/build-amd64.yml b/.woodpecker/build-amd64.yml index b47b3d6c6..3c445988b 100644 --- a/.woodpecker/build-amd64.yml +++ b/.woodpecker/build-amd64.yml @@ -44,17 +44,6 @@ variables: - &clean "(rm -rf release || true) && (rm -rf _build || true) && (rm -rf /root/.mix)" - &mix-clean "mix deps.clean --all && mix clean" -services: - postgres: - image: postgres:15 - when: - event: - - pull_request - environment: - POSTGRES_DB: pleroma_test - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - pipeline: # Canonical amd64 ubuntu22: From 34601065c3259cb7a27d04107b02e9f5522e046d Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Thu, 20 Jul 2023 17:34:05 +0100 Subject: [PATCH 10/11] Mix format --- lib/pleroma/web/activity_pub/transmogrifier.ex | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex index 742dcb385..5fb9b5d8d 100644 --- a/lib/pleroma/web/activity_pub/transmogrifier.ex +++ b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -919,11 +919,12 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do end def prepare_attachments(object) do - attachments = case Map.get(object, "attachment", []) do - [_ | _] = list -> list - _ -> [] - end - + attachments = + case Map.get(object, "attachment", []) do + [_ | _] = list -> list + _ -> [] + end + attachments = attachments |> Enum.map(fn data -> From c79c0fe6cc49e2b6ee3f573317d6c9e9c056592b Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Thu, 20 Jul 2023 17:45:53 +0100 Subject: [PATCH 11/11] add extra flavours to table --- docs/docs/installation/otp_en.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/docs/installation/otp_en.md b/docs/docs/installation/otp_en.md index 058040e19..2a9735f3c 100644 --- a/docs/docs/installation/otp_en.md +++ b/docs/docs/installation/otp_en.md @@ -19,12 +19,16 @@ This is a little more complex than it used to be (thanks ubuntu) Use the following mapping to figure out your flavour: -| distribution | flavour | available branches | -| ------------- | ------------------ | ------------------- | -| debian stable | amd64 | develop, stable | -| ubuntu focal | amd64 | develop, stable | -| ubuntu jammy | amd64-ubuntu-jammy | develop, stable | -| alpine | amd64-musl | stable | +| distribution | architecture | flavour | available branches | +| --------------- | ------------------ | ------------------- | ------------------- | +| debian bullseye | amd64 | amd64 | develop, stable | +| debian bullseye | arm64 | arm64 | develop, stable | +| ubuntu focal | amd64 | amd64 | develop, stable | +| ubuntu focal | arm64 | arm64 | develop, stable | +| ubuntu jammy | amd64 | amd64-ubuntu-jammy | develop, stable | +| ubuntu jammy | arm64 | arm64-ubuntu-jammy | develop, stable | +| alpine | amd64 | amd64-musl | stable | +| alpine | arm64 | arm64-musl | stable | Other similar distributions will _probably_ work, but if it is not listed above, there is no official support.