diff options
author | 2020-06-09 14:44:55 +0000 | |
---|---|---|
committer | 2020-06-09 14:50:11 +0000 | |
commit | 2c78a2e1161c0f2ccfc0ab7cc7a588e4e918f9de (patch) | |
tree | 0f1df7b868dba903325c8f090a0829ff76ee65a8 /mvn-phase-lib.sh | |
parent | 4c4d9967d0aa0db8306eb8088523da1152f9af68 (diff) |
fix for typefile fix
Change-Id: Ie974a982290229dcfecb058090d23b3ac73ed537
Signed-off-by: Hansen, Tony (th1395) <th1395@att.com>
Issue-ID: DCAEGEN2-2207
Signed-off-by: Hansen, Tony (th1395) <th1395@att.com>
Diffstat (limited to 'mvn-phase-lib.sh')
-rw-r--r-- | mvn-phase-lib.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mvn-phase-lib.sh b/mvn-phase-lib.sh index 152df24..ff03fd8 100644 --- a/mvn-phase-lib.sh +++ b/mvn-phase-lib.sh @@ -253,7 +253,7 @@ build_wagons() for SETUPFILE in $SETUPFILES; do PLUGIN_DIR=$(dirname "$SETUPFILE") PLUGIN_NAME=$(grep 'name[[:space:]]*=' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9a-zA-Z\.]*//g') - PLUGIN_VERSION=$(grep 'version' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9\.]*//g') + PLUGIN_VERSION=$(grep 'version[[:space:]]*=' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9\.]*//g') echo "In $PLUGIN_DIR, build plugin $PLUGIN_NAME, version $PLUGIN_VERSION" @@ -278,7 +278,7 @@ build_archives_for_wagons() PLUGIN_FULL_DIR=$(dirname "$SETUPFILE") PLUGIN_BASE_DIR=$(basename "$PLUGIN_FULL_DIR") PLUGIN_NAME=$(grep 'name[[:space:]]*=' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9a-zA-Z\.]*//g') - PLUGIN_VERSION=$(grep 'version' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9\.]*//g') + PLUGIN_VERSION=$(grep 'version[[:space:]]*=' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9\.]*//g') cd "${PLUGIN_FULL_DIR}"/.. echo "In $(pwd), build plugin zip $PLUGIN_NAME, version $PLUGIN_VERSION" @@ -352,7 +352,7 @@ upload_wagon_archives() PLUGIN_FULL_DIR=$(dirname "$SETUPFILE") PLUGIN_BASE_DIR=$(basename "$PLUGIN_FULL_DIR") PLUGIN_NAME=$(grep 'name[[:space:]]*=' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9a-zA-Z\.]*//g') - PLUGIN_VERSION=$(grep 'version' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9\.]*//g') + PLUGIN_VERSION=$(grep 'version[[:space:]]*=' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9\.]*//g') cd "${PLUGIN_FULL_DIR}"/.. echo "In $(pwd), upload zip archive for $PLUGIN_NAME, version $PLUGIN_VERSION" @@ -383,13 +383,13 @@ upload_wagons_and_type_yamls() for SETUPFILE in $SETUPFILES; do PLUGIN_DIR=$(dirname "$SETUPFILE") PLUGIN_NAME=$(grep 'name[[:space:]]*=' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9a-zA-Z\.]*//g') - PLUGIN_VERSION=$(grep 'version' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9\.]*//g') + PLUGIN_VERSION=$(grep 'version[[:space:]]*=' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9\.]*//g') PLUGIN_VERSION_MAJOR=$(echo "$PLUGIN_VERSION" | cut -f1 -d'.') PLUGIN_VERSION_MAJOR_MINOR=$(echo "$PLUGIN_VERSION" | cut -f1-2 -d'.') echo "Found setup file in $PLUGIN_DIR, for plugin $PLUGIN_NAME version $PLUGIN_VERSION" - TYPEFILE_NAME=$( grep -l "package_name:[[:space:]]*${PLUGIN_NAME}" * 2>/dev/null ) + TYPEFILE_NAME=$( grep -l "package_name[[:space:]]*:[[:space:]]*${PLUGIN_NAME}" * 2>/dev/null || true ) if [ -z "$TYPEFILE_NAME" ]; then echo "!!! No typefile found with matching package name $PLUGIN_NAME" exit -1 @@ -400,7 +400,7 @@ upload_wagons_and_type_yamls() cp -f "$TYPEFILE_NAME" "$NEWFILENAME" fi - TYPEFILE_PACKAGE_VERSION=$(grep -R 'package_version' "$TYPEFILE_NAME" |cut -f2 -d ':' |sed -r 's/\s+//g') + TYPEFILE_PACKAGE_VERSION=$(grep 'package_version[[:space:]]*:' "$TYPEFILE_NAME" |cut -f2 -d ':' |sed -r 's/\s+//g') WAGONFILE_NAME=$(ls -1 "${PLUGIN_NAME}"-"${TYPEFILE_PACKAGE_VERSION}"-*.wgn) if [ -z "$WAGONFILE_NAME" ]; then echo "!!! No wagonfile found with matching package name and version as required in typefile: " |