diff options
author | Lusheng Ji <lji@research.att.com> | 2018-03-19 22:38:58 -0400 |
---|---|---|
committer | Lusheng Ji <lji@research.att.com> | 2018-03-19 22:39:05 -0400 |
commit | b99b3c8a09b1cfd9251997af9c2dc01ad1d75147 (patch) | |
tree | 2e649c0908de3d92aac91a3e7acf88252c721133 | |
parent | a3361d3fba982fc930bfa0c7da82dfc697c043c3 (diff) |
Fix wagon archiving issue
Issue-ID: DCAEGEN2-206
Change-Id: Ia9d35064fb8ecdea292e83cbb884336b2dd9e306
Signed-off-by: Lusheng Ji <lji@research.att.com>
-rw-r--r-- | scripts/mvn-phase-lib.sh | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/scripts/mvn-phase-lib.sh b/scripts/mvn-phase-lib.sh index 26490ce..99aa946 100644 --- a/scripts/mvn-phase-lib.sh +++ b/scripts/mvn-phase-lib.sh @@ -275,20 +275,21 @@ build_archives_for_wagons() { rm -rf ./*.tgz ./*.zip venv-pkg - SETUPFILES=$(find . -name "setup.py") + SETUPFILES=$(find $(pwd) -name "setup.py") CURDIR=$(pwd) for SETUPFILE in $SETUPFILES; do - PLUGIN_DIR=$(dirname "$SETUPFILE") + PLUGIN_FULL_DIR=$(dirname "$SETUPFILE") + PLUGIN_BASE_DIR=$(basename "$PLUGIN_DIR") PLUGIN_NAME=$(grep 'name' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9a-zA-Z\.]*//g') PLUGIN_VERSION=$(grep 'version' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9\.]*//g') - cd ${PLUGIN_DIR}/.. + cd ${PLUGIN_FULL_DIR}/.. echo "In $(pwd), build plugin zip $PLUGIN_NAME, version $PLUGIN_VERSION" - zip -r "${PLUGIN_NAME}-${PLUGIN_VERSION}.zip" "./${PLUGIN_DIR}" - tar -czvf "${PLUGIN_NAME}-${PLUGIN_VERSION}.tgz" "./${PLUGIN_DIR}" + zip -r "${PLUGIN_NAME}-${PLUGIN_VERSION}.zip" -x *.git* "./${PLUGIN_BASE_DIR}" + tar -czvf "${PLUGIN_NAME}-${PLUGIN_VERSION}.tgz" "./${PLUGIN_BASE_DIR}" - echo "Built archives for package ${PLUGIN_NAME}-${PLUGIN_VERSION}" + echo "Built archives for package ${PLUGIN_NAME}-${PLUGIN_VERSION} at $(pwd)" cd "$CURDIR" done } @@ -348,14 +349,15 @@ upload_raw_file() upload_wagon_archives() { - SETUPFILES=$(find . -name "setup.py") + SETUPFILES=$(find $(pwd) -name "setup.py") CURDIR=$(pwd) for SETUPFILE in $SETUPFILES; do - PLUGIN_DIR=$(dirname "$SETUPFILE") + PLUGIN_FULL_DIR=$(dirname "$SETUPFILE") + PLUGIN_BASE_DIR=$(basename "$PLUGIN_DIR") PLUGIN_NAME=$(grep 'name' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9a-zA-Z\.]*//g') PLUGIN_VERSION=$(grep 'version' "$SETUPFILE" | cut -f2 -d'=' | sed 's/[^0-9\.]*//g') - cd ${PLUGIN_DIR}/.. + cd ${PLUGIN_FULL_DIR}/.. echo "In $(pwd), upload zip archive for $PLUGIN_NAME, version $PLUGIN_VERSION" ARCHIVE_FILE_NAME="${PLUGIN_NAME}-${PLUGIN_VERSION}.zip" if [ -z "$ARCHIVE_FILE_NAME" ]; then |