Skip to content

Commit a6c8b2f

Browse files
committed
Remove release-major command
1 parent 1e74ffa commit a6c8b2f

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

bin/cm.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ function start() {
2020
build,
2121
devserver,
2222
release,
23-
"release-major": releaseMajor,
2423
install,
2524
clean,
2625
commit,
@@ -203,16 +202,6 @@ function updateDependencyVersion(pkg, version) {
203202
return changed
204203
}
205204

206-
function updateAllDependencyVersions(version) {
207-
for (let pkg of packages) {
208-
let pkgFile = join(pkg.dir, "package.json"), text = fs.readFileSync(pkgFile, "utf8")
209-
let updated = text.replace(/("@codemirror\/[^"]+": ")([^"]+)"/g, (_, m, old) => {
210-
return m + (/buildhelper/.test(m) ? old : "^" + version) + '"'
211-
})
212-
fs.writeFileSync(pkgFile, updated)
213-
}
214-
}
215-
216205
function version(pkg) {
217206
return require(join(pkg.dir, "package.json")).version
218207
}
@@ -263,15 +252,6 @@ function doRelease(pkg, newVersion, {edit = false, defaultChanges = null}) {
263252
return {changes, newVersion}
264253
}
265254

266-
function releaseMajor() {
267-
let versions = packages.map(version), prev = Math.max(...versions.map(v => +v.split(".")[1]))
268-
let newVersion = `0.${prev + 1}.0`
269-
updateAllDependencyVersions(newVersion)
270-
for (let pkg of packages) doRelease(pkg, newVersion, {
271-
defaultChanges: {fix: [], feature: [], breaking: ["Update dependencies to " + newVersion]}
272-
})
273-
}
274-
275255
function editReleaseNotes(notes) {
276256
let noteFile = join(root, "notes.txt")
277257
fs.writeFileSync(noteFile, notes.head + notes.body)

0 commit comments

Comments
 (0)