-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69a421d
commit 5ae7764
Showing
3 changed files
with
31 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { readFileSync, writeFileSync } from 'fs'; | ||
import { dirname } from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
|
||
// Read Nargo.toml | ||
const nargoContent = readFileSync('Nargo.toml', 'utf8'); | ||
const versionMatch = nargoContent.match(/tag\s*=\s*"aztec-packages-v([^"]+)"/); | ||
const version = versionMatch ? versionMatch[1] : null; | ||
|
||
if (!version) { | ||
console.error('Could not find version tag in Nargo.toml'); | ||
process.exit(1); | ||
} | ||
|
||
// Read README.md | ||
const readmePath = 'README.md'; | ||
let readmeContent = readFileSync(readmePath, 'utf8'); | ||
|
||
// Update the aztec-up version | ||
const updatedContent = readmeContent.replace( | ||
/aztec-up \d+\.\d+\.\d+/, | ||
`aztec-up ${version}` | ||
); | ||
|
||
// Write back to README | ||
writeFileSync(readmePath, updatedContent); | ||
console.log(`Updated README.md with version ${version}`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters