Skip to content

Commit

Permalink
Chaging script to change pom files instead gradle files
Browse files Browse the repository at this point in the history
  • Loading branch information
victoralfaro-dotcms committed Oct 2, 2024
1 parent 0f9d3eb commit 4893295
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
fi
git checkout -b ${release_branch}
for file in $(find . -name build.gradle)
for file in $(find . -name pom.xml)
do
echo "Replacing version for ${file}"
python3 ${{ github.workspace }}/update_osgi_plugins.py ${file} ${release_version}
Expand Down
3 changes: 1 addition & 2 deletions update_osgi_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

with open(plugin_file, 'r') as fr:
content = fr.read()
content_new = re.sub('com.dotcms:dotcms:\d{2}\.\d{2}((\.\d{1,2})*)', 'com.dotcms:dotcms:' + replacing_text, content, flags = re.M)
content_new = re.sub('name: \'dotcms\', version: \'\d{2}\.\d{2}((\.\d{1,2})*)\'', 'name: \'dotcms\', version: \'' + replacing_text + '\'', content_new, flags = re.M)
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)
fr.close()

with open(plugin_file, 'w') as fw:
Expand Down

0 comments on commit 4893295

Please sign in to comment.