mirror of
https://github.com/semaphore-protocol/semaphore.git
synced 2026-01-09 14:48:12 -05:00
* chore: define separate version.ts script * chore: include publishing to soldeer in script * fix(contracts): push to soldeer re 800 * ci: fetch latest contract version from soldeer * refactor: do not use execa in scripts * fix: do not exit process in script * chore: remove comments * refactor: use shebang in ts scripts * chore(contracts): add soldeerignore * chore: inherit stdio in scripts * chore: remove dry run flag * chore: uncomment * chore: fix typo in comment
27 lines
771 B
TypeScript
Executable File
27 lines
771 B
TypeScript
Executable File
#!node_modules/.bin/ts-node
|
|
import { readFileSync, readdirSync, writeFileSync } from "node:fs"
|
|
|
|
const folderName = "packages"
|
|
|
|
async function main() {
|
|
const filePaths = readdirSync(folderName, { withFileTypes: true })
|
|
.filter((file) => file.isDirectory())
|
|
.map((dir) => (dir.name === "contracts" ? `${dir.name}/contracts` : dir.name))
|
|
.map((name) => `${folderName}/${name}/package.json`)
|
|
|
|
for (const filePath of filePaths) {
|
|
const content = JSON.parse(readFileSync(filePath, "utf8"))
|
|
|
|
if (content.stableVersion) {
|
|
delete content.stableVersion
|
|
}
|
|
|
|
writeFileSync(filePath, JSON.stringify(content, null, 4), "utf8")
|
|
}
|
|
}
|
|
|
|
main().catch((error) => {
|
|
console.error(error)
|
|
process.exit(1)
|
|
})
|