diff --git a/packages/add/package.json b/packages/add/package.json index fb45499..dbc59e5 100644 --- a/packages/add/package.json +++ b/packages/add/package.json @@ -17,9 +17,9 @@ "copypkgfiles": "yarn cleannpx && cp README.md ./npx/ && cp package.json ./npx/", "copybin": "cp ./dist/*.js ./npx/dist", "copyforrelease": "yarn copypkgfiles && yarn copybin", - "version:patch": "npm version patch --tag-version-prefix=rw-shad/v", - "version:minor": "npm version minor --tag-version-prefix=rw-shad/v", - "version:major": "npm version major --tag-version-prefix=rw-shad/v", + "version:patch": "yarn version patch && yarn tsx tag.ts", + "version:minor": "yarn version minor && yarn tsx tag.ts", + "version:major": "yarn version major && yarn tsx tag.ts", "release:patch": "yarn build && yarn version:patch && yarn copyforrelease && cd npx && npm publish && git push --follow-tags", "release:minor": "yarn build && yarn version:minor && yarn copyforrelease && cd npx && npm publish && git push --follow-tags", "release:major": "yarn build && yarn version:major && yarn copyforrelease && cd npx && npm publish && git push --follow-tags" diff --git a/packages/add/tag.ts b/packages/add/tag.ts new file mode 100644 index 0000000..223e8c4 --- /dev/null +++ b/packages/add/tag.ts @@ -0,0 +1,17 @@ +import fs from 'fs' + +import execa from 'execa' + +const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf-8')) + +const { stdout: stdoutCommit } = await execa.command( + `git commit -am setup-rw-shad/v${packageJson.version}`, +) + +console.log(stdoutCommit) + +const { stdout: stdoutTag } = await execa.command( + `git tag setup-rw-shad/v${packageJson.version}`, +) + +console.log(stdoutTag) diff --git a/packages/setup/package.json b/packages/setup/package.json index ba0bb7b..3df0d4a 100644 --- a/packages/setup/package.json +++ b/packages/setup/package.json @@ -18,9 +18,9 @@ "copybin": "cp ./dist/*.js ./npx/dist", "copytemplates": "cp ./templates/* ./npx/templates/", "copyforrelease": "yarn copypkgfiles && yarn copybin && yarn copytemplates", - "version:patch": "npm version patch --tag-version-prefix=setup-rw-shad/v", - "version:minor": "npm version minor --tag-version-prefix=setup-rw-shad/v", - "version:major": "npm version major --tag-version-prefix=setup-rw-shad/v", + "version:patch": "yarn version patch && yarn tsx tag.ts", + "version:minor": "yarn version minor && yarn tsx tag.ts", + "version:major": "yarn version major && yarn tsx tag.ts", "release:patch": "yarn build && yarn version:patch && yarn copyforrelease && cd npx && npm publish && git push --follow-tags", "release:minor": "yarn build && yarn version:minor && yarn copyforrelease && cd npx && npm publish && git push --follow-tags", "release:major": "yarn build && yarn version:major && yarn copyforrelease && cd npx && npm publish && git push --follow-tags" diff --git a/packages/setup/tag.ts b/packages/setup/tag.ts new file mode 100644 index 0000000..8b1359b --- /dev/null +++ b/packages/setup/tag.ts @@ -0,0 +1,17 @@ +import fs from 'fs'; + +import execa from 'execa'; + +const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf-8')) + +const { stdout: stdoutCommit } = await execa.command( + `git commit -am setup-rw-shad/v${packageJson.version}` +) + +console.log(stdoutCommit) + +const { stdout: stdoutTag } = await execa.command( + `git tag setup-rw-shad/v${packageJson.version}` +) + +console.log(stdoutTag)