Skip to content

Commit

Permalink
tool: update release script
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoitZugmeyer committed Apr 10, 2024
1 parent 2c7016e commit a163c06
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/release.js
Expand Up @@ -2,13 +2,15 @@
const { execSync: exec } = require("child_process")
const { readFileSync: read } = require("fs")
const { request } = require("https")
const { version: currentVersion } = require("../package.json")

const REPO = "BenoitZugmeyer/eslint-plugin-html"
const PACKAGE_FILES = [
"LICENSE",
"src/extract.js",
"src/getFileMode.js",
"src/index.js",
"src/pluginReference.js",
"src/settings.js",
"src/remapMessages.js",
"src/verifyPatch.js",
Expand Down Expand Up @@ -115,6 +117,11 @@ function verifyPackageContent() {
}

function createVersion(version) {
if (version === currentVersion) {
console.log(`Version ${version} already exists, skipping creation`)
return
}

console.log(`Creating version ${version}`)

exec(`npm version ${version}`, {
Expand Down

0 comments on commit a163c06

Please sign in to comment.