소스 검색

fix(cli.rs): add publish scripts to the default covector template

Lucas Nogueira 3 년 전
부모
커밋
0f46e5664a
2개의 변경된 파일77개의 추가작업 그리고 6개의 파일을 삭제
  1. 27 2
      tooling/cli/templates/plugin/backend/.changes/config.json
  2. 50 4
      tooling/cli/templates/plugin/with-api/.changes/config.json

+ 27 - 2
tooling/cli/templates/plugin/backend/.changes/config.json

@@ -3,8 +3,33 @@
   "pkgManagers": {
     "rust": {
       "version": true,
-      "publish": true,
-      "getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -"
+      "getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -",
+      "publish": [
+        {
+          "command": "cargo package --allow-dirty",
+          "dryRunCommand": true
+        },
+        {
+          "command": "echo \"# Cargo Publish\"",
+          "dryRunCommand": true,
+          "pipe": true
+        },
+        {
+          "command": "echo \"\\`\\`\\`\"",
+          "dryRunCommand": true,
+          "pipe": true
+        },
+        {
+          "command": "cargo publish",
+          "dryRunCommand": "cargo publish --dry-run --allow-dirty",
+          "pipe": true
+        },
+        {
+          "command": "echo \"\\`\\`\\`\"",
+          "dryRunCommand": true,
+          "pipe": true
+        }
+      ]
     }
   },
   "packages": {

+ 50 - 4
tooling/cli/templates/plugin/with-api/.changes/config.json

@@ -3,13 +3,59 @@
   "pkgManagers": {
     "rust": {
       "version": true,
-      "publish": true,
-      "getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -"
+      "getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -",
+      "publish": [
+        {
+          "command": "cargo package --allow-dirty",
+          "dryRunCommand": true
+        },
+        {
+          "command": "echo \"# Cargo Publish\"",
+          "dryRunCommand": true,
+          "pipe": true
+        },
+        {
+          "command": "echo \"\\`\\`\\`\"",
+          "dryRunCommand": true,
+          "pipe": true
+        },
+        {
+          "command": "cargo publish",
+          "dryRunCommand": "cargo publish --dry-run --allow-dirty",
+          "pipe": true
+        },
+        {
+          "command": "echo \"\\`\\`\\`\"",
+          "dryRunCommand": true,
+          "pipe": true
+        }
+      ]
     },
     "javascript": {
       "version": true,
-      "publish": true,
-      "getPublishedVersion": "npm view ${ pkgFile.pkg.name } version"
+      "getPublishedVersion": "npm view ${ pkgFile.pkg.name } version",
+      "publish": [
+        {
+          "command": "echo \"# Yarn Package Publish\"",
+          "dryRunCommand": true,
+          "pipe": true
+        },
+        {
+          "command": "echo '```'",
+          "dryRunCommand": true,
+          "pipe": true
+        },
+        {
+          "command": "yarn publish --access public --loglevel silly",
+          "dryRunCommand": "npm publish --dry-run --access public",
+          "pipe": true
+        },
+        {
+          "command": "echo '```'",
+          "dryRunCommand": true,
+          "pipe": true
+        }
+      ]
     }
   },
   "packages": {