From e54f634baa88b24d8756ab0ebde4124ba125cc92 Mon Sep 17 00:00:00 2001 From: thenav56 Date: Thu, 16 Oct 2025 17:07:26 +0545 Subject: [PATCH 1/2] feat(sub_module): use `branch` argument to define submodule --- .gitmodules | 24 ++++++++++++++---------- README.md | 6 ++++++ scripts/sub-module-sync.sh | 4 ++++ 3 files changed, 24 insertions(+), 10 deletions(-) create mode 100755 scripts/sub-module-sync.sh diff --git a/.gitmodules b/.gitmodules index 69b120d..d061507 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,19 @@ [submodule "mapswipe-firebase"] - path = firebase - url = git@github.com:mapswipe/mapswipe-firebase.git + path = firebase + url = git@github.com:mapswipe/mapswipe-firebase.git + branch = v0.2.3 [submodule "mapswipe-backend"] - path = backend - url = git@github.com:mapswipe/mapswipe-backend.git + path = backend + url = git@github.com:mapswipe/mapswipe-backend.git + branch = v0.2.4 [submodule "community-dashboard"] - path = community-dashboard - url = git@github.com:mapswipe/community-dashboard.git + path = community-dashboard + url = git@github.com:mapswipe/community-dashboard.git + branch = v0.2.2 [submodule "manager-dashboard"] - path = manager-dashboard - url = git@github.com:mapswipe/manager-dashboard.git + path = manager-dashboard + url = git@github.com:mapswipe/manager-dashboard.git + branch = v0.2.3 [submodule "website"] - path = website - url = git@github.com:mapswipe/website.git + path = website + url = git@github.com:mapswipe/website.git diff --git a/README.md b/README.md index 5f97492..a620913 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +## New release + +- Update `.gitmodules` file to include the correct `branch` tags +- Run `scripts/sub-module-sync.sh` to refresh submodule references +- Commit the changes and push to the repository + ## Setup ### Cloning the Repository diff --git a/scripts/sub-module-sync.sh b/scripts/sub-module-sync.sh new file mode 100755 index 0000000..2692f38 --- /dev/null +++ b/scripts/sub-module-sync.sh @@ -0,0 +1,4 @@ +#!/bin/bash -x + +git submodule foreach 'git fetch' +git submodule foreach 'git checkout $(git config -f $toplevel/.gitmodules submodule.$name.branch || echo main)' From 5e1f9de0646f5f0a41fa3ae89a6213e273517bcd Mon Sep 17 00:00:00 2001 From: thenav56 Date: Thu, 16 Oct 2025 17:15:23 +0545 Subject: [PATCH 2/2] chore(scripts): use standard hyphens for script filenames --- scripts/{get_commit_hash.sh => get-commit-hash.sh} | 0 taskfile.yaml | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename scripts/{get_commit_hash.sh => get-commit-hash.sh} (100%) diff --git a/scripts/get_commit_hash.sh b/scripts/get-commit-hash.sh similarity index 100% rename from scripts/get_commit_hash.sh rename to scripts/get-commit-hash.sh diff --git a/taskfile.yaml b/taskfile.yaml index 504eb17..3d695fb 100644 --- a/taskfile.yaml +++ b/taskfile.yaml @@ -4,11 +4,11 @@ version: '3' env: MANAGER_DASHBOARD_COMMIT_HASH: - sh: ./scripts/get_commit_hash.sh .git/modules/manager-dashboard + sh: ./scripts/get-commit-hash.sh .git/modules/manager-dashboard COMMUNITY_DASHBOARD_COMMIT_HASH: - sh: ./scripts/get_commit_hash.sh .git/modules/community-dashboard + sh: ./scripts/get-commit-hash.sh .git/modules/community-dashboard BACKEND_COMMIT_HASH: - sh: ./scripts/get_commit_hash.sh .git/modules/mapswipe-backend + sh: ./scripts/get-commit-hash.sh .git/modules/mapswipe-backend tasks: # Web apps