Browse Source

reorganize bumping version scripts

Yuki Takei 2 years ago
parent
commit
fc8f5158a0

+ 2 - 3
.github/workflows/release-slackbot-proxy.yml

@@ -112,9 +112,8 @@ jobs:
         yarn --frozen-lockfile
 
     - name: Bump versions for next RC
-      working-directory: ./apps/slackbot-proxy
       run: |
-        yarn version --no-git-tag-version --prepatch --preid=slackbot-proxy
+        turbo run version --filter=@growi/slackbot-proxy -- --prerelease
 
     - name: Retrieve information from package.json
       uses: myrotvorets/info-from-package-json-action@1.2.0
@@ -136,6 +135,6 @@ jobs:
         source_branch: support/prepare-v${{ steps.package-json.outputs.packageVersion }}
         destination_branch: master
         pr_title: Prepare v${{ steps.package-json.outputs.packageVersion }}
-        pr_label: flag/exclude-from-changelog
+        pr_label: flag/exclude-from-changelog,type/prepare-next-version
         pr_body: "An automated PR generated by ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
         github_token: ${{ secrets.GITHUB_TOKEN }}

+ 3 - 2
.github/workflows/release.yml

@@ -35,7 +35,7 @@ jobs:
 
     - name: Bump versions
       run: |
-        turbo run bump-versions:patch
+        turbo run version --filter=@growi/app -- --patch
         yarn upgrade --scope=@growi
         sh ./apps/app/bin/github-actions/update-readme.sh
 
@@ -98,7 +98,8 @@ jobs:
 
     - name: Bump versions for next RC
       run: |
-        yarn bump-versions:rc
+        turbo run version --filter=@growi/app -- --prepatch
+        turbo run version --filter=@growi/slackbot-proxy -- --prepatch
         yarn upgrade --scope=@growi
 
     - name: Retrieve information from package.json

+ 1 - 1
apps/app/package.json

@@ -47,7 +47,7 @@
     "openapi:v1": "yarn cross-env API_VERSION=1 yarn swagger-jsdoc -- \"src/server/*/*.js\" \"src/server/models/**/*.js\"",
     "ts-node": "node -r ts-node/register -r tsconfig-paths/register -r dotenv-flow/config",
     "ts-node-dev": "ts-node-dev -r tsconfig-paths/register -r dotenv-flow/config",
-    "version": "yarn version --no-git-tag-version"
+    "version": "yarn version --no-git-tag-version --preid=RC"
   },
   "// comments for dependencies": {
     "escape-string-regexp": "5.0.0 or above exports only ESM",

+ 0 - 11
apps/slackbot-proxy/bump-versions.config.js

@@ -1,11 +0,0 @@
-/*
- * Reference: https://community.algolia.com/shipjs/
- */
-module.exports = {
-  monorepo: {
-    mainVersionFile: 'package.json',
-    packagesToBump: [
-      './',
-    ],
-  },
-};

+ 3 - 2
apps/slackbot-proxy/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@growi/slackbot-proxy",
-  "version": "6.1.4-slackbot-proxy.0",
+  "version": "6.1.5-slackbot-proxy.0",
   "license": "MIT",
   "scripts": {
     "build": "yarn tsc && tsc-alias -p tsconfig.build.json",
@@ -18,7 +18,8 @@
     "postbuild": "yarn cp:public && yarn cp:views && yarn cp:bootstrap",
     "predev": "yarn cp:bootstrap:dev",
     "lint": "yarn eslint src --ext .ts",
-    "lint:fix": "yarn eslint src --ext .ts --fix"
+    "lint:fix": "yarn eslint src --ext .ts --fix",
+    "version": "yarn version --no-git-tag-version --preid=slackbot-proxy"
   },
   "// comments for dependencies": {
     "read-pkg-up": "v8 doesn't support CommonJS anymore. https://github.com/sindresorhus/read-pkg-up/issues/17"

+ 1 - 3
package.json

@@ -38,9 +38,7 @@
     "app:server": "cd apps/app && yarn server",
     "slackbot-proxy:build": "turbo run build --filter @growi/slackbot-proxy",
     "slackbot-proxy:server": "cd apps/slackbot-proxy && yarn start:prod",
-    "bump-versions:patch": "turbo run version -- --patch",
-    "bump-versions:rc": "turbo run version -- --prepatch --preid=RC",
-    "version": "yarn version --no-git-tag-version"
+    "version": "yarn version --no-git-tag-version --preid=RC"
   },
   "dependencies": {
     "cross-env": "^7.0.0",

+ 1 - 1
packages/core/package.json

@@ -21,7 +21,7 @@
     "lint:typecheck": "tsc",
     "lint": "npm-run-all -p lint:*",
     "test": "vitest run --coverage",
-    "version": "yarn version --no-git-tag-version"
+    "version": "yarn version --no-git-tag-version --preid=RC"
   },
   "// comments for dependencies": {
     "escape-string-regexp": "5.0.0 or above exports only ESM"

+ 1 - 1
packages/hackmd/package.json

@@ -15,7 +15,7 @@
     "lint:js": "yarn eslint **/*.{js,ts}",
     "lint:typecheck": "tsc",
     "lint": "npm-run-all -p lint:*",
-    "version": "yarn version --no-git-tag-version"
+    "version": "yarn version --no-git-tag-version --preid=RC"
   },
   "dependencies": {},
   "devDependencies": {

+ 1 - 1
packages/presentation/package.json

@@ -21,7 +21,7 @@
     "lint:styles": "stylelint --allow-empty-input src/**/*.scss src/**/*.css",
     "lint:typecheck": "tsc",
     "lint": "run-p lint:*",
-    "version": "yarn version --no-git-tag-version"
+    "version": "yarn version --no-git-tag-version --preid=RC"
   },
   "dependencies": {
     "@growi/core": "link:../core"

+ 1 - 1
packages/preset-templates/package.json

@@ -3,7 +3,7 @@
   "version": "6.1.5-RC.0",
   "scripts": {
     "test": "vitest run",
-    "version": "yarn version --no-git-tag-version"
+    "version": "yarn version --no-git-tag-version --preid=RC"
   },
   "dependencies": {},
   "devDependencies": {

+ 1 - 1
packages/preset-themes/package.json

@@ -24,7 +24,7 @@
     "lint:typecheck": "tsc",
     "lint": "run-p lint:*",
     "preview": "vite preview",
-    "version": "yarn version --no-git-tag-version"
+    "version": "yarn version --no-git-tag-version --preid=RC"
   },
   "dependencies": {},
   "devDependencies": {

+ 1 - 1
packages/remark-attachment-refs/package.json

@@ -27,7 +27,7 @@
     "lint:typecheck": "tsc",
     "lint": "run-p lint:*",
     "test": "",
-    "version": "yarn version --no-git-tag-version"
+    "version": "yarn version --no-git-tag-version --preid=RC"
   },
   "dependencies": {
     "@growi/core": "link:../core",

+ 1 - 1
packages/remark-drawio/package.json

@@ -28,7 +28,7 @@
     "lint:styles": "stylelint --allow-empty-input src/**/*.scss src/**/*.css",
     "lint:typecheck": "tsc",
     "lint": "run-p lint:*",
-    "version": "yarn version --no-git-tag-version"
+    "version": "yarn version --no-git-tag-version --preid=RC"
   },
   "dependencies": {
     "pako": "^2.1.0"

+ 1 - 1
packages/remark-growi-directive/package.json

@@ -25,7 +25,7 @@
     "test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api",
     "lint": "yarn eslint \"**/*.{cjs, js,jsx,ts,tsx}\"",
     "lint:fix": "yarn eslint \"**/*.{cjs, js,jsx,ts,tsx}\" --fix",
-    "version": "yarn version --no-git-tag-version"
+    "version": "yarn version --no-git-tag-version --preid=RC"
   },
   "dependencies": {
     "@types/mdast": "^3.0.0",

+ 1 - 1
packages/remark-lsx/package.json

@@ -26,7 +26,7 @@
     "lint:typecheck": "tsc",
     "lint": "run-p lint:*",
     "test": "vitest run --coverage",
-    "version": "yarn version --no-git-tag-version"
+    "version": "yarn version --no-git-tag-version --preid=RC"
   },
   "// comments for dependencies": {
     "escape-string-regexp": "5.0.0 or above exports only ESM"

+ 1 - 1
packages/slack/package.json

@@ -14,7 +14,7 @@
     "lint:typecheck": "tsc",
     "lint": "npm-run-all -p lint:*",
     "test": "vitest run --coverage",
-    "version": "yarn version --no-git-tag-version"
+    "version": "yarn version --no-git-tag-version --preid=RC"
   },
   "dependencies": {
     "@slack/oauth": "^2.0.1",

+ 1 - 1
packages/ui/package.json

@@ -18,7 +18,7 @@
     "lint:js": "yarn eslint **/*.{js,ts}",
     "lint:typecheck": "tsc",
     "lint": "npm-run-all -p lint:*",
-    "version": "yarn version --no-git-tag-version"
+    "version": "yarn version --no-git-tag-version --preid=RC"
   },
   "dependencies": {
     "@growi/core": "link:../core"

+ 4 - 0
turbo.json

@@ -171,6 +171,10 @@
     "test": {
       "outputMode": "new-only"
     },
+    "@growi/app#version": {
+      "cache": false,
+      "dependsOn": ["^version", "//#version"]
+    },
     "version": {
       "cache": false
     },