diff --git a/.github/workflows/build-cartographer-ws.yaml b/.github/workflows/build-cartographer-ws.yaml index 2c91b739..6bc892e8 100644 --- a/.github/workflows/build-cartographer-ws.yaml +++ b/.github/workflows/build-cartographer-ws.yaml @@ -3,7 +3,7 @@ name: Build Docker Image for cartographer-ws on: push: branches: - - "master" + - "main" paths: - .github/workflows/build-cartographer-ws.yaml - cartographer_ws/docker/Dockerfile diff --git a/.github/workflows/build-husky-ws.yaml b/.github/workflows/build-husky-ws.yaml index 1b04d77c..620be474 100644 --- a/.github/workflows/build-husky-ws.yaml +++ b/.github/workflows/build-husky-ws.yaml @@ -3,7 +3,7 @@ name: Build Docker Image for husky-ws on: push: branches: - - "master" + - "main" paths: - .github/workflows/build-husky-ws.yaml - husky_ws/docker/Dockerfile diff --git a/.github/workflows/build-kobuki-ws.yaml b/.github/workflows/build-kobuki-ws.yaml index 02843463..7449e031 100644 --- a/.github/workflows/build-kobuki-ws.yaml +++ b/.github/workflows/build-kobuki-ws.yaml @@ -3,7 +3,7 @@ name: Build Docker Image for kobuki-ws on: push: branches: - - "master" + - "main" paths: - .github/workflows/build-kobuki-ws.yaml - kobuki_ws/docker/Dockerfile diff --git a/.github/workflows/build-orbslam3-ws.yaml b/.github/workflows/build-orbslam3-ws.yaml index e2e31ebc..76b9c405 100644 --- a/.github/workflows/build-orbslam3-ws.yaml +++ b/.github/workflows/build-orbslam3-ws.yaml @@ -3,7 +3,7 @@ name: Build Docker Image for orbslam3-ws on: push: branches: - - "master" + - "main" paths: - .github/workflows/build-orbslam3-ws.yaml - orbslam3_ws/docker/Dockerfile diff --git a/.github/workflows/build-ros1-bridge-ws.yaml b/.github/workflows/build-ros1-bridge-ws.yaml index 598a0088..97b5f676 100644 --- a/.github/workflows/build-ros1-bridge-ws.yaml +++ b/.github/workflows/build-ros1-bridge-ws.yaml @@ -3,7 +3,7 @@ name: Build Docker Image for ros1-bridge-ws on: push: branches: - - "master" + - "main" paths: - .github/workflows/build-ros1-bridge-ws.yaml - ros1_bridge_ws/docker/Dockerfile diff --git a/.github/workflows/build-rtabmap-ws.yaml b/.github/workflows/build-rtabmap-ws.yaml index 21dd74e4..48295687 100644 --- a/.github/workflows/build-rtabmap-ws.yaml +++ b/.github/workflows/build-rtabmap-ws.yaml @@ -3,7 +3,7 @@ name: Build Docker Image for rtabmap-ws on: push: branches: - - "master" + - "main" paths: - .github/workflows/build-rtabmap-ws.yaml - rtabmap_ws/docker/Dockerfile diff --git a/.github/workflows/build-template-ws.yaml b/.github/workflows/build-template-ws.yaml index 159d4eed..9a303fce 100644 --- a/.github/workflows/build-template-ws.yaml +++ b/.github/workflows/build-template-ws.yaml @@ -3,7 +3,7 @@ name: Build Docker Image for template-ws on: push: branches: - - "master" + - "main" paths: - .github/workflows/build-template-ws.yaml - template_ws/docker/Dockerfile diff --git a/.github/workflows/build-vlp-ws.yaml b/.github/workflows/build-vlp-ws.yaml index 33aeef7d..f09f4940 100644 --- a/.github/workflows/build-vlp-ws.yaml +++ b/.github/workflows/build-vlp-ws.yaml @@ -3,7 +3,7 @@ name: Build Docker Image for vlp-ws on: push: branches: - - "master" + - "main" paths: - .github/workflows/build-vlp-ws.yaml - vlp_ws/docker/Dockerfile diff --git a/husky_ws/README.md b/husky_ws/README.md index 321dab3e..987d0db7 100644 --- a/husky_ws/README.md +++ b/husky_ws/README.md @@ -115,4 +115,4 @@ To maintain reproducibility, we have frozen the following packages at specific c * [clearpathrobotics/clearpath_computer_installer](https://github.com/clearpathrobotics/clearpath_computer_installer) (at commit 7e7f415) is released under the [BSD-3-Clause License](https://github.com/clearpathrobotics/clearpath_computer_installer/blob/main/LICENSE). * [clearpathrobotics/clearpath_robot/clearpath_robot/debian/udev](https://github.com/clearpathrobotics/clearpath_robot/blob/17d55f1b27d3fe19fb82e7df64dca96dbd345837/clearpath_robot/debian/udev) (at commit 17d55f1) is released under the [BSD 3-Clause License](https://github.com/clearpathrobotics/clearpath_robot/blob/17d55f1b27d3fe19fb82e7df64dca96dbd345837/LICENSE). -Further changes based on the packages above are release under the [Apache-2.0 License](https://github.com/j3soon/ros2-essentials/blob/master/LICENSE), as stated in the repository. +Further changes based on the packages above are release under the [Apache-2.0 License](https://github.com/j3soon/ros2-essentials/blob/main/LICENSE), as stated in the repository. diff --git a/tests/lint_filenames.py b/tests/lint_filenames.py index 8a12d45e..dbec8cf5 100644 --- a/tests/lint_filenames.py +++ b/tests/lint_filenames.py @@ -1,6 +1,9 @@ import os import glob +current_dir = os.path.dirname(os.path.realpath(__file__)) +repo_dir = os.path.realpath(f"{current_dir}/..") + # Check if all default files exist DEFAULT_FILES = [ ".gitignore", @@ -11,8 +14,6 @@ "docker/Dockerfile", ".devcontainer/devcontainer.json", ] -current_dir = os.path.dirname(os.path.realpath(__file__)) -repo_dir = os.path.realpath(f"{current_dir}/..") for filename in DEFAULT_FILES: print(f"Checking existence of: '{filename}'...") for workspace_path in glob.glob(f"{repo_dir}/*_ws"): @@ -31,6 +32,15 @@ content = f.read() if "version:" in content: # Ref: https://docs.docker.com/compose/compose-file/04-version-and-name/#version-top-level-element-optional - raise ValueError(f"version should not exist since it's obsolete: '{filename}'") + raise ValueError(f"`version` should not exist since it's obsolete: '{filename}'") + +# Check if `master` branch is accidentally used +for filename in glob.glob(f"{repo_dir}/.github/workflows/*.yaml", recursive=True): + print(f"Checking: '{filename[len(repo_dir)+1:]}'...") + with open(filename, "r") as f: + content = f.read() + if "master" in content: + # Ref: https://github.com/j3soon/ros2-essentials/pull/44#pullrequestreview-2251404984 + raise ValueError(f"`master` should not exist since it's obsolete: '{filename}'") print("All checks passed!")