akeneo-design-system 0.1.230 → 0.1.231

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,15 +4,8 @@
4
4
  const {execSync} = require('child_process');
5
5
  const fs = require('fs');
6
6
 
7
- const filePath = process.argv[2];
8
- const externalPackageJson = process.argv[3];
9
- const commitMessagesFilepath = process.argv[4];
10
-
11
- if (typeof filePath === 'undefined') {
12
- console.log(`usage: ${process.argv[0]} ${process.argv[1]} path_to_webhook_event.json external/package.json commit-messages.txt`);
13
-
14
- return;
15
- }
7
+ const externalPackageJson = process.argv[2];
8
+ const commitMessagesFilepath = process.argv[3];
16
9
 
17
10
  // Let's define an enum for our bump levels
18
11
  const BumpLevelEnum = {
@@ -43,12 +36,9 @@ const getBumpNameFromBumpLevel = (bumpLevel) => {
43
36
  }
44
37
  }
45
38
 
46
- const rawdata = fs.readFileSync(filePath);
47
- const githubEvent = JSON.parse(rawdata);
48
-
49
- const lastCommits = (new String(execSync(`git rev-list ${githubEvent.before}..HEAD`))).split('\n');
39
+ const lastCommits = (new String(execSync(`git rev-list ${process.env.BUMP_BASE_REVISION || 'master'}..HEAD`))).split('\n');
50
40
  const messages = lastCommits.map(commit => new String(execSync(`git log -n 1 --pretty=format:%s ${commit}`)));
51
- fs.writeFileSync(commitMessagesFilepath, `Extract from https://github.com/${githubEvent.repository.full_name}/commit/${githubEvent.after}\nWith commits:\n${messages.join('\n')}`);
41
+ fs.writeFileSync(commitMessagesFilepath, `Extract from ${process.env.BUMP_REVISION}\nWith commits:\n${messages.join('\n')}`);
52
42
 
53
43
  const levelToBump = messages.reduce((currentBumpLevel, commit) => {
54
44
  const bumpLevel = getCommitMessageBumpLevel(commit);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akeneo-design-system",
3
- "version": "0.1.230",
3
+ "version": "0.1.231",
4
4
  "description": "Akeneo design system",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {