@eclipse-glsp/cli 1.1.0-next.4846de1.120

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 (79) hide show
  1. package/LICENSE +642 -0
  2. package/README.md +89 -0
  3. package/bin/glsp +2 -0
  4. package/lib/app.d.ts +3 -0
  5. package/lib/app.d.ts.map +1 -0
  6. package/lib/app.js +32 -0
  7. package/lib/app.js.map +1 -0
  8. package/lib/commands/check-header.d.ts +24 -0
  9. package/lib/commands/check-header.d.ts.map +1 -0
  10. package/lib/commands/check-header.js +234 -0
  11. package/lib/commands/check-header.js.map +1 -0
  12. package/lib/commands/coverage-report.d.ts +29 -0
  13. package/lib/commands/coverage-report.d.ts.map +1 -0
  14. package/lib/commands/coverage-report.js +100 -0
  15. package/lib/commands/coverage-report.js.map +1 -0
  16. package/lib/commands/release/common.d.ts +69 -0
  17. package/lib/commands/release/common.d.ts.map +1 -0
  18. package/lib/commands/release/common.js +273 -0
  19. package/lib/commands/release/common.js.map +1 -0
  20. package/lib/commands/release/release-client.d.ts +3 -0
  21. package/lib/commands/release/release-client.d.ts.map +1 -0
  22. package/lib/commands/release/release-client.js +53 -0
  23. package/lib/commands/release/release-client.js.map +1 -0
  24. package/lib/commands/release/release-eclipse-integration.d.ts +18 -0
  25. package/lib/commands/release/release-eclipse-integration.d.ts.map +1 -0
  26. package/lib/commands/release/release-eclipse-integration.js +90 -0
  27. package/lib/commands/release/release-eclipse-integration.js.map +1 -0
  28. package/lib/commands/release/release-java-server.d.ts +3 -0
  29. package/lib/commands/release/release-java-server.d.ts.map +1 -0
  30. package/lib/commands/release/release-java-server.js +68 -0
  31. package/lib/commands/release/release-java-server.js.map +1 -0
  32. package/lib/commands/release/release-server-node.d.ts +18 -0
  33. package/lib/commands/release/release-server-node.d.ts.map +1 -0
  34. package/lib/commands/release/release-server-node.js +51 -0
  35. package/lib/commands/release/release-server-node.js.map +1 -0
  36. package/lib/commands/release/release-theia-integration.d.ts +18 -0
  37. package/lib/commands/release/release-theia-integration.d.ts.map +1 -0
  38. package/lib/commands/release/release-theia-integration.js +62 -0
  39. package/lib/commands/release/release-theia-integration.js.map +1 -0
  40. package/lib/commands/release/release-vscode-integration.d.ts +18 -0
  41. package/lib/commands/release/release-vscode-integration.d.ts.map +1 -0
  42. package/lib/commands/release/release-vscode-integration.js +51 -0
  43. package/lib/commands/release/release-vscode-integration.js.map +1 -0
  44. package/lib/commands/release/release.d.ts +14 -0
  45. package/lib/commands/release/release.d.ts.map +1 -0
  46. package/lib/commands/release/release.js +165 -0
  47. package/lib/commands/release/release.js.map +1 -0
  48. package/lib/util/command-util.d.ts +26 -0
  49. package/lib/util/command-util.d.ts.map +1 -0
  50. package/lib/util/command-util.js +53 -0
  51. package/lib/util/command-util.js.map +1 -0
  52. package/lib/util/git-util.d.ts +60 -0
  53. package/lib/util/git-util.d.ts.map +1 -0
  54. package/lib/util/git-util.js +171 -0
  55. package/lib/util/git-util.js.map +1 -0
  56. package/lib/util/logger.d.ts +23 -0
  57. package/lib/util/logger.d.ts.map +1 -0
  58. package/lib/util/logger.js +50 -0
  59. package/lib/util/logger.js.map +1 -0
  60. package/lib/util/validation-util.d.ts +6 -0
  61. package/lib/util/validation-util.d.ts.map +1 -0
  62. package/lib/util/validation-util.js +64 -0
  63. package/lib/util/validation-util.js.map +1 -0
  64. package/package.json +64 -0
  65. package/src/app.ts +30 -0
  66. package/src/commands/check-header.ts +315 -0
  67. package/src/commands/coverage-report.ts +113 -0
  68. package/src/commands/release/common.ts +312 -0
  69. package/src/commands/release/release-client.ts +64 -0
  70. package/src/commands/release/release-eclipse-integration.ts +113 -0
  71. package/src/commands/release/release-java-server.ts +73 -0
  72. package/src/commands/release/release-server-node.ts +61 -0
  73. package/src/commands/release/release-theia-integration.ts +77 -0
  74. package/src/commands/release/release-vscode-integration.ts +65 -0
  75. package/src/commands/release/release.ts +215 -0
  76. package/src/util/command-util.ts +54 -0
  77. package/src/util/git-util.ts +172 -0
  78. package/src/util/logger.ts +57 -0
  79. package/src/util/validation-util.ts +63 -0
@@ -0,0 +1,273 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2022 EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the Eclipse Public License v. 2.0 which is available at
7
+ * http://www.eclipse.org/legal/epl-2.0.
8
+ *
9
+ * This Source Code may also be made available under the following Secondary
10
+ * Licenses when the conditions for such availability set forth in the Eclipse
11
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ * with the GNU Classpath Exception which is available at
13
+ * https://www.gnu.org/software/classpath/license.html.
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ ********************************************************************************/
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.updateLernaForDryRun = exports.checkJavaServerVersion = exports.isExistingMavenVersion = exports.checkIfMavenVersionExists = exports.checkIfNpmVersionExists = exports.asMvnVersion = exports.updateServerConfig = exports.updateVersion = exports.upgradeCommand = exports.yarnInstall = exports.lernaSetVersion = exports.publish = exports.commitAndTag = exports.checkoutAndCd = exports.ReleaseType = exports.Component = exports.VERDACCIO_REGISTRY = void 0;
19
+ const fs = require("fs");
20
+ const node_fetch_1 = require("node-fetch");
21
+ const path_1 = require("path");
22
+ const readline = require("readline-sync");
23
+ const semver = require("semver");
24
+ const sh = require("shelljs");
25
+ const command_util_1 = require("../../util/command-util");
26
+ const git_util_1 = require("../../util/git-util");
27
+ const logger_1 = require("../../util/logger");
28
+ const validation_util_1 = require("../../util/validation-util");
29
+ exports.VERDACCIO_REGISTRY = 'http://localhost:4873/';
30
+ var Component;
31
+ (function (Component) {
32
+ Component.CLIENT = {
33
+ type: 'client',
34
+ githubRepo: 'eclipse-glsp/glsp-client',
35
+ releaseRepo: 'npm',
36
+ directory: 'glsp-client'
37
+ };
38
+ Component.THEIA_INTEGRATION = {
39
+ type: 'theia-integration',
40
+ githubRepo: 'eclipse-glsp/glsp-theia-integration',
41
+ releaseRepo: 'npm',
42
+ directory: 'glsp-theia-integration'
43
+ };
44
+ Component.VSCODE_INTEGRATION = {
45
+ type: 'vscode-integration',
46
+ githubRepo: 'eclipse-glsp/glsp-vscode-integration',
47
+ releaseRepo: 'npm',
48
+ directory: 'glsp-vscode-integration'
49
+ };
50
+ Component.SERVER_NODE = {
51
+ type: 'server-node',
52
+ githubRepo: 'eclipse-glsp/glsp-server-node',
53
+ releaseRepo: 'npm',
54
+ directory: 'serer-node'
55
+ };
56
+ Component.SERVER_JAVA = {
57
+ type: 'server-java',
58
+ githubRepo: 'eclipse-glsp/glsp-server',
59
+ releaseRepo: 'm2&p2',
60
+ directory: 'glsp-server'
61
+ };
62
+ Component.ECLIPSE_INTEGRATION = {
63
+ type: 'eclipse-integration',
64
+ githubRepo: 'eclipse-glsp/glsp-eclipse-integration',
65
+ releaseRepo: 'm2',
66
+ directory: 'glsp-eclipse-integration'
67
+ };
68
+ Component.ALL = [Component.CLIENT, Component.THEIA_INTEGRATION, Component.VSCODE_INTEGRATION, Component.ECLIPSE_INTEGRATION, Component.SERVER_JAVA, Component.SERVER_NODE];
69
+ Component.CLI_CHOICES = [
70
+ 'client',
71
+ 'theia-integration',
72
+ 'vscode-integration',
73
+ 'eclipse-integration',
74
+ 'server-node',
75
+ 'server-java'
76
+ ];
77
+ function parse(cliChoice) {
78
+ const key = cliChoice.toUpperCase().replace('-', '_');
79
+ const component = Component[key];
80
+ if (!component) {
81
+ throw new Error(`Could not parse component for type: ${cliChoice}`);
82
+ }
83
+ return component;
84
+ }
85
+ Component.parse = parse;
86
+ function is(object) {
87
+ return typeof object === 'object' && typeof object.type === 'string';
88
+ }
89
+ Component.is = is;
90
+ })(Component = exports.Component || (exports.Component = {}));
91
+ var ReleaseType;
92
+ (function (ReleaseType) {
93
+ ReleaseType.CLI_CHOICES = ['major', 'minor', 'patch', 'rc', 'custom'];
94
+ })(ReleaseType = exports.ReleaseType || (exports.ReleaseType = {}));
95
+ function checkoutAndCd(options) {
96
+ const ghUrl = options.component.githubRepo;
97
+ logger_1.LOGGER.info(`Clone repository '${ghUrl}' to directory: ${options.checkoutDir}`);
98
+ sh.cd(options.checkoutDir);
99
+ const directory = ghUrl.substring(ghUrl.lastIndexOf('/') + 1);
100
+ const repoPath = (0, path_1.resolve)(options.checkoutDir, directory);
101
+ if (fs.existsSync((0, path_1.resolve)(options.checkoutDir, directory))) {
102
+ if (options.force) {
103
+ logger_1.LOGGER.debug('A directory with the checkout name already exists.');
104
+ logger_1.LOGGER.debug('Force mode is enabled. The directory will be removed');
105
+ (0, command_util_1.fatalExec)(`rm -rf ${repoPath}`, `Could not remove directory: ${repoPath}`);
106
+ }
107
+ else {
108
+ throw new Error('Directory with the checkout name already exists.');
109
+ }
110
+ }
111
+ sh.exec(`gh repo clone ${ghUrl}`, (0, command_util_1.getShellConfig)());
112
+ logger_1.LOGGER.debug(`Successfully cloned to ${directory}`);
113
+ sh.cd(directory);
114
+ if (options.checkoutDir !== 'master') {
115
+ sh.exec(`git switch ${options.branch} `);
116
+ }
117
+ return sh.pwd();
118
+ }
119
+ exports.checkoutAndCd = checkoutAndCd;
120
+ function commitAndTag(version, repositoryPath) {
121
+ logger_1.LOGGER.info('Commit changes and create new tag');
122
+ sh.cd(repositoryPath);
123
+ logger_1.LOGGER.debug('Check wether the given url is a git repository');
124
+ if (!(0, git_util_1.isGitRepository)(sh.pwd())) {
125
+ throw new Error(`The given path is not a git repository: ${repositoryPath}`);
126
+ }
127
+ const tag = `v${version}`;
128
+ logger_1.LOGGER.debug(`Create tag with label: ${tag}}`);
129
+ sh.exec(`git checkout -b ${tag}`, (0, command_util_1.getShellConfig)());
130
+ sh.exec('git add .', (0, command_util_1.getShellConfig)());
131
+ sh.exec(`git commit -m "${tag}"`, (0, command_util_1.getShellConfig)());
132
+ sh.exec(`git tag ${tag}`, (0, command_util_1.getShellConfig)());
133
+ return tag;
134
+ }
135
+ exports.commitAndTag = commitAndTag;
136
+ function publish(repositoryPath, options) {
137
+ if (!options.publish || options.npmDryRun) {
138
+ logger_1.LOGGER.info('Skip publishing to Github');
139
+ if (options.npmDryRun && options.component.releaseRepo === 'npm') {
140
+ (0, command_util_1.fatalExec)('lerna publish from-git --no-git-reset --no-git-tag-version --no-verify-access --no-push --dist-tag rc --yes', 'Dry-run publish failed', { silent: false });
141
+ }
142
+ return;
143
+ }
144
+ logger_1.LOGGER.info(`Publish new GH release ${options.draft ? '[DRAFT]' : ''}`);
145
+ sh.cd(repositoryPath);
146
+ if (!options.force && (0, git_util_1.hasGitChanges)()) {
147
+ throw new Error('Publish failed. The repository has pending changes');
148
+ }
149
+ const latestReleaseTag = (0, git_util_1.getLatestGithubRelease)();
150
+ const localTag = (0, git_util_1.getLatestTag)();
151
+ validateTag(latestReleaseTag, localTag);
152
+ const preRelease = options.releaseType === 'rc' || localTag.includes('-');
153
+ doPublish(localTag, preRelease, latestReleaseTag, options.draft);
154
+ }
155
+ exports.publish = publish;
156
+ function doPublish(tag, preRelease, latestRelease, draft) {
157
+ (0, command_util_1.fatalExec)(`git push origin HEAD:${tag}`, 'Could not push release branch to Github', (0, command_util_1.getShellConfig)({ silent: false }));
158
+ (0, command_util_1.fatalExec)(`git push origin tag ${tag}`, 'Could not push tag to Github', (0, command_util_1.getShellConfig)({ silent: false }));
159
+ const version = tagToVersion(tag);
160
+ const titleSuffix = preRelease ? ` Candiate ${version.substring(version.length - 1)}` : '';
161
+ const title = `${version.replace(/-.*/, '')} Release${titleSuffix} `;
162
+ sh.exec(`gh release create ${tag} -t "${title}" --notes-start-tag ${latestRelease} --generate-notes ${draft ? '-d' : ''} ${preRelease ? '-p' : ''}`, (0, command_util_1.getShellConfig)());
163
+ }
164
+ function validateTag(currentReleaseTag, newTag) {
165
+ const releaseVersion = tagToVersion(currentReleaseTag);
166
+ const newVersion = tagToVersion(newTag);
167
+ if (!semver.satisfies(newVersion, `>${releaseVersion}`, { includePrerelease: true })) {
168
+ throw new Error(`Tag version is lower than the current release: ${newTag} `);
169
+ }
170
+ }
171
+ function tagToVersion(tag) {
172
+ if (!tag.startsWith('v')) {
173
+ throw new Error(`Invalid format. The release tag should start with 'v': ${tag}`);
174
+ }
175
+ const version = tag.substring(1).replace('.RC', '-RC');
176
+ return (0, validation_util_1.validateVersion)(version);
177
+ }
178
+ function lernaSetVersion(repositoryPath, version) {
179
+ logger_1.LOGGER.info(`Bump version in ${repositoryPath} to: ${version}`);
180
+ sh.cd(repositoryPath);
181
+ (0, command_util_1.fatalExec)(`lerna version --exact ${version} --ignore-scripts --yes --no-push --no-git-tag-version`, 'Lerna version bump failed!', {
182
+ silent: false
183
+ });
184
+ logger_1.LOGGER.debug('Update root package.json version');
185
+ sh.exec(`jq '.version="${version}"' package.json > temp.json`, (0, command_util_1.getShellConfig)());
186
+ sh.exec('mv temp.json package.json ', (0, command_util_1.getShellConfig)());
187
+ }
188
+ exports.lernaSetVersion = lernaSetVersion;
189
+ function yarnInstall(repositoryPath) {
190
+ logger_1.LOGGER.debug(`Build ${repositoryPath}`);
191
+ sh.cd(repositoryPath);
192
+ (0, command_util_1.fatalExec)('yarn', 'Yarn build failed', (0, command_util_1.getShellConfig)({ silent: false }));
193
+ }
194
+ exports.yarnInstall = yarnInstall;
195
+ function upgradeCommand(pckName, version) {
196
+ logger_1.LOGGER.debug(`Upgrade '${pckName}' to version ${version}`);
197
+ return `lernaupdate --non-interactive --dependency ${pckName}@${version}`;
198
+ }
199
+ exports.upgradeCommand = upgradeCommand;
200
+ function updateVersion(...packages) {
201
+ packages.forEach(pckg => {
202
+ const result = sh.exec(upgradeCommand(pckg.name, pckg.version), (0, command_util_1.getShellConfig)({ silent: false })).stdout.trim();
203
+ if (result.includes('An error occurred:')) {
204
+ const errorMsg = result.substring(result.lastIndexOf('An error occurred:')).trim();
205
+ throw new Error(errorMsg);
206
+ }
207
+ });
208
+ }
209
+ exports.updateVersion = updateVersion;
210
+ function updateServerConfig(configFile, version, isSnapShot) {
211
+ logger_1.LOGGER.info('Update example server download config');
212
+ sh.exec(`jq '.isSnapShot=${isSnapShot}| .version="${version}"' ${configFile} > temp.json`, (0, command_util_1.getShellConfig)());
213
+ sh.exec(`mv temp.json ${configFile}`, (0, command_util_1.getShellConfig)());
214
+ }
215
+ exports.updateServerConfig = updateServerConfig;
216
+ function asMvnVersion(version) {
217
+ logger_1.LOGGER.debug(`Convert to maven conform version: ${version}`);
218
+ const mavenVersion = version.replace('-', '.');
219
+ logger_1.LOGGER.debug(`Maven version :${mavenVersion}`);
220
+ return mavenVersion;
221
+ }
222
+ exports.asMvnVersion = asMvnVersion;
223
+ async function checkIfNpmVersionExists(pckgName, newVersion) {
224
+ logger_1.LOGGER.debug(`Check if version exists on npm: ${newVersion}`);
225
+ const response = await (0, node_fetch_1.default)(`https://registry.npmjs.org/${pckgName}/${newVersion}`);
226
+ const data = await response.json();
227
+ if (typeof data === 'string' && data.includes('version not found:')) {
228
+ logger_1.LOGGER.debug(`Version '${newVersion}' does not exist on NPM. Continue with release`);
229
+ return;
230
+ }
231
+ throw new Error(`Version '${newVersion} is already present on NPM!}`);
232
+ }
233
+ exports.checkIfNpmVersionExists = checkIfNpmVersionExists;
234
+ function checkIfMavenVersionExists(groupId, artifactId, newVersion) {
235
+ logger_1.LOGGER.debug('Check if maven version exists');
236
+ if (isExistingMavenVersion(groupId, artifactId, newVersion)) {
237
+ throw new Error(`Version '${newVersion} is already present on maven central!}`);
238
+ }
239
+ logger_1.LOGGER.debug(`Version '${newVersion}' does not exist on maven central. Continue with release`);
240
+ }
241
+ exports.checkIfMavenVersionExists = checkIfMavenVersionExists;
242
+ function isExistingMavenVersion(groupId, artifactId, version) {
243
+ const versions = sh
244
+ .exec(`wget -q -O - https://repo1.maven.org/maven2/${groupId.replace(/\./g, '/')}/${artifactId}/maven-metadata.xml`, (0, command_util_1.getShellConfig)())
245
+ .exec("grep -P '<version>\\K[^<]*'", (0, command_util_1.getShellConfig)())
246
+ .stdout.replace(/<\/?version>/g, '')
247
+ .split('\n')
248
+ .map(versionString => versionString.trim());
249
+ logger_1.LOGGER.debug(`${versions.length} released versions found:`, versions);
250
+ return versions.includes(version);
251
+ }
252
+ exports.isExistingMavenVersion = isExistingMavenVersion;
253
+ function checkJavaServerVersion(version, force = false) {
254
+ const mvnVersion = asMvnVersion(version);
255
+ if (!isExistingMavenVersion('org.eclipse.glsp', 'org.eclipse.glsp.server', mvnVersion)) {
256
+ // eslint-disable-next-line max-len
257
+ const errorMsg = `No Java GLSP server with version ${mvnVersion} found on maven central!. Please release a new Java GLSP Server version before publishing this release!`;
258
+ logger_1.LOGGER.warn(errorMsg);
259
+ if (force || readline.keyInYN('No Java GLSP server with corresponding version found. Do you want to continue anyways?')) {
260
+ return;
261
+ }
262
+ throw new Error(errorMsg);
263
+ }
264
+ }
265
+ exports.checkJavaServerVersion = checkJavaServerVersion;
266
+ function updateLernaForDryRun() {
267
+ logger_1.LOGGER.debug('Update lerna.json to use local publish registry');
268
+ sh.exec(`jq '.command.publish.registry="${exports.VERDACCIO_REGISTRY}"' lerna.json > temp.json`, (0, command_util_1.getShellConfig)());
269
+ sh.exec('mv temp.json lerna.json', (0, command_util_1.getShellConfig)());
270
+ sh.exec(`npm set registry ${exports.VERDACCIO_REGISTRY}`);
271
+ }
272
+ exports.updateLernaForDryRun = updateLernaForDryRun;
273
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/commands/release/common.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,yBAAyB;AACzB,2CAA+B;AAC/B,+BAA+B;AAC/B,0CAA0C;AAC1C,iCAAiC;AACjC,8BAA8B;AAC9B,0DAAoE;AACpE,kDAA2G;AAC3G,8CAA2C;AAC3C,gEAA6D;AAEhD,QAAA,kBAAkB,GAAG,wBAAwB,CAAC;AAuB3D,IAAiB,SAAS,CA4DzB;AA5DD,WAAiB,SAAS;IACT,gBAAM,GAAc;QAC7B,IAAI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AC,IAAI,CAAC;SACX,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IAChD,eAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,MAAM,2BAA2B,EAAE,QAAQ,CAAC,CAAC;IACtE,OAAO,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC;AAZD,wDAYC;AAED,SAAgB,sBAAsB,CAAC,OAAe,EAAE,KAAK,GAAG,KAAK;IACjE,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACzC,IAAI,CAAC,sBAAsB,CAAC,kBAAkB,EAAE,yBAAyB,EAAE,UAAU,CAAC,EAAE;QACpF,mCAAmC;QACnC,MAAM,QAAQ,GAAG,oCAAoC,UAAU,yGAAyG,CAAC;QACzK,eAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACtB,IAAI,KAAK,IAAI,QAAQ,CAAC,OAAO,CAAC,wFAAwF,CAAC,EAAE;YACrH,OAAO;SACV;QACD,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC;KAC7B;AACL,CAAC;AAXD,wDAWC;AAED,SAAgB,oBAAoB;IAChC,eAAM,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;IAChE,EAAE,CAAC,IAAI,CAAC,kCAAkC,0BAAkB,2BAA2B,EAAE,IAAA,6BAAc,GAAE,CAAC,CAAC;IAC3G,EAAE,CAAC,IAAI,CAAC,yBAAyB,EAAE,IAAA,6BAAc,GAAE,CAAC,CAAC;IACrD,EAAE,CAAC,IAAI,CAAC,oBAAoB,0BAAkB,EAAE,CAAC,CAAC;AACtD,CAAC;AALD,oDAKC"}
@@ -0,0 +1,3 @@
1
+ import { ReleaseOptions } from './common';
2
+ export declare function releaseClient(options: ReleaseOptions): Promise<void>;
3
+ //# sourceMappingURL=release-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-client.d.ts","sourceRoot":"","sources":["../../../src/commands/release/release-client.ts"],"names":[],"mappings":"AAiBA,OAAO,EAOH,cAAc,EAIjB,MAAM,UAAU,CAAC;AAIlB,wBAAsB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAa1E"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.releaseClient = void 0;
4
+ /********************************************************************************
5
+ * Copyright (c) 2022 EclipseSource and others.
6
+ *
7
+ * This program and the accompanying materials are made available under the
8
+ * terms of the Eclipse Public License v. 2.0 which is available at
9
+ * http://www.eclipse.org/legal/epl-2.0.
10
+ *
11
+ * This Source Code may also be made available under the following Secondary
12
+ * Licenses when the conditions for such availability set forth in the Eclipse
13
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
14
+ * with the GNU Classpath Exception which is available at
15
+ * https://www.gnu.org/software/classpath/license.html.
16
+ *
17
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
18
+ ********************************************************************************/
19
+ const sh = require("shelljs");
20
+ const logger_1 = require("../../util/logger");
21
+ const common_1 = require("./common");
22
+ let REPO_ROOT;
23
+ async function releaseClient(options) {
24
+ logger_1.LOGGER.info('Prepare glsp-client release');
25
+ logger_1.LOGGER.debug('Release options: ', options.version);
26
+ REPO_ROOT = (0, common_1.checkoutAndCd)(options);
27
+ await updateDownloadServerScript(options.version, options.force);
28
+ generateChangeLog();
29
+ (0, common_1.lernaSetVersion)(REPO_ROOT, options.version);
30
+ build();
31
+ if (options.npmDryRun) {
32
+ (0, common_1.updateLernaForDryRun)();
33
+ }
34
+ (0, common_1.commitAndTag)(options.version, REPO_ROOT);
35
+ (0, common_1.publish)(REPO_ROOT, options);
36
+ }
37
+ exports.releaseClient = releaseClient;
38
+ async function updateDownloadServerScript(version, force) {
39
+ logger_1.LOGGER.info('Update example server download config');
40
+ const mvnVersion = (0, common_1.asMvnVersion)(version);
41
+ (0, common_1.checkJavaServerVersion)(version, force);
42
+ sh.cd(`${REPO_ROOT}/examples/workflow-glsp/scripts`);
43
+ (0, common_1.updateServerConfig)('config.json', mvnVersion, false);
44
+ }
45
+ function generateChangeLog() {
46
+ // do nothing for now
47
+ }
48
+ function build() {
49
+ logger_1.LOGGER.info('Install & Build with yarn');
50
+ (0, common_1.yarnInstall)(REPO_ROOT);
51
+ logger_1.LOGGER.debug('Build successful');
52
+ }
53
+ //# sourceMappingURL=release-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-client.js","sourceRoot":"","sources":["../../../src/commands/release/release-client.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,8BAA8B;AAC9B,8CAA2C;AAC3C,qCAWkB;AAElB,IAAI,SAAiB,CAAC;AAEf,KAAK,UAAU,aAAa,CAAC,OAAuB;IACvD,eAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;IAC3C,eAAM,CAAC,KAAK,CAAC,mBAAmB,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACnD,SAAS,GAAG,IAAA,sBAAa,EAAC,OAAO,CAAC,CAAC;IACnC,MAAM,0BAA0B,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACjE,iBAAiB,EAAE,CAAC;IACpB,IAAA,wBAAe,EAAC,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5C,KAAK,EAAE,CAAC;IACR,IAAI,OAAO,CAAC,SAAS,EAAE;QACnB,IAAA,6BAAoB,GAAE,CAAC;KAC1B;IACD,IAAA,qBAAY,EAAC,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACzC,IAAA,gBAAO,EAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAChC,CAAC;AAbD,sCAaC;AAED,KAAK,UAAU,0BAA0B,CAAC,OAAe,EAAE,KAAc;IACrE,eAAM,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG,IAAA,qBAAY,EAAC,OAAO,CAAC,CAAC;IACzC,IAAA,+BAAsB,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACvC,EAAE,CAAC,EAAE,CAAC,GAAG,SAAS,iCAAiC,CAAC,CAAC;IACrD,IAAA,2BAAkB,EAAC,aAAa,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,iBAAiB;IACtB,qBAAqB;AACzB,CAAC;AAED,SAAS,KAAK;IACV,eAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IACzC,IAAA,oBAAW,EAAC,SAAS,CAAC,CAAC;IACvB,eAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;AACrC,CAAC"}
@@ -0,0 +1,18 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2022 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { ReleaseOptions } from './common';
17
+ export declare function releaseEclipseIntegration(options: ReleaseOptions): Promise<void>;
18
+ //# sourceMappingURL=release-eclipse-integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-eclipse-integration.d.ts","sourceRoot":"","sources":["../../../src/commands/release/release-eclipse-integration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAKlF,OAAO,EAOH,cAAc,EAKjB,MAAM,UAAU,CAAC;AAIlB,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAYtF"}
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2022 EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the Eclipse Public License v. 2.0 which is available at
7
+ * http://www.eclipse.org/legal/epl-2.0.
8
+ *
9
+ * This Source Code may also be made available under the following Secondary
10
+ * Licenses when the conditions for such availability set forth in the Eclipse
11
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ * with the GNU Classpath Exception which is available at
13
+ * https://www.gnu.org/software/classpath/license.html.
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ ********************************************************************************/
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.releaseEclipseIntegration = void 0;
19
+ const sh = require("shelljs");
20
+ const command_util_1 = require("../../util/command-util");
21
+ const logger_1 = require("../../util/logger");
22
+ const common_1 = require("./common");
23
+ let REPO_ROOT;
24
+ async function releaseEclipseIntegration(options) {
25
+ logger_1.LOGGER.info('Prepare glsp-eclipse-integration release');
26
+ logger_1.LOGGER.debug('Release options: ', options);
27
+ (0, common_1.checkJavaServerVersion)(options.version);
28
+ REPO_ROOT = (0, common_1.checkoutAndCd)(options);
29
+ prepareClient(options);
30
+ prepareServer(options);
31
+ generateChangeLog();
32
+ (0, common_1.commitAndTag)((0, common_1.asMvnVersion)(options.version), REPO_ROOT);
33
+ (0, common_1.publish)(REPO_ROOT, options);
34
+ logger_1.LOGGER.info('glsp-eclipse-integration release successful!');
35
+ }
36
+ exports.releaseEclipseIntegration = releaseEclipseIntegration;
37
+ function prepareClient(options) {
38
+ logger_1.LOGGER.info('Prepare client');
39
+ updateExternalGLSPDependencies(options.version);
40
+ (0, common_1.lernaSetVersion)(`${REPO_ROOT}/client`, options.version);
41
+ buildClient();
42
+ if (options.npmDryRun) {
43
+ (0, common_1.updateLernaForDryRun)();
44
+ }
45
+ }
46
+ function updateExternalGLSPDependencies(version) {
47
+ logger_1.LOGGER.info('Update external GLSP dependencies (Client and workflow example)');
48
+ sh.cd(`${REPO_ROOT}/client`);
49
+ (0, common_1.updateVersion)({ name: '@eclipse-glsp/client', version }, { name: '@eclipse-glsp-examples/workflow-glsp', version });
50
+ }
51
+ function buildClient() {
52
+ logger_1.LOGGER.info('[Client] Install & Build with yarn');
53
+ (0, common_1.yarnInstall)(`${REPO_ROOT}/client`);
54
+ logger_1.LOGGER.debug('Build successful');
55
+ }
56
+ function generateChangeLog() {
57
+ // do nothing for now
58
+ }
59
+ function prepareServer(options) {
60
+ const mvnVersion = (0, common_1.asMvnVersion)(options.version);
61
+ setServerVersion(mvnVersion);
62
+ updateTarget(mvnVersion, options.releaseType);
63
+ buildServer();
64
+ }
65
+ function setServerVersion(version) {
66
+ logger_1.LOGGER.info(`Set pom version to ${version}`);
67
+ sh.cd(`${REPO_ROOT}/server`);
68
+ // Execute tycho-versions plugin
69
+ (0, command_util_1.fatalExec)(`mvn tycho-versions:set-version -DnewVersion=${version}`, 'Mvn set-versions failed', (0, command_util_1.getShellConfig)({ silent: false }));
70
+ logger_1.LOGGER.debug('Version update complete!');
71
+ }
72
+ function buildServer() {
73
+ sh.cd(`${REPO_ROOT}/server`);
74
+ logger_1.LOGGER.info('Build Server(P2)');
75
+ (0, command_util_1.fatalExec)('mvn clean install', 'P2 build failed', (0, command_util_1.getShellConfig)({ silent: false }));
76
+ }
77
+ function updateTarget(mvnVersion, releaseType) {
78
+ const p2SubLocation = releaseType === 'rc' ? 'staging' : 'releases';
79
+ const p2Location = `https://download.eclipse.org/glsp/server/p2/${p2SubLocation}/${mvnVersion}/`;
80
+ logger_1.LOGGER.info(`Update glsp server p2 repository to ${p2Location}`);
81
+ sh.cd(`${REPO_ROOT}/server/releng/org.eclipse.glsp.ide.releng.target`);
82
+ logger_1.LOGGER.debug('Update r2021-03.tpd file');
83
+ sh.exec(`sed -i 's_location "https://download.eclipse.org/glsp/server/p2/.*"_location "${p2Location}"_' r2021-03.tpd`, (0, command_util_1.getShellConfig)());
84
+ logger_1.LOGGER.debug('Update r2021-03.target file');
85
+ sh.exec(
86
+ // eslint-disable-next-line max-len
87
+ `sed -i 's_ <repository location="https://download.eclipse.org/glsp/server/p2/.*"_ <repository location="${p2Location}"_g' r2021-03.target`, (0, command_util_1.getShellConfig)());
88
+ logger_1.LOGGER.debug('Target update successful');
89
+ }
90
+ //# sourceMappingURL=release-eclipse-integration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-eclipse-integration.js","sourceRoot":"","sources":["../../../src/commands/release/release-eclipse-integration.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,8BAA8B;AAC9B,0DAAoE;AACpE,8CAA2C;AAC3C,qCAYkB;AAElB,IAAI,SAAiB,CAAC;AAEf,KAAK,UAAU,yBAAyB,CAAC,OAAuB;IACnE,eAAM,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;IACxD,eAAM,CAAC,KAAK,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IAC3C,IAAA,+BAAsB,EAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAExC,SAAS,GAAG,IAAA,sBAAa,EAAC,OAAO,CAAC,CAAC;IACnC,aAAa,CAAC,OAAO,CAAC,CAAC;IACvB,aAAa,CAAC,OAAO,CAAC,CAAC;IACvB,iBAAiB,EAAE,CAAC;IACpB,IAAA,qBAAY,EAAC,IAAA,qBAAY,EAAC,OAAO,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC;IACvD,IAAA,gBAAO,EAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC5B,eAAM,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;AAChE,CAAC;AAZD,8DAYC;AAED,SAAS,aAAa,CAAC,OAAuB;IAC1C,eAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC9B,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IAAA,6BAAc,EAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAClI,eAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,WAAW;IAChB,EAAE,CAAC,EAAE,CAAC,GAAG,SAAS,SAAS,CAAC,CAAC;IAC7B,eAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAChC,IAAA,wBAAS,EAAC,mBAAmB,EAAE,iBAAiB,EAAE,IAAA,6BAAc,EAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AACzF,CAAC;AACD,SAAS,YAAY,CAAC,UAAkB,EAAE,WAAwB;IAC9D,MAAM,aAAa,GAAG,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC;IACpE,MAAM,UAAU,GAAG,+CAA+C,aAAa,IAAI,UAAU,GAAG,CAAC;IACjG,eAAM,CAAC,IAAI,CAAC,uCAAuC,UAAU,EAAE,CAAC,CAAC;IACjE,EAAE,CAAC,EAAE,CAAC,GAAG,SAAS,mDAAmD,CAAC,CAAC;IACvE,eAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;IACzC,EAAE,CAAC,IAAI,CACH,iFAAiF,UAAU,kBAAkB,EAC7G,IAAA,6BAAc,GAAE,CACnB,CAAC;IACF,eAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;IAC5C,EAAE,CAAC,IAAI;IACH,mCAAmC;IACnC,qHAAqH,UAAU,sBAAsB,EACrJ,IAAA,6BAAc,GAAE,CACnB,CAAC;IACF,eAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;AAC7C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ReleaseOptions } from './common';
2
+ export declare function releaseJavaServer(options: ReleaseOptions): Promise<void>;
3
+ //# sourceMappingURL=release-java-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-java-server.d.ts","sourceRoot":"","sources":["../../../src/commands/release/release-java-server.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAsD,cAAc,EAAE,MAAM,UAAU,CAAC;AAI9F,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAY9E"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.releaseJavaServer = void 0;
4
+ /********************************************************************************
5
+ * Copyright (c) 2022 EclipseSource and others.
6
+ *
7
+ * This program and the accompanying materials are made available under the
8
+ * terms of the Eclipse Public License v. 2.0 which is available at
9
+ * http://www.eclipse.org/legal/epl-2.0.
10
+ *
11
+ * This Source Code may also be made available under the following Secondary
12
+ * Licenses when the conditions for such availability set forth in the Eclipse
13
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
14
+ * with the GNU Classpath Exception which is available at
15
+ * https://www.gnu.org/software/classpath/license.html.
16
+ *
17
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
18
+ ********************************************************************************/
19
+ const sh = require("shelljs");
20
+ const command_util_1 = require("../../util/command-util");
21
+ const logger_1 = require("../../util/logger");
22
+ const common_1 = require("./common");
23
+ let REPO_ROOT;
24
+ async function releaseJavaServer(options) {
25
+ logger_1.LOGGER.info('Prepare glsp-server release');
26
+ logger_1.LOGGER.debug('Release options: ', options);
27
+ const mvnVersion = (0, common_1.asMvnVersion)(options.version);
28
+ REPO_ROOT = (0, common_1.checkoutAndCd)(options);
29
+ sh.find();
30
+ setVersion(mvnVersion);
31
+ build();
32
+ generateChangeLog();
33
+ (0, common_1.commitAndTag)(mvnVersion, REPO_ROOT);
34
+ (0, common_1.publish)(REPO_ROOT, options);
35
+ logger_1.LOGGER.info('glsp-server release successful!');
36
+ }
37
+ exports.releaseJavaServer = releaseJavaServer;
38
+ function setVersion(version) {
39
+ logger_1.LOGGER.info(`Set pom version to ${version}`);
40
+ sh.cd(REPO_ROOT);
41
+ logger_1.LOGGER.debug('Preprocessing eclipse-plugins poms');
42
+ // Capture all poms with a `${package.type}` property
43
+ const pluginPoms = sh
44
+ .exec('grep -ril --include pom.xml \\${package-type}', (0, command_util_1.getShellConfig)()) //
45
+ .stdout.trim()
46
+ .split('\n')
47
+ .map(file => `${REPO_ROOT}/${file}`);
48
+ // Replace `${package.type}` property with `eclipse-plugin`
49
+ sh.sed('-i', /\${package-type}/, 'eclipse-plugin', pluginPoms);
50
+ logger_1.LOGGER.debug('Preprocessing complete');
51
+ // Execute tycho-versions plugin
52
+ (0, command_util_1.fatalExec)(`mvn tycho-versions:set-version -DnewVersion=${version}`, 'Mvn set-versions failed', (0, command_util_1.getShellConfig)({ silent: false }));
53
+ logger_1.LOGGER.debug('Restore eclipse-plugin poms');
54
+ sh.sed('-i', /<packaging>eclipse-plugin/, '<packaging>${package-type}', pluginPoms);
55
+ logger_1.LOGGER.debug('Version update complete!');
56
+ }
57
+ function generateChangeLog() {
58
+ // do nothing for now
59
+ }
60
+ function build() {
61
+ logger_1.LOGGER.info('Build M2 & P2');
62
+ logger_1.LOGGER.debug('M2');
63
+ (0, command_util_1.fatalExec)('mvn clean install -Pm2', 'M2 build failed', (0, command_util_1.getShellConfig)({ silent: false }));
64
+ logger_1.LOGGER.newLine();
65
+ logger_1.LOGGER.debug('P2');
66
+ (0, command_util_1.fatalExec)('mvn clean install -Pp2', 'P2 build failed', (0, command_util_1.getShellConfig)({ silent: false }));
67
+ }
68
+ //# sourceMappingURL=release-java-server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-java-server.js","sourceRoot":"","sources":["../../../src/commands/release/release-java-server.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,8BAA8B;AAC9B,0DAAoE;AACpE,8CAA2C;AAC3C,qCAA8F;AAE9F,IAAI,SAAiB,CAAC;AAEf,KAAK,UAAU,iBAAiB,CAAC,OAAuB;IAC3D,eA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,IAAA,6BAAc,EAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAElI,eAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;IAC5C,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,UAAU,CAAC,CAAC;IAEpF,eAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,iBAAiB;IACtB,qBAAqB;AACzB,CAAC;AAED,SAAS,KAAK;IACV,eAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC7B,eAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,IAAA,wBAAS,EAAC,wBAAwB,EAAE,iBAAiB,EAAE,IAAA,6BAAc,EAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC1F,eAAM,CAAC,OAAO,EAAE,CAAC;IACjB,eAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,IAAA,wBAAS,EAAC,wBAAwB,EAAE,iBAAiB,EAAE,IAAA,6BAAc,EAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AAC9F,CAAC"}
@@ -0,0 +1,18 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2022 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { ReleaseOptions } from './common';
17
+ export declare function releaseServerNode(options: ReleaseOptions): Promise<void>;
18
+ //# sourceMappingURL=release-server-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-server-node.d.ts","sourceRoot":"","sources":["../../../src/commands/release/release-server-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAIlF,OAAO,EAKH,cAAc,EAIjB,MAAM,UAAU,CAAC;AAIlB,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAa9E"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2022 EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the Eclipse Public License v. 2.0 which is available at
7
+ * http://www.eclipse.org/legal/epl-2.0.
8
+ *
9
+ * This Source Code may also be made available under the following Secondary
10
+ * Licenses when the conditions for such availability set forth in the Eclipse
11
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ * with the GNU Classpath Exception which is available at
13
+ * https://www.gnu.org/software/classpath/license.html.
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ ********************************************************************************/
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.releaseServerNode = void 0;
19
+ const sh = require("shelljs");
20
+ const logger_1 = require("../../util/logger");
21
+ const common_1 = require("./common");
22
+ let REPO_ROOT;
23
+ async function releaseServerNode(options) {
24
+ logger_1.LOGGER.info('Prepare glsp-server-node release');
25
+ logger_1.LOGGER.debug('Release options: ', options);
26
+ REPO_ROOT = (0, common_1.checkoutAndCd)(options);
27
+ updateExternalGLSPDependencies(options.version);
28
+ generateChangeLog();
29
+ (0, common_1.lernaSetVersion)(REPO_ROOT, options.version);
30
+ build();
31
+ if (options.npmDryRun) {
32
+ (0, common_1.updateLernaForDryRun)();
33
+ }
34
+ (0, common_1.commitAndTag)(options.version, REPO_ROOT);
35
+ (0, common_1.publish)(REPO_ROOT, options);
36
+ }
37
+ exports.releaseServerNode = releaseServerNode;
38
+ function updateExternalGLSPDependencies(version) {
39
+ logger_1.LOGGER.info('Update external GLSP dependencies (Protocol)');
40
+ sh.cd(REPO_ROOT);
41
+ (0, common_1.updateVersion)({ name: '@eclipse-glsp/protocol', version });
42
+ }
43
+ function build() {
44
+ logger_1.LOGGER.info('Install & Build with yarn');
45
+ (0, common_1.yarnInstall)(REPO_ROOT);
46
+ logger_1.LOGGER.debug('Build successful');
47
+ }
48
+ function generateChangeLog() {
49
+ // do nothing for now
50
+ }
51
+ //# sourceMappingURL=release-server-node.js.map