From b6a512ebaccc3fa7b67fdf24c6a65ff114120767 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Tue, 23 Aug 2022 10:35:28 -0700 Subject: [PATCH] dev: update subproject paths to have libs/ prefix Signed-off-by: Stephen Gutekanst --- dev/ensure-standard-files.zig | 14 +++++++------- dev/push-subrepos.sh | 6 +++--- dev/template/.github/pull_request_template.md | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dev/ensure-standard-files.zig b/dev/ensure-standard-files.zig index 7e1af457..2c03ec7b 100644 --- a/dev/ensure-standard-files.zig +++ b/dev/ensure-standard-files.zig @@ -20,20 +20,20 @@ const projects = [_][]const u8{ pub fn main() !void { inline for (projects) |project| { - copyFile("dev/template/LICENSE", project ++ "/LICENSE"); - copyFile("dev/template/LICENSE-MIT", project ++ "/LICENSE-MIT"); - copyFile("dev/template/LICENSE-APACHE", project ++ "/LICENSE-APACHE"); - copyFile("dev/template/.gitattributes", project ++ "/.gitattributes"); - copyFile("dev/template/.gitignore", project ++ "/.gitignore"); + copyFile("dev/template/LICENSE", "libs/" ++ project ++ "/LICENSE"); + copyFile("dev/template/LICENSE-MIT", "libs/" ++ project ++ "/LICENSE-MIT"); + copyFile("dev/template/LICENSE-APACHE", "libs/" ++ project ++ "/LICENSE-APACHE"); + copyFile("dev/template/.gitattributes", "libs/" ++ project ++ "/.gitattributes"); + copyFile("dev/template/.gitignore", "libs/" ++ project ++ "/.gitignore"); if (!std.mem.eql(u8, project, ".")) { copyFile( "dev/template/.github/pull_request_template.md", - project ++ "/.github/pull_request_template.md", + "libs/" ++ project ++ "/.github/pull_request_template.md", ); replaceInFile(project ++ "/.github/pull_request_template.md", "foobar", project); } - copyFile("dev/template/.github/FUNDING.yml", project ++ "/.github/FUNDING.yml"); + copyFile("dev/template/.github/FUNDING.yml", "libs/" ++ project ++ "/.github/FUNDING.yml"); } } diff --git a/dev/push-subrepos.sh b/dev/push-subrepos.sh index 70195dbc..fe36fd4c 100755 --- a/dev/push-subrepos.sh +++ b/dev/push-subrepos.sh @@ -3,6 +3,6 @@ set -exuo pipefail cd "$(dirname "${BASH_SOURCE[0]}")"/.. ./dev/update-subrepos.sh -git subtree push --prefix glfw mach-glfw main -git subtree push --prefix gpu-dawn mach-gpu-dawn main -git subtree push --prefix freetype mach-freetype main +git subtree push --prefix libs/glfw mach-glfw main +git subtree push --prefix libs/gpu-dawn mach-gpu-dawn main +git subtree push --prefix libs/freetype mach-freetype main diff --git a/dev/template/.github/pull_request_template.md b/dev/template/.github/pull_request_template.md index ae3b77df..44235f3e 100644 --- a/dev/template/.github/pull_request_template.md +++ b/dev/template/.github/pull_request_template.md @@ -1,4 +1,4 @@ -Please send your change to [the main repository](https://github.com/hexops/mach/tree/main/foobar) instead, sorry for the trouble! +Please send your change to [the main repository](https://github.com/hexops/mach/tree/main/libs/foobar) instead, sorry for the trouble! This helps us avoid some complex merge conflicts we run into when changes are made to both repositories and history needs to be reconciled. Keeping PRs in just that repository enables us to use `git subtree` to trivially keep the two repositories in sync.