Skip to content

Commit 2da44d2

Browse files
committed
chore: release 0.0.1
1 parent 99630f3 commit 2da44d2

File tree

3 files changed

+36
-4
lines changed

3 files changed

+36
-4
lines changed

rust/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
anyhow = "1"
1717
serde = { version = "1", features = ["derive"] }
1818
serde_bare = "0.5"
19-
vbare = "FILL ME IN"
19+
vbare = "0.0.1"
2020

2121
[build-dependencies]
2222
anyhow = "1"
23-
vbare-compiler = "FILL ME IN"
23+
vbare-compiler = "0.0.1"
2424
```
2525

2626
**Step 2: In `build.rs`, process your `.bare` schema files directory and generate the modules:**

scripts/release.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ async function main(): Promise<void> {
3737

3838
await Promise.all(manifests.packageJson.map(file => updatePackageJson(file, version)));
3939
await Promise.all(manifests.cargoToml.map(file => updateCargoToml(file, version)));
40+
await updateReadmeVersions(version);
4041

4142
const publishableTypeScriptPackages = await getPublishableTypeScriptPackages(manifests.packageJson);
4243
const publishableRustPackages = await getPublishableRustPackages(manifests.cargoToml);
@@ -142,6 +143,13 @@ async function updateCargoToml(filePath: string, version: string): Promise<void>
142143
}
143144
}
144145

146+
// Update workspace dependency versions (e.g., vbare-gen = { path = "../vbare-gen", version = "0.0.1" })
147+
const depMatch = line.match(/^(\s*[A-Za-z0-9_-]+\s*=\s*{[^}]*path\s*=\s*"[^"]+",\s*version\s*=\s*")([^"]*)(".*})$/);
148+
if (depMatch) {
149+
updated = true;
150+
return `${depMatch[1]}${version}${depMatch[3]}`;
151+
}
152+
145153
return line;
146154
});
147155

@@ -159,6 +167,30 @@ async function updateCargoToml(filePath: string, version: string): Promise<void>
159167
console.log(`Updated ${relative(filePath)} to ${version}`);
160168
}
161169

170+
async function updateReadmeVersions(version: string): Promise<void> {
171+
const readmePaths = [
172+
path.join(repoRoot, 'rust', 'README.md'),
173+
path.join(repoRoot, 'typescript', 'README.md')
174+
];
175+
176+
for (const readmePath of readmePaths) {
177+
try {
178+
const raw = await fs.readFile(readmePath, 'utf8');
179+
const newline = raw.includes('\r\n') ? '\r\n' : '\n';
180+
181+
// Replace "FILL ME IN" with the actual version
182+
const updated = raw.replace(/["']FILL ME IN["']/g, `"${version}"`);
183+
184+
if (updated !== raw) {
185+
await fs.writeFile(readmePath, updated, 'utf8');
186+
console.log(`Updated ${relative(readmePath)} versions to ${version}`);
187+
}
188+
} catch (error) {
189+
console.warn(`Skipping ${relative(readmePath)} (file not found or error reading)`);
190+
}
191+
}
192+
}
193+
162194
type PublishableTypeScriptPackage = {
163195
name: string;
164196
directory: string;

typescript/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
```json
1515
{
1616
"dependencies": {
17-
"vbare": "FILL ME IN"
17+
"vbare": "0.0.1"
1818
},
1919
"devDependencies": {
20-
"@vbare/compiler": "FILL ME IN"
20+
"@vbare/compiler": "0.0.1"
2121
}
2222
}
2323
```

0 commit comments

Comments
 (0)