From d3d37a1f94f64431db957775de5f3909c7afa383 Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Mon, 14 Apr 2025 12:03:29 +0200 Subject: [PATCH 1/6] WPB-17142: fix local scripts for submodule fetch depth and build ops --- build/build_versions.sh | 2 +- build/prepare.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/build_versions.sh b/build/build_versions.sh index 68160f1..81bca08 100644 --- a/build/build_versions.sh +++ b/build/build_versions.sh @@ -60,7 +60,7 @@ git show-ref --tags | while read -r commit tag; do git checkout $TAG # pull the submodule - git submodule update --init wire-server + git submodule update --init --depth 1 wire-server # Check if tag exists in mike if [ -n "${existing_tags[$TAG]}" ]; then diff --git a/build/prepare.sh b/build/prepare.sh index 281a7e5..da67804 100644 --- a/build/prepare.sh +++ b/build/prepare.sh @@ -26,16 +26,16 @@ else fi; if [ -d "$TEMP_DIR/.git" ]; then - current_remote=$(git config --get remote.origin.url) + current_remote=$(git -C $TEMP_DIR config --get remote.origin.url) if [ "$current_remote" = "$ORIGINAL_DIR" ]; then cd $TEMP_DIR EXPECTED_AUTHOR="Wire Docs " - LAST_COMMIT_AUTHOR=$(git log -1 --pretty=format:"%an <%ae>") + LAST_COMMIT_AUTHOR=$(git -C $TEMP_DIR log -1 --pretty=format:"%an <%ae>") if [ "$LAST_COMMIT_AUTHOR" = "$EXPECTED_AUTHOR" ]; then echo "Last commit by $EXPECTED_AUTHOR detected. Removing it..." - git reset --hard HEAD~1 - git pull origin $(cat .current_branch) + git -C $TEMP_DIR reset --hard HEAD~1 + git -C $TEMP_DIR pull origin $(cat .current_branch) else echo "Last commit was not by $EXPECTED_AUTHOR. No action taken." fi From a617177c83c56da98803d676d2ecf1f862a76c4e Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Mon, 14 Apr 2025 12:04:05 +0200 Subject: [PATCH 2/6] WPB-17142: fix 404 page to allow for redirection to latest --- .overrides/404.html | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .overrides/404.html diff --git a/.overrides/404.html b/.overrides/404.html new file mode 100644 index 0000000..0cf2dc1 --- /dev/null +++ b/.overrides/404.html @@ -0,0 +1,33 @@ +{% extends "base.html" %} + +{% block content %} +
+

Page moved or not found

+

+ We've recently introduced versioning in our documentation. + The page you're looking for may have moved under a versioned path. +

+

+ You’ll be automatically redirected to the latest version of this page, if it exists. +

+

+ 👉 Redirect to /latest/... +

+
+{% endblock %} + +{% block scripts %} + +{% endblock %} From 2171f569906e2a95c501a3222bbe4e8c72e93910 Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Mon, 14 Apr 2025 12:04:57 +0200 Subject: [PATCH 3/6] WPB-17142: added a test workflow for making changes to test-dev and testing changes in dev account --- .github/workflows/test.yaml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..db6e399 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,46 @@ +name: CI Build + +on: + pull_request: + branches: + - test-dev + paths-ignore: + - 'README.md' + - 'Release.md' + - '.github/workflows/release.yaml' + +jobs: + build: + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Nix + uses: cachix/install-nix-action@v16 + + - name: Build Archive + id: build_archive + run: | + make archive + if [ ! -f "wire-docs.tar.gz" ]; then + echo "Artifact not found!" + exit 1 + fi + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + role-to-assume: ${{ secrets.DEV_AWS_ROLE_TO_ASSUME }} + aws-region: eu-west-1 + + - name: Deploy latest docs to S3 + run: | + mkdir -p tmp_extracted + tar -xzf ./wire-docs.tar.gz -C tmp_extracted + aws s3 sync tmp_extracted/latest s3://${{ secrets.DEV_BUCKET }}/latest + aws s3 sync tmp_extracted/site s3://${{ secrets.DEV_BUCKET }}/site + aws s3 cp tmp_extracted/versions.json s3://${{ secrets.DEV_BUCKET }}/versions.json + rm -rf tmp_extracted From 769dfb02d15bb4e65464eaf7936035393e700191 Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Mon, 14 Apr 2025 12:18:53 +0200 Subject: [PATCH 4/6] WPB-17142: modified the test name --- .github/workflows/test.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index db6e399..3fee2ab 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,7 +10,7 @@ on: - '.github/workflows/release.yaml' jobs: - build: + test: runs-on: ubuntu-latest permissions: id-token: write @@ -30,13 +30,13 @@ jobs: exit 1 fi - - name: Configure AWS credentials + - name: Configure AWS credentials for DEV uses: aws-actions/configure-aws-credentials@v1 with: role-to-assume: ${{ secrets.DEV_AWS_ROLE_TO_ASSUME }} aws-region: eu-west-1 - - name: Deploy latest docs to S3 + - name: Deploy latest docs to S3 DEV account run: | mkdir -p tmp_extracted tar -xzf ./wire-docs.tar.gz -C tmp_extracted From 4246aec52db384153730da2d9c86443241a8e9c5 Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Mon, 14 Apr 2025 12:36:36 +0200 Subject: [PATCH 5/6] WPB-17142: update the submodule and generate the changelog for wire-server --- src/changelog/README.md | 3 +++ wire-server | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/changelog/README.md b/src/changelog/README.md index 29c7066..29bca87 100644 --- a/src/changelog/README.md +++ b/src/changelog/README.md @@ -1,3 +1,6 @@ +* [[2025-04-07] (Chart Release 5.14.0)](changelog.md#2025-04-07-chart-release-5140) +* [[2025-03-07] (Chart Release 5.13.0)](changelog.md#2025-03-07-chart-release-5130) +* [[2025-03-06] (Chart Release 5.12.0)](changelog.md#2025-03-06-chart-release-5120) * [[2025-02-07] (Chart Release 5.11.0)](changelog.md#2025-02-07-chart-release-5110) * [[2025-01-28] (Chart Release 5.10.0)](changelog.md#2025-01-28-chart-release-5100) * [[2024-12-30] (Chart Release 5.9.0)](changelog.md#2024-12-30-chart-release-590) diff --git a/wire-server b/wire-server index 867eae0..9ff9dd6 160000 --- a/wire-server +++ b/wire-server @@ -1 +1 @@ -Subproject commit 867eae0dd612d6d0f3abd7577cc372b7927646a3 +Subproject commit 9ff9dd605d1b4aa3febf02635387a714fd0708f0 From 6e56c914cf472793a23b8d047836bf1b2c557a9c Mon Sep 17 00:00:00 2001 From: Mohit Rajain <20745774+mohitrajain@users.noreply.github.com> Date: Mon, 14 Apr 2025 12:37:21 +0200 Subject: [PATCH 6/6] WPB-17142: update the readme.md for updating submodules --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index adb53bd..e59a20a 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,19 @@ Wire documentation is hosted on . This project is made us - To fetch the latest updates from wire-server, run the following command. Note: Execute this command only when the remote repository has been updated with new changes. ``` - git submodule update --remote + git submodule update --remote --checkout --depth 1 -- wire-server ``` + - To checkout to a specific commit: + ``` + cd wire-server && git fetch --depth=1 origin && git checkout + ``` + + - To verify the submodule status: + ``` + git submodule status + ``` + - To optionally update the src/changelog/README.md based on the new changelog.md, run the following command: ``` rm src/changelog/README.md && \