@salesforcedevs/sfdocs-e2e 1.0.9-alpha-check → 1.0.9-alpha-check-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/publish.sh +19 -0
  2. package/package.json +3 -5
package/bin/publish.sh ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ VERSION="${1:?Usage: publish.sh <version> [--tag <tag>]}"
5
+ shift
6
+ TAG_ARGS=("$@")
7
+
8
+ cp package.json .package.json.bak
9
+
10
+ cleanup() { mv .package.json.bak package.json; }
11
+ trap cleanup EXIT
12
+
13
+ node -e "
14
+ var p = require('./package.json');
15
+ delete p.private;
16
+ require('fs').writeFileSync('package.json', JSON.stringify(p, null, 2) + '\n');
17
+ "
18
+
19
+ yarn publish --new-version "$VERSION" "${TAG_ARGS[@]}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/sfdocs-e2e",
3
- "version": "1.0.9-alpha-check",
3
+ "version": "1.0.9-alpha-check-1",
4
4
  "description": "E2E test suite for SFDocs static portal pages (SSG)",
5
5
  "license": "ISC",
6
6
  "bin": {
@@ -17,10 +17,8 @@
17
17
  "test:e2e:portal": "TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=./tsconfig.json wdio portal-wdio.conf.js",
18
18
  "test:e2e:static:portal": "TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=./tsconfig.json wdio static-portal-wdio.conf.js",
19
19
  "test:scope-search": "TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=./tsconfig.json wdio search-wdio.conf.js",
20
- "prepublish:e2e": "node -e \"const fs=require('fs'); const c=fs.readFileSync('./package.json','utf8'); fs.writeFileSync('./package.json', c.replace(/^\\s*\\\"private\\\":\\s*true,?\\n/m, ''))\"",
21
- "postpublish:e2e": "node -e \"const fs=require('fs'); const c=fs.readFileSync('./package.json','utf8'); fs.writeFileSync('./package.json', c.replace(/(\\\"description\\\":[^\\n]*\\n)/, '$1 \\\"private\\\": true,\\n'))\"",
22
- "release:alpha:e2e": "f() { yarn prepublish:e2e && yarn publish --tag alpha --new-version $1; yarn postpublish:e2e; }; f",
23
- "release:e2e": "f() { yarn prepublish:e2e && yarn publish --new-version $1; yarn postpublish:e2e; }; f"
20
+ "release:alpha:e2e": "f() { bash bin/publish.sh $1 --tag alpha; }; f",
21
+ "release:e2e": "f() { bash bin/publish.sh $1; }; f"
24
22
  },
25
23
  "dependencies": {
26
24
  "@sa11y/wdio": "^7.0.0",