convert-csv-to-json 2.20.0 → 2.22.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "convert-csv-to-json",
3
- "version": "2.20.0",
3
+ "version": "2.22.0",
4
4
  "description": "Convert CSV to JSON",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,43 +15,33 @@ fi
15
15
  }
16
16
 
17
17
  npm_release(){
18
- PATCH_MSG="[PATCH]";
19
- MAJOR_MSG="[MAJOR]";
20
- echo "Parsing git message...";
21
- COMMIT_MSG=$(git log -1 --pretty=format:"%s");
22
- echo "Last commit message: ${COMMIT_MSG}";
23
- if [[ $COMMIT_MSG == *"$PATCH_MSG"* ]]; then
24
- echo "Executing new PATCH release..."
25
- npm version patch --force;
26
- elif [[ $COMMIT_MSG == *"$MAJOR_MSG"* ]]; then
27
- echo "Executing new MAJOR release..."
28
- npm version major --force;
29
- else
30
- echo "Executing new MINOR release...";
31
- npm version minor --force;
32
- fi
33
- echo "Publish new version..."
34
- npm publish;
35
- echo "New version successfully published."
36
- }
37
-
38
- push_git_info(){
18
+ COMMIT_MSG="new release [skip ci]"
19
+ PATCH_MSG="[PATCH]";
20
+ MAJOR_MSG="[MAJOR]";
21
+ echo "Parsing git message...";
22
+ COMMIT_MSG=$(git log -1 --pretty=format:"%s");
23
+ echo "Last commit message: ${COMMIT_MSG}";
24
+ if [[ $COMMIT_MSG == *"$PATCH_MSG"* ]]; then
25
+ echo "Executing new PATCH release..."
26
+ npm version patch --force -m "$COMMIT_MSG";
27
+ elif [[ $COMMIT_MSG == *"$MAJOR_MSG"* ]]; then
28
+ echo "Executing new MAJOR release..."
29
+ npm version major --force -m "$COMMIT_MSG";
30
+ else
31
+ echo "Executing new MINOR release...";
32
+ npm version minor --force -m "$COMMIT_MSG";
33
+ fi
34
+ echo "Publish new version..."
35
+ npm publish;
39
36
  echo "Publish git info...";
40
- TAG=$(git describe --tags --abbrev=0);
41
- COMMIT_ID=$(git rev-parse HEAD);
42
- git commit --amend -m "new release $TAG [skip ci]";
43
- echo "new commit message: $(git log -1 --pretty=format:"%s")";
44
- git tag -d $TAG # delete the old tag locally
45
- git tag $TAG $COMMIT_ID;
46
- git push;
47
- git push origin refs/tags/$TAG;
37
+ git push --follow-tags
38
+ echo "New version successfully published."
48
39
  }
49
40
 
50
41
  execute-new-release(){
51
42
  echo "Start Semantic Versioning release...";
52
43
  validate_is_master_branch;
53
44
  npm_release;
54
- push_git_info;
55
45
  echo "End Semantic Versioning release.";
56
46
  }
57
47