File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 11{
2+ "name" : " PDF Accessibility Validator PDFix" ,
23 "version" : " v0.0.0" ,
34 "actions" : [
45 {
Original file line number Diff line number Diff line change 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
49if [ -z " $1 " ]; then
510 echo " No argument provided. Usage: ./update_version.sh v1.2.3"
@@ -27,7 +32,11 @@ echo "Short version: ${version_short}"
2732mvn 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."
You can’t perform that action at this time.
0 commit comments