dev: update subproject paths to have libs/ prefix

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-08-23 10:35:28 -07:00 committed by Stephen Gutekanst
parent f6f1187526
commit b6a512ebac
3 changed files with 11 additions and 11 deletions

View file

@ -20,20 +20,20 @@ const projects = [_][]const u8{
pub fn main() !void { pub fn main() !void {
inline for (projects) |project| { inline for (projects) |project| {
copyFile("dev/template/LICENSE", project ++ "/LICENSE"); copyFile("dev/template/LICENSE", "libs/" ++ project ++ "/LICENSE");
copyFile("dev/template/LICENSE-MIT", project ++ "/LICENSE-MIT"); copyFile("dev/template/LICENSE-MIT", "libs/" ++ project ++ "/LICENSE-MIT");
copyFile("dev/template/LICENSE-APACHE", project ++ "/LICENSE-APACHE"); copyFile("dev/template/LICENSE-APACHE", "libs/" ++ project ++ "/LICENSE-APACHE");
copyFile("dev/template/.gitattributes", project ++ "/.gitattributes"); copyFile("dev/template/.gitattributes", "libs/" ++ project ++ "/.gitattributes");
copyFile("dev/template/.gitignore", project ++ "/.gitignore"); copyFile("dev/template/.gitignore", "libs/" ++ project ++ "/.gitignore");
if (!std.mem.eql(u8, project, ".")) { if (!std.mem.eql(u8, project, ".")) {
copyFile( copyFile(
"dev/template/.github/pull_request_template.md", "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); 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");
} }
} }

View file

@ -3,6 +3,6 @@ set -exuo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"/.. cd "$(dirname "${BASH_SOURCE[0]}")"/..
./dev/update-subrepos.sh ./dev/update-subrepos.sh
git subtree push --prefix glfw mach-glfw main git subtree push --prefix libs/glfw mach-glfw main
git subtree push --prefix gpu-dawn mach-gpu-dawn main git subtree push --prefix libs/gpu-dawn mach-gpu-dawn main
git subtree push --prefix freetype mach-freetype main git subtree push --prefix libs/freetype mach-freetype main

View file

@ -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. 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.