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/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/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)' 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