Skip to content

Commit 96f5fa0

Browse files
Chaging script to change pom files instead gradle files
1 parent 0f9d3eb commit 96f5fa0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

.github/workflows/release-target.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
uses: actions/checkout@v4
1616
with:
1717
ref: master
18-
fetch-depth: 0
1918
- name: Setup Python
2019
uses: actions/setup-python@v4
2120
with:
@@ -39,7 +38,7 @@ jobs:
3938
fi
4039
git checkout -b ${release_branch}
4140
42-
for file in $(find . -name build.gradle)
41+
for file in $(find . -name pom.xml)
4342
do
4443
echo "Replacing version for ${file}"
4544
python3 ${{ github.workspace }}/update_osgi_plugins.py ${file} ${release_version}

update_osgi_plugins.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77
with open(plugin_file, 'r') as fr:
88
content = fr.read()
9-
content_new = re.sub('com.dotcms:dotcms:\d{2}\.\d{2}((\.\d{1,2})*)', 'com.dotcms:dotcms:' + replacing_text, content, flags = re.M)
10-
content_new = re.sub('name: \'dotcms\', version: \'\d{2}\.\d{2}((\.\d{1,2})*)\'', 'name: \'dotcms\', version: \'' + replacing_text + '\'', content_new, flags = re.M)
9+
content_new = re.sub('<dotcms-core.version>\d{2}\.\d{2}((\.\d{1,2})*)</dotcms-core.version>', "<dotcms-core.version>{0}</dotcms-core.version>".format(replacing_text), content, flags = re.M)
1110
fr.close()
1211

1312
with open(plugin_file, 'w') as fw:

0 commit comments

Comments
 (0)