Skip to content

Commit 5cfe2c6

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/path-to-regexp-1.9.0
2 parents bedefbb + 31d8b86 commit 5cfe2c6

File tree

4 files changed

+58
-7
lines changed

4 files changed

+58
-7
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Increment tag for patch or minor
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types:
8+
- closed # Trigger only when a PR is closed (merged or not)
9+
10+
jobs:
11+
tag:
12+
if: github.event.pull_request.merged == true
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Create new tag
21+
env:
22+
TOKEN: ${{ secrets.TAG_CREATION_TOKEN_PUBLIC }}
23+
run: |
24+
echo $TOKEN | gh auth login --with-token
25+
latest_tag=$(git tag | sort -V | tail -n 1)
26+
echo "Latest tag: $latest_tag"
27+
28+
# Extract major and minor versions
29+
version=$(echo $latest_tag | cut -d. -f1-2)
30+
# Extract patch version
31+
patch=$(echo $latest_tag | cut -d. -f3)
32+
# Extract minor version
33+
minor=$(echo $latest_tag | cut -d. -f2)
34+
major=$(echo $latest_tag | cut -d. -f1)
35+
36+
# Check if the incoming branch starts with 'release-candidate-'
37+
incoming_branch="${{ github.head_ref }}"
38+
if [[ "$incoming_branch" == release-candidate-* ]]; then
39+
# Increment minor version and reset patch
40+
new_minor=$((minor+1))
41+
new_tag="$major.$new_minor.0"
42+
echo "New tag will be (minor increment): $new_tag"
43+
else
44+
# Increment patch version
45+
new_tag="$version.$((patch+1))"
46+
echo "New tag will be (patch increment): $new_tag"
47+
fi
48+
49+
git config --global user.email "devops@devtron.ai"
50+
git config --global user.name "systemsdt"
51+
git tag $new_tag
52+
git push origin $new_tag

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "0.5.0",
3+
"version": "0.5.0-patch-1",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Common/ChartVersionAndTypeSelector.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,17 @@ const ChartVersionAndTypeSelector = ({ setSelectedChartRefId }: ChartVersionAndT
7272
<div className="chart-type-options flex" data-testid="chart-type-options">
7373
<span className="cn-7 mr-4">Chart Type</span>
7474
<SelectPicker
75-
inputId='chart-type-select'
76-
label='Chart Type'
75+
inputId="chart-type-select"
7776
value={selectedChartType ?? chartTypeOptions[0]}
7877
options={chartTypeOptions}
7978
onChange={handleChartTypeChange}
8079
variant={SelectPickerVariantType.BORDER_LESS}
8180
/>
8281
</div>
8382
<div className="chart-version-options flex" data-testid="chart-version-options">
84-
<span className="cn-7 mr-4">Chart Version</span>
83+
<span className="cn-7 mr-4">Chart Version</span>
8584
<SelectPicker
86-
inputId='chart-version-select'
85+
inputId="chart-version-select"
8786
value={selectedChartVersion ?? chartVersionOptions[0]}
8887
options={chartVersionOptions}
8988
onChange={handleChartVersionChange}

0 commit comments

Comments
 (0)