Skip to content

Commit 35d451b

Browse files
config.json - added name
update_version.sh - added comments - added echo and fix echo versions
1 parent 038c272 commit 35d451b

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"name": "PDF Accessibility Validator PDFix",
23
"version": "v0.0.0",
34
"actions": [
45
{

update_version.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/bin/bash
22

3+
# This script is used to update the version number in the config.json file
4+
# during the maven build process in GitHub Actions.
5+
# It replace "0.0.0" in program arguments with current version of container.
6+
# It also replaces the version number in the config.json file.
7+
38
# Check if an argument is provided
49
if [ -z "$1" ]; then
510
echo "No argument provided. Usage: ./update_version.sh v1.2.3"
@@ -27,7 +32,11 @@ echo "Short version: ${version_short}"
2732
mvn versions:set -DnewVersion=${version_short}
2833

2934
# Replace "v0.0.0" placeholder with the provided argument in config.json
30-
sed -i "s|v0.0.0|$1|g" config.json
31-
sed -i "s|0.0.0|$version_short|g" config.json
35+
sed -i "s|v0\.0\.0|$1|g" config.json
36+
37+
echo "Replaced all occurrences of 'v0.0.0' with '$1' in config.json."
38+
39+
# Replace "0.0.0" placeholder with the provided argument in config.json
40+
sed -i "s|0\.0\.0|$version_short|g" config.json
3241

33-
echo "Replaced all occurrences of 'latest' with '$1' in config.json."
42+
echo "Replaced all occurrences of '0.0.0' with '$1' in config.json."

0 commit comments

Comments
 (0)