summaryrefslogtreecommitdiffstats
path: root/mvn-phase-lib.sh
diff options
context:
space:
mode:
authorLusheng Ji <lji@research.att.com>2017-10-16 22:14:08 -0400
committerLusheng Ji <lji@research.att.com>2017-10-16 22:14:41 -0400
commit94a4ef60e82e414fc04ba290c54f07fb24e99ca5 (patch)
treeccbf60a4f19591a1d5576aeb5f69f4e5be409c46 /mvn-phase-lib.sh
parentc37f51bb5a5d9cfc44a8e52eca1fcf231f04da04 (diff)
Upload raw files recuresively with path
Issue-Id: DCAEGEN2-128 Change-Id: I05c7ab91828224ccf87326c8980c2459290c56dc Signed-off-by: Lusheng Ji <lji@research.att.com>
Diffstat (limited to 'mvn-phase-lib.sh')
-rwxr-xr-xmvn-phase-lib.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/mvn-phase-lib.sh b/mvn-phase-lib.sh
index b9e764c..8854944 100755
--- a/mvn-phase-lib.sh
+++ b/mvn-phase-lib.sh
@@ -241,6 +241,8 @@ upload_raw_file()
OUTPUT_FILE_TYPE='application/json'
elif [ "$EXT" == 'sh' ]; then
OUTPUT_FILE_TYPE='text/x-shellscript'
+ elif [ "$EXT" == 'py' ]; then
+ OUTPUT_FILE_TYPE='text/x-python'
elif [ "$EXT" == 'gz' ]; then
OUTPUT_FILE_TYPE='application/gzip'
elif [ "$EXT" == 'wgn' ]; then
@@ -263,7 +265,7 @@ upload_raw_file()
fi
echo "Sending ${OUTPUT_FILE} to Nexus: ${SEND_TO}"
- curl -vkn --netrc-file "${NETRC}" --upload-file "${OUTPUT_FILE}" -X PUT -H "Content-Type: $OUTPUT_FILE_TYPE" "${SEND_TO}/${OUTPUT_FILE}-${MVN_PROJECT_VERSION}-${TIMESTAMP}"
+ #curl -vkn --netrc-file "${NETRC}" --upload-file "${OUTPUT_FILE}" -X PUT -H "Content-Type: $OUTPUT_FILE_TYPE" "${SEND_TO}/${OUTPUT_FILE}-${MVN_PROJECT_VERSION}-${TIMESTAMP}"
curl -vkn --netrc-file "${NETRC}" --upload-file "${OUTPUT_FILE}" -X PUT -H "Content-Type: $OUTPUT_FILE_TYPE" "${SEND_TO}/${OUTPUT_FILE}-${MVN_PROJECT_VERSION}"
curl -vkn --netrc-file "${NETRC}" --upload-file "${OUTPUT_FILE}" -X PUT -H "Content-Type: $OUTPUT_FILE_TYPE" "${SEND_TO}/${OUTPUT_FILE}"
}
@@ -290,6 +292,13 @@ upload_files_of_extension()
upload_raw_file "$F"
done
}
+upload_files_of_extension_recursively()
+{
+ FILES=$(find . -name "*.$1")
+ for F in $FILES ; do
+ upload_raw_file "$F"
+ done
+}
generate_pypirc_then_publish()