@uirouter/publish-scripts 2.6.0 → 2.6.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.
- package/CHANGELOG.md +1045 -1038
- package/actions/upgrade/Dockerfile +7 -7
- package/actions/upgrade/action.yml +24 -24
- package/actions/upgrade/entrypoint.sh +3 -3
- package/actions/upgrade/package.json +8 -8
- package/actions/upgrade/upgrade.js +59 -59
- package/artifact_tagging.js +108 -108
- package/docgen/Dockerfile +14 -14
- package/docgen/clone.sh +10 -10
- package/docgen/docgen.sh +27 -27
- package/docgen/docker_push.sh +9 -9
- package/docgen/package.json +7 -7
- package/docgen/prep_docgen.js +58 -58
- package/docgen_via_docker.sh +3 -3
- package/ensure_clean_master.js +10 -10
- package/modify_sourcemap_paths.js +28 -28
- package/package.json +1 -1
- package/publish_docs.js +46 -46
- package/publish_yalc_package.js +117 -117
- package/release.js +164 -164
- package/show_changelog.js +142 -142
- package/show_version.js +110 -110
- package/test_downstream_projects.js +303 -303
- package/util.js +50 -50
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
FROM node:12
|
|
2
|
-
|
|
3
|
-
COPY package.json /package.json
|
|
4
|
-
RUN yarn
|
|
5
|
-
COPY entrypoint.sh /entrypoint.sh
|
|
6
|
-
COPY upgrade.js /upgrade.js
|
|
7
|
-
ENTRYPOINT ["/entrypoint.sh"]
|
|
1
|
+
FROM node:12
|
|
2
|
+
|
|
3
|
+
COPY package.json /package.json
|
|
4
|
+
RUN yarn
|
|
5
|
+
COPY entrypoint.sh /entrypoint.sh
|
|
6
|
+
COPY upgrade.js /upgrade.js
|
|
7
|
+
ENTRYPOINT ["/entrypoint.sh"]
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
name: 'Upgrade dependencies'
|
|
2
|
-
description: 'Upgrade dependencies'
|
|
3
|
-
inputs:
|
|
4
|
-
deptype:
|
|
5
|
-
description: 'dependencies or devDependencies'
|
|
6
|
-
required: true
|
|
7
|
-
default: 'dependencies'
|
|
8
|
-
latest:
|
|
9
|
-
description: 'if `true`, uses yarn upgrade --latest'
|
|
10
|
-
required: true
|
|
11
|
-
default: 'false'
|
|
12
|
-
excludes:
|
|
13
|
-
description: 'comma separated list of packages to exclude from upgrades'
|
|
14
|
-
required: false
|
|
15
|
-
outputs:
|
|
16
|
-
upgrades: # id of output
|
|
17
|
-
description: 'The packages@versions that were updated'
|
|
18
|
-
upgradecount:
|
|
19
|
-
description: 'The number of packages that were updated'
|
|
20
|
-
upgradestrategy:
|
|
21
|
-
description: 'A description of the strategy used either a) latest or b) matching semver range'
|
|
22
|
-
runs:
|
|
23
|
-
using: 'docker'
|
|
24
|
-
image: 'Dockerfile'
|
|
1
|
+
name: 'Upgrade dependencies'
|
|
2
|
+
description: 'Upgrade dependencies'
|
|
3
|
+
inputs:
|
|
4
|
+
deptype:
|
|
5
|
+
description: 'dependencies or devDependencies'
|
|
6
|
+
required: true
|
|
7
|
+
default: 'dependencies'
|
|
8
|
+
latest:
|
|
9
|
+
description: 'if `true`, uses yarn upgrade --latest'
|
|
10
|
+
required: true
|
|
11
|
+
default: 'false'
|
|
12
|
+
excludes:
|
|
13
|
+
description: 'comma separated list of packages to exclude from upgrades'
|
|
14
|
+
required: false
|
|
15
|
+
outputs:
|
|
16
|
+
upgrades: # id of output
|
|
17
|
+
description: 'The packages@versions that were updated'
|
|
18
|
+
upgradecount:
|
|
19
|
+
description: 'The number of packages that were updated'
|
|
20
|
+
upgradestrategy:
|
|
21
|
+
description: 'A description of the strategy used either a) latest or b) matching semver range'
|
|
22
|
+
runs:
|
|
23
|
+
using: 'docker'
|
|
24
|
+
image: 'Dockerfile'
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
/upgrade.js
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
/upgrade.js
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "upgrade",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"dependencies": {
|
|
6
|
-
"@yarnpkg/lockfile": "^1.1.0"
|
|
7
|
-
}
|
|
8
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "upgrade",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@yarnpkg/lockfile": "^1.1.0"
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const fs = require("fs");
|
|
3
|
-
const childProcess = require("child_process");
|
|
4
|
-
const lockfile = require("@yarnpkg/lockfile");
|
|
5
|
-
|
|
6
|
-
// dependencies or devDependencies
|
|
7
|
-
const depType = process.env.INPUT_DEPTYPE || "dependencies";
|
|
8
|
-
const excludes = (process.env.INPUT_EXCLUDES || "").split("s*,s*").filter(x=>x);
|
|
9
|
-
const latest = process.env.INPUT_LATEST === 'true' ? " --latest" : "";
|
|
10
|
-
console.log({ depType, excludes, latest });
|
|
11
|
-
|
|
12
|
-
function getDeclaredDeps() {
|
|
13
|
-
const pkg = JSON.parse(fs.readFileSync("package.json").toString());
|
|
14
|
-
return (depObject = pkg[depType] || {});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function getResolvedDeps() {
|
|
18
|
-
const file = fs.readFileSync("yarn.lock", "utf8");
|
|
19
|
-
const lockJson = lockfile.parse(file);
|
|
20
|
-
return lockJson.object;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
console.log({ declared: getDeclaredDeps() });
|
|
24
|
-
const packages = Object.keys(getDeclaredDeps()).filter(
|
|
25
|
-
(pkg) => !excludes.includes(pkg)
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
function getResolvedSemverMapping() {
|
|
29
|
-
const declaredDeps = getDeclaredDeps();
|
|
30
|
-
const resolvedDeps = getResolvedDeps();
|
|
31
|
-
return packages.reduce((acc, pkg) => {
|
|
32
|
-
const declared = declaredDeps[pkg];
|
|
33
|
-
const semver = `${pkg}@${declaredDeps[pkg]}`;
|
|
34
|
-
const resolved = resolvedDeps[semver].version;
|
|
35
|
-
acc[pkg] = { declared, resolved };
|
|
36
|
-
return acc;
|
|
37
|
-
}, {});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const before = getResolvedSemverMapping();
|
|
41
|
-
|
|
42
|
-
const cmd = `yarn upgrade ${packages.join(" ")} ${latest}`;
|
|
43
|
-
console.log(cmd);
|
|
44
|
-
childProcess.execSync(`${cmd}`, { stdio: "inherit" });
|
|
45
|
-
|
|
46
|
-
const after = getResolvedSemverMapping();
|
|
47
|
-
|
|
48
|
-
const changed = packages.filter(
|
|
49
|
-
(pkg) => before[pkg].resolved !== after[pkg].resolved
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
const upgrades = changed
|
|
53
|
-
.map((pkg) => `${pkg}@${before[pkg].declared}: ${before[pkg].resolved} -> ${after[pkg].resolved}`)
|
|
54
|
-
.join("%0A");
|
|
55
|
-
|
|
56
|
-
childProcess.execSync(`git status`, { stdio: "inherit" });
|
|
57
|
-
console.log(`::set-output name=upgrades::${upgrades}`);
|
|
58
|
-
console.log(`::set-output name=upgradecount::${changed.length}`);
|
|
59
|
-
console.log(`::set-output name=upgradestrategy::${process.env.INPUT_LATEST === 'true' ? 'latest' : 'matching semver range'}`);
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const fs = require("fs");
|
|
3
|
+
const childProcess = require("child_process");
|
|
4
|
+
const lockfile = require("@yarnpkg/lockfile");
|
|
5
|
+
|
|
6
|
+
// dependencies or devDependencies
|
|
7
|
+
const depType = process.env.INPUT_DEPTYPE || "dependencies";
|
|
8
|
+
const excludes = (process.env.INPUT_EXCLUDES || "").split("s*,s*").filter(x=>x);
|
|
9
|
+
const latest = process.env.INPUT_LATEST === 'true' ? " --latest" : "";
|
|
10
|
+
console.log({ depType, excludes, latest });
|
|
11
|
+
|
|
12
|
+
function getDeclaredDeps() {
|
|
13
|
+
const pkg = JSON.parse(fs.readFileSync("package.json").toString());
|
|
14
|
+
return (depObject = pkg[depType] || {});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function getResolvedDeps() {
|
|
18
|
+
const file = fs.readFileSync("yarn.lock", "utf8");
|
|
19
|
+
const lockJson = lockfile.parse(file);
|
|
20
|
+
return lockJson.object;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
console.log({ declared: getDeclaredDeps() });
|
|
24
|
+
const packages = Object.keys(getDeclaredDeps()).filter(
|
|
25
|
+
(pkg) => !excludes.includes(pkg)
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
function getResolvedSemverMapping() {
|
|
29
|
+
const declaredDeps = getDeclaredDeps();
|
|
30
|
+
const resolvedDeps = getResolvedDeps();
|
|
31
|
+
return packages.reduce((acc, pkg) => {
|
|
32
|
+
const declared = declaredDeps[pkg];
|
|
33
|
+
const semver = `${pkg}@${declaredDeps[pkg]}`;
|
|
34
|
+
const resolved = resolvedDeps[semver].version;
|
|
35
|
+
acc[pkg] = { declared, resolved };
|
|
36
|
+
return acc;
|
|
37
|
+
}, {});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const before = getResolvedSemverMapping();
|
|
41
|
+
|
|
42
|
+
const cmd = `yarn upgrade ${packages.join(" ")} ${latest}`;
|
|
43
|
+
console.log(cmd);
|
|
44
|
+
childProcess.execSync(`${cmd}`, { stdio: "inherit" });
|
|
45
|
+
|
|
46
|
+
const after = getResolvedSemverMapping();
|
|
47
|
+
|
|
48
|
+
const changed = packages.filter(
|
|
49
|
+
(pkg) => before[pkg].resolved !== after[pkg].resolved
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
const upgrades = changed
|
|
53
|
+
.map((pkg) => `${pkg}@${before[pkg].declared}: ${before[pkg].resolved} -> ${after[pkg].resolved}`)
|
|
54
|
+
.join("%0A");
|
|
55
|
+
|
|
56
|
+
childProcess.execSync(`git status`, { stdio: "inherit" });
|
|
57
|
+
console.log(`::set-output name=upgrades::${upgrades}`);
|
|
58
|
+
console.log(`::set-output name=upgradecount::${changed.length}`);
|
|
59
|
+
console.log(`::set-output name=upgradestrategy::${process.env.INPUT_LATEST === 'true' ? 'latest' : 'matching semver range'}`);
|
package/artifact_tagging.js
CHANGED
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const util = require('./util');
|
|
4
|
-
util.packageDir();
|
|
5
|
-
|
|
6
|
-
const shx = require('shelljs');
|
|
7
|
-
const readlineSync = require('readline-sync');
|
|
8
|
-
const fs = require('fs');
|
|
9
|
-
const path = require('path');
|
|
10
|
-
let _exec = util._exec;
|
|
11
|
-
|
|
12
|
-
const CONFIG = JSON.parse(fs.readFileSync('./artifacts.json'));
|
|
13
|
-
const COMMIT_ARTIFACTS = CONFIG.ARTIFACTS;
|
|
14
|
-
|
|
15
|
-
const pkg = JSON.parse(fs.readFileSync('./package.json'));
|
|
16
|
-
const version = pkg.version;
|
|
17
|
-
|
|
18
|
-
let widen = false, npm = false, githubtag = false;
|
|
19
|
-
let coreDep = pkg.dependencies['@uirouter/core'];
|
|
20
|
-
let isNarrow = /^[[=~]?(\d.*)/.exec(coreDep);
|
|
21
|
-
let widenedDep = isNarrow && '^' + isNarrow[1];
|
|
22
|
-
|
|
23
|
-
if (isNarrow && readlineSync.keyInYN('Widen @uirouter/core dependency from ' + coreDep + ' to ' + widenedDep + '?')) {
|
|
24
|
-
widen = false;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (readlineSync.keyInYN('Publish to NPM')) {
|
|
28
|
-
npm = true;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (readlineSync.keyInYN('publish to Github Tag?')) {
|
|
33
|
-
githubtag = true;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (!npm && !githubtag) {
|
|
37
|
-
process.exit(1);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const label = githubtag && npm ? "npm package and github tag" : npm ? "npm package" : "github tag";
|
|
41
|
-
|
|
42
|
-
const YYYYMMDD = (function() {
|
|
43
|
-
const date = new Date();
|
|
44
|
-
const year = date.getFullYear();
|
|
45
|
-
|
|
46
|
-
let month = date.getMonth() + 1;
|
|
47
|
-
month = (month < 10 ? "0" : "") + month;
|
|
48
|
-
|
|
49
|
-
let day = date.getDate();
|
|
50
|
-
day = (day < 10 ? "0" : "") + day;
|
|
51
|
-
|
|
52
|
-
return year + month + day;
|
|
53
|
-
})();
|
|
54
|
-
|
|
55
|
-
let tagname = `SNAPSHOT-${YYYYMMDD}`;
|
|
56
|
-
let pkgver = `-SNAPSHOT.${YYYYMMDD}`;
|
|
57
|
-
|
|
58
|
-
if (githubtag) {
|
|
59
|
-
tagname += readlineSync.question(`Suffix for tag ${tagname} (optional)?`);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (npm) {
|
|
63
|
-
pkgver += readlineSync.question(`Suffix for package version ${pkgver} (optional)?`);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (!readlineSync.keyInYN(`Ready to publish ${label}?`)) {
|
|
67
|
-
process.exit(1);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
util.ensureCleanMaster('master');
|
|
71
|
-
|
|
72
|
-
// then tag and push tag
|
|
73
|
-
_exec(`git checkout -b ${tagname}-prep`);
|
|
74
|
-
|
|
75
|
-
pkg.dependencies['@uirouter/core'] = widenedDep;
|
|
76
|
-
pkg.version += pkgver;
|
|
77
|
-
|
|
78
|
-
fs.writeFileSync("package.json", JSON.stringify(pkg, undefined, 2));
|
|
79
|
-
_exec(`git commit -m "Widening @uirouter/core dependency range to ${widenedDep}" package.json`);
|
|
80
|
-
|
|
81
|
-
_exec(`npm run package`);
|
|
82
|
-
|
|
83
|
-
if (npm) {
|
|
84
|
-
let output = _exec(`npm dist-tag ls ${pkg.name}`).stdout;
|
|
85
|
-
let latest = output.split(/[\r\n]/)
|
|
86
|
-
.map(line => line.split(": "))
|
|
87
|
-
.filter(linedata => linedata[0] === 'latest')[0];
|
|
88
|
-
|
|
89
|
-
if (!latest) {
|
|
90
|
-
throw new Error(`Could not determine value of "latest" dist-tag for ${pkg.name}`);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
_exec(`npm publish`);
|
|
94
|
-
_exec(`npm dist-tag add ${pkg.name}@${latest[1]} latest`);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (githubtag) {
|
|
98
|
-
_exec(`git add --force ${COMMIT_ARTIFACTS.join(' ')}`);
|
|
99
|
-
_exec(`git rm yarn.lock`);
|
|
100
|
-
|
|
101
|
-
_exec(`git commit -m 'chore(*): commiting build files'`);
|
|
102
|
-
_exec(`git tag ${tagname}`);
|
|
103
|
-
_exec(`git push -u origin ${tagname}`);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
_exec(`git checkout master`);
|
|
107
|
-
_exec(`git branch -D ${tagname}-prep`);
|
|
108
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const util = require('./util');
|
|
4
|
+
util.packageDir();
|
|
5
|
+
|
|
6
|
+
const shx = require('shelljs');
|
|
7
|
+
const readlineSync = require('readline-sync');
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
let _exec = util._exec;
|
|
11
|
+
|
|
12
|
+
const CONFIG = JSON.parse(fs.readFileSync('./artifacts.json'));
|
|
13
|
+
const COMMIT_ARTIFACTS = CONFIG.ARTIFACTS;
|
|
14
|
+
|
|
15
|
+
const pkg = JSON.parse(fs.readFileSync('./package.json'));
|
|
16
|
+
const version = pkg.version;
|
|
17
|
+
|
|
18
|
+
let widen = false, npm = false, githubtag = false;
|
|
19
|
+
let coreDep = pkg.dependencies['@uirouter/core'];
|
|
20
|
+
let isNarrow = /^[[=~]?(\d.*)/.exec(coreDep);
|
|
21
|
+
let widenedDep = isNarrow && '^' + isNarrow[1];
|
|
22
|
+
|
|
23
|
+
if (isNarrow && readlineSync.keyInYN('Widen @uirouter/core dependency from ' + coreDep + ' to ' + widenedDep + '?')) {
|
|
24
|
+
widen = false;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (readlineSync.keyInYN('Publish to NPM')) {
|
|
28
|
+
npm = true;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
if (readlineSync.keyInYN('publish to Github Tag?')) {
|
|
33
|
+
githubtag = true;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (!npm && !githubtag) {
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const label = githubtag && npm ? "npm package and github tag" : npm ? "npm package" : "github tag";
|
|
41
|
+
|
|
42
|
+
const YYYYMMDD = (function() {
|
|
43
|
+
const date = new Date();
|
|
44
|
+
const year = date.getFullYear();
|
|
45
|
+
|
|
46
|
+
let month = date.getMonth() + 1;
|
|
47
|
+
month = (month < 10 ? "0" : "") + month;
|
|
48
|
+
|
|
49
|
+
let day = date.getDate();
|
|
50
|
+
day = (day < 10 ? "0" : "") + day;
|
|
51
|
+
|
|
52
|
+
return year + month + day;
|
|
53
|
+
})();
|
|
54
|
+
|
|
55
|
+
let tagname = `SNAPSHOT-${YYYYMMDD}`;
|
|
56
|
+
let pkgver = `-SNAPSHOT.${YYYYMMDD}`;
|
|
57
|
+
|
|
58
|
+
if (githubtag) {
|
|
59
|
+
tagname += readlineSync.question(`Suffix for tag ${tagname} (optional)?`);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (npm) {
|
|
63
|
+
pkgver += readlineSync.question(`Suffix for package version ${pkgver} (optional)?`);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (!readlineSync.keyInYN(`Ready to publish ${label}?`)) {
|
|
67
|
+
process.exit(1);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
util.ensureCleanMaster('master');
|
|
71
|
+
|
|
72
|
+
// then tag and push tag
|
|
73
|
+
_exec(`git checkout -b ${tagname}-prep`);
|
|
74
|
+
|
|
75
|
+
pkg.dependencies['@uirouter/core'] = widenedDep;
|
|
76
|
+
pkg.version += pkgver;
|
|
77
|
+
|
|
78
|
+
fs.writeFileSync("package.json", JSON.stringify(pkg, undefined, 2));
|
|
79
|
+
_exec(`git commit -m "Widening @uirouter/core dependency range to ${widenedDep}" package.json`);
|
|
80
|
+
|
|
81
|
+
_exec(`npm run package`);
|
|
82
|
+
|
|
83
|
+
if (npm) {
|
|
84
|
+
let output = _exec(`npm dist-tag ls ${pkg.name}`).stdout;
|
|
85
|
+
let latest = output.split(/[\r\n]/)
|
|
86
|
+
.map(line => line.split(": "))
|
|
87
|
+
.filter(linedata => linedata[0] === 'latest')[0];
|
|
88
|
+
|
|
89
|
+
if (!latest) {
|
|
90
|
+
throw new Error(`Could not determine value of "latest" dist-tag for ${pkg.name}`);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
_exec(`npm publish`);
|
|
94
|
+
_exec(`npm dist-tag add ${pkg.name}@${latest[1]} latest`);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (githubtag) {
|
|
98
|
+
_exec(`git add --force ${COMMIT_ARTIFACTS.join(' ')}`);
|
|
99
|
+
_exec(`git rm yarn.lock`);
|
|
100
|
+
|
|
101
|
+
_exec(`git commit -m 'chore(*): commiting build files'`);
|
|
102
|
+
_exec(`git tag ${tagname}`);
|
|
103
|
+
_exec(`git push -u origin ${tagname}`);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
_exec(`git checkout master`);
|
|
107
|
+
_exec(`git branch -D ${tagname}-prep`);
|
|
108
|
+
|
package/docgen/Dockerfile
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
FROM node:12
|
|
2
|
-
|
|
3
|
-
RUN apt-get update && apt-get install -y rsync jq vim
|
|
4
|
-
|
|
5
|
-
WORKDIR /home/node/work
|
|
6
|
-
COPY package.json /home/node/work
|
|
7
|
-
RUN npm install
|
|
8
|
-
RUN sed -i'' -e 's/Globals/{{name}}/' node_modules/typedoc-default-themes/bin/default/partials/breadcrumb.hbs
|
|
9
|
-
|
|
10
|
-
COPY clone.sh /home/node/work
|
|
11
|
-
COPY docgen.sh /home/node/work
|
|
12
|
-
COPY prep_docgen.js /home/node/work
|
|
13
|
-
|
|
14
|
-
ENTRYPOINT ["/home/node/work/docgen.sh"]
|
|
1
|
+
FROM node:12
|
|
2
|
+
|
|
3
|
+
RUN apt-get update && apt-get install -y rsync jq vim
|
|
4
|
+
|
|
5
|
+
WORKDIR /home/node/work
|
|
6
|
+
COPY package.json /home/node/work
|
|
7
|
+
RUN npm install
|
|
8
|
+
RUN sed -i'' -e 's/Globals/{{name}}/' node_modules/typedoc-default-themes/bin/default/partials/breadcrumb.hbs
|
|
9
|
+
|
|
10
|
+
COPY clone.sh /home/node/work
|
|
11
|
+
COPY docgen.sh /home/node/work
|
|
12
|
+
COPY prep_docgen.js /home/node/work
|
|
13
|
+
|
|
14
|
+
ENTRYPOINT ["/home/node/work/docgen.sh"]
|
package/docgen/clone.sh
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
REPO=$1
|
|
4
|
-
DIR=$2
|
|
5
|
-
BRANCH=$3
|
|
6
|
-
|
|
7
|
-
mkdir -p $DIR
|
|
8
|
-
git clone $REPO $DIR
|
|
9
|
-
cd $DIR
|
|
10
|
-
git checkout $BRANCH
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
REPO=$1
|
|
4
|
+
DIR=$2
|
|
5
|
+
BRANCH=$3
|
|
6
|
+
|
|
7
|
+
mkdir -p $DIR
|
|
8
|
+
git clone $REPO $DIR
|
|
9
|
+
cd $DIR
|
|
10
|
+
git checkout $BRANCH
|
package/docgen/docgen.sh
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -ex
|
|
3
|
-
|
|
4
|
-
WORK=/home/node/work
|
|
5
|
-
PROJECT=${WORK}/project
|
|
6
|
-
|
|
7
|
-
[[ -d $PROJECT ]] || {
|
|
8
|
-
echo "package must be mounted in Docker at $PROJECT"
|
|
9
|
-
exit 1
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
[[ -e $PROJECT/package.json ]] || {
|
|
13
|
-
echo "package must be mounted in Docker at $PROJECT"
|
|
14
|
-
exit 1
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
pushd $WORK
|
|
18
|
-
[[ -e typedoc.json ]] && rm typedoc.json
|
|
19
|
-
ln -s $WORK/project/typedoc.json .
|
|
20
|
-
README=$(jq -r .readme < typedoc.json)
|
|
21
|
-
cp $WORK/project/$README .
|
|
22
|
-
|
|
23
|
-
./prep_docgen.js
|
|
24
|
-
bash ./clone_repos.sh
|
|
25
|
-
cd project
|
|
26
|
-
../node_modules/.bin/typedoc --tsconfig tsconfig.docgen.json
|
|
27
|
-
rm -rf src/includes
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -ex
|
|
3
|
+
|
|
4
|
+
WORK=/home/node/work
|
|
5
|
+
PROJECT=${WORK}/project
|
|
6
|
+
|
|
7
|
+
[[ -d $PROJECT ]] || {
|
|
8
|
+
echo "package must be mounted in Docker at $PROJECT"
|
|
9
|
+
exit 1
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
[[ -e $PROJECT/package.json ]] || {
|
|
13
|
+
echo "package must be mounted in Docker at $PROJECT"
|
|
14
|
+
exit 1
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
pushd $WORK
|
|
18
|
+
[[ -e typedoc.json ]] && rm typedoc.json
|
|
19
|
+
ln -s $WORK/project/typedoc.json .
|
|
20
|
+
README=$(jq -r .readme < typedoc.json)
|
|
21
|
+
cp $WORK/project/$README .
|
|
22
|
+
|
|
23
|
+
./prep_docgen.js
|
|
24
|
+
bash ./clone_repos.sh
|
|
25
|
+
cd project
|
|
26
|
+
../node_modules/.bin/typedoc --tsconfig tsconfig.docgen.json
|
|
27
|
+
rm -rf src/includes
|
package/docgen/docker_push.sh
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
VERSION=$(jq -r .version < ../package.json);
|
|
4
|
-
docker build -t docgen . --no-cache
|
|
5
|
-
docker tag docgen:latest uirouter/docgen:$VERSION
|
|
6
|
-
docker push uirouter/docgen:$VERSION
|
|
7
|
-
docker tag docgen:latest uirouter/docgen:stable
|
|
8
|
-
docker push uirouter/docgen:stable
|
|
9
|
-
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
VERSION=$(jq -r .version < ../package.json);
|
|
4
|
+
docker build -t docgen . --no-cache
|
|
5
|
+
docker tag docgen:latest uirouter/docgen:$VERSION
|
|
6
|
+
docker push uirouter/docgen:$VERSION
|
|
7
|
+
docker tag docgen:latest uirouter/docgen:stable
|
|
8
|
+
docker push uirouter/docgen:stable
|
|
9
|
+
|
package/docgen/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"dependencies": {
|
|
3
|
-
"typedoc": "0.17.8",
|
|
4
|
-
"typescript": "3.9.7",
|
|
5
|
-
"typedoc-plugin-ui-router": "4.0.1"
|
|
6
|
-
}
|
|
7
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"dependencies": {
|
|
3
|
+
"typedoc": "0.17.8",
|
|
4
|
+
"typescript": "3.9.7",
|
|
5
|
+
"typedoc-plugin-ui-router": "4.0.1"
|
|
6
|
+
}
|
|
7
|
+
}
|