Skip to content

Commit 36f6b2d

Browse files
Vikram KaltaVikram Kalta
authored andcommitted
fix: resolved conflicts and bumped version
2 parents 9119856 + b4ae351 commit 36f6b2d

File tree

4 files changed

+80
-101
lines changed

4 files changed

+80
-101
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,54 @@ jobs:
1414
node-version: "18.x"
1515
- run: npm install
1616

17-
- name: get-npm-version
18-
id: package-version
19-
uses: martinbeentjes/[email protected]
2017
- name: install npm packall
2118
run: npm install npm-pack-all
2219

2320
- run: node node_modules/.bin/npm-pack-all
24-
- uses: Klemensas/action-autotag@stable
25-
id: update_tag
21+
# The below action will see the existing tags and will bump the current ones and this is only used to check whether the given tag already exists or not
22+
# We will be using the previous tag to compare with the current tag in the package.json
23+
# If both match then no new release would be triggered
24+
# Else New release will be created
25+
- name: Bump version and push tag
26+
id: tag_version
27+
uses: mathieudutour/[email protected]
2628
with:
27-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
28-
tag_prefix: "v"
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
default_bump: false
31+
# Getting the version info from package.json
32+
- name: get-npm-version
33+
id: package-version
34+
uses: martinbeentjes/[email protected]
35+
# Here we are checking whether this is the first release or not and then checking if it is release or not
36+
- name: check-first-release
37+
env:
38+
First_Release: ${{steps.tag_version.outputs.previous_tag=='v0.0.0'}}
39+
run: |
40+
if ${First_Release} == true; then
41+
echo "fr=true" >> $GITHUB_ENV
42+
echo "flag set to true"
43+
else
44+
echo "fr=false" >> $GITHUB_ENV
45+
echo "flag set to false"
46+
fi
47+
- name: check-release-version
48+
if: ${{env.fr=='false'}}
49+
env:
50+
old_version: ${{steps.tag_version.outputs.previous_tag}}
51+
new_version: v${{steps.package-version.outputs.current-version}}
52+
run: |
53+
echo ${old_version}
54+
echo ${new_version}
55+
echo ${{env.old_version==env.new_version}}
56+
if ${{env.old_version!=env.new_version}}; then
57+
echo "fr=true" >> $GITHUB_ENV
58+
echo "flag set to true"
59+
else
60+
echo "fr=false" >> $GITHUB_ENV
61+
echo "flag set to false"
62+
fi
2963
- name: github-release
30-
if: steps.update_tag.outputs.tagname
64+
if: ${{env.fr=='true'}}
3165
id: github-release
3266
env:
3367
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

oclif.manifest.json

Lines changed: 0 additions & 61 deletions
This file was deleted.

package-lock.json

Lines changed: 29 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@contentstack/cli-cm-regex-validate",
33
"description": "Validate Fields with Regex Property of Content Type and Global Field in a Stack",
4-
"version": "1.1.8",
4+
"version": "1.1.11",
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli-cm-regex-validate/issues",
77
"devDependencies": {
@@ -61,16 +61,21 @@
6161
"version": "oclif-dev readme && git add README.md"
6262
},
6363
"dependencies": {
64-
"@contentstack/cli-command": "^1.2.10",
64+
"@contentstack/cli-command": "^1.2.11",
6565
"@contentstack/cli-utilities": "^1.5.0",
66-
"@contentstack/management": "^1.10.1",
66+
"@contentstack/management": "^1.10.2",
6767
"cli-table3": "^0.6.0",
6868
"cli-ux": "^6.0.9",
6969
"inquirer": "^8.2.4",
7070
"jest": "^29.7.0",
7171
"jsonexport": "^3.2.0",
72-
"tslib": "^2.6.1",
72+
"tslib": "^2.6.2",
7373
"safe-regex": "^2.1.1",
7474
"uuid": "^9.0.0"
75+
},
76+
"csdxConfig": {
77+
"shortCommandName": {
78+
"cm:stacks:validate-regex": "RGXVLD"
79+
}
7580
}
7681
}

0 commit comments

Comments
 (0)