Skip to content

Commit 5240907

Browse files
authored
Release: repo-foundry 0.1.2 (#13)
* clean template metadata and protections * optimize contribution guide * fix pull request existence checks * enable optional turborepo remote caching * strengthen agent instructions * standardize language formatting and linting * clean template metadata and protections * chore: refine shared template configuration * fix: install Rust CI components * fix: use workflow token for release PRs * chore: ignore generated project artifacts * chore: ignore process files * feat: add reusable setup and bootstrap tooling * docs: standardize on Bun native tests * feat: add template sync and repository doctor checks * feat: add one-command repository initializer * feat: add coverage policy and protection sync * fix: handle empty preserved checks * fix: update branch protections through full API * fix: handle unsupported protection APIs * fix: isolate Python coverage from mise environment * fix: stabilize coverage and audit exceptions * fix: enforce bun coverage in shared CI * fix: pass explicit Python coverage sources * fix: support macOS bash in CI helpers * fix: isolate Python coverage sysconfig workaround * style: format Python coverage shim * fix: ignore shared helper files in language detection * fix: recognize shared Bun coverage policy * fix: detect repository Python environments * fix: detect native Bun coverage runners * fix: provide CI-only build secret fallback * fix: remove obsolete slither protection check * feat: preserve custom workflows during sync * fix: enforce function and line coverage * fix: address template review feedback * fix: support native and jest coverage reports * feat: add configurable repository initializer * feat: ship repo-foundry initializer package * fix: preserve profiles during package sync * fix: preserve package manager profiles * release: repo-foundry 0.1.1 * fix: preserve repository ignore rules
1 parent a0c5065 commit 5240907

2 files changed

Lines changed: 27 additions & 2 deletions

File tree

‎.github/scripts/sync-template.sh‎

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ prune=false
2727
languages_set=false
2828
features_set=false
2929
package_manager=""
30+
gitignore_backup=""
31+
custom_ignores=""
3032

3133
valid_languages="typescript rust python solidity"
3234
valid_features="ci codeql security test draft-pr release-pr release dependabot"
@@ -57,6 +59,8 @@ workflow_enabled() {
5759

5860
cleanup() {
5961
if [ -n "$temp_dir" ]; then rm -rf "$temp_dir"; fi
62+
if [ -n "$gitignore_backup" ]; then rm -f "$gitignore_backup"; fi
63+
if [ -n "$custom_ignores" ]; then rm -f "$custom_ignores"; fi
6064
}
6165
trap cleanup EXIT
6266

@@ -195,7 +199,28 @@ for file in "${files[@]}"; do
195199
printf 'Would sync %s\n' "$file"
196200
else
197201
mkdir -p "$(dirname "$file")"
198-
cp "$template_file" "$file"
202+
if [ "$file" = .gitignore ] && [ -f "$file" ]; then
203+
# Keep repository-specific ignore rules while refreshing the shared
204+
# baseline. This prevents a template sync from hiding generated files
205+
# or local tooling that only one project uses.
206+
gitignore_backup="$(mktemp)"
207+
custom_ignores="$(mktemp)"
208+
cp "$file" "$gitignore_backup"
209+
cp "$template_file" "$file"
210+
awk 'NR == FNR { seen[$0] = 1; next } NF && !seen[$0] { print }' \
211+
"$template_file" "$gitignore_backup" > "$custom_ignores"
212+
if [ -s "$custom_ignores" ]; then
213+
{
214+
printf '\n# Repository-specific rules\n'
215+
cat "$custom_ignores"
216+
} >> "$file"
217+
fi
218+
rm -f "$gitignore_backup" "$custom_ignores"
219+
gitignore_backup=""
220+
custom_ignores=""
221+
else
222+
cp "$template_file" "$file"
223+
fi
199224
case "$file" in
200225
.githooks/*|.github/scripts/*) chmod +x "$file" ;;
201226
esac

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "repo-foundry",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "A fast, language-aware repository factory for agent-ready workflows, testing, security, and release automation.",
55
"type": "module",
66
"license": "AGPL-3.0-or-later",

0 commit comments

Comments
 (0)