diff options
author | Andrew Gauld <ag1282@att.com> | 2017-09-01 12:05:51 -0400 |
---|---|---|
committer | Andrew Gauld <ag1282@att.com> | 2017-09-01 12:07:23 -0400 |
commit | d9c3e3f3bcaf15bb4a0735b390661745063599f9 (patch) | |
tree | 4ec09b570086f7a9c5de40f8eb15165eba3ea624 | |
parent | ac3f029edc6bc8b25ab44666b5408c8929e6ba92 (diff) |
raw repo push path and content type fixes
Change-Id: Ie50b637786804e9c327d0af91b7c936a7df15731
Issue-Id: CCSDK-66
Signed-off-by: Andrew Gauld <ag1282@att.com>
-rwxr-xr-x | mvn-phase-script.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mvn-phase-script.sh b/mvn-phase-script.sh index 51d1b28..cce6392 100755 --- a/mvn-phase-script.sh +++ b/mvn-phase-script.sh @@ -23,7 +23,7 @@ echo "=> Prepare environment " # This is the base for where "deploy" will upload # MVN_NEXUSPROXY is set in the pom.xml -REPO=$MVN_NEXUSPROXY/content/sites/raw +REPO=$MVN_NEXUSPROXY/content/sites/raw/$MVN_PROJECT_GROUPID TIMESTAMP=$(date +%C%y%m%dT%H%M%S) export BUILD_NUMBER="${TIMESTAMP}" @@ -98,17 +98,17 @@ deploy) hostport=$(echo $1 | cut -f3 -d /) host=$(echo $hostport | cut -f1 -d:) settings=${SETTINGS_FILE:-$HOME/.m2/settings.xml} - ( echo machine $host; echo login $(xpath -q -e "//servers/server[id='$MVN_SERVER_ID']/username/text()" $settings); echo password $(xpath -q -e "//servers/server[id='$MVN_SERVER_ID']/password/text()" $settings) ) >$HOME/.netrc + echo machine $host login $(xpath -q -e "//servers/server[id='$MVN_SERVER_ID']/username/text()" $settings) password $(xpath -q -e "//servers/server[id='$MVN_SERVER_ID']/password/text()" $settings) >$HOME/.netrc chmod 600 $HOME/.netrc set -x } function putraw { - curl -X PUT -H "Content-Type: text/plain" --netrc --upload-file $1 --url $REPO/$2 + curl -X PUT -H "Content-Type: $3" --netrc --upload-file $1 --url $REPO/$2 } setnetrc $REPO PLUGIN_FILE=$(echo $PLUGIN_NAME-*.wgn) - putraw $PLUGIN_FILE plugins/$PLUGIN_FILE - putraw $TYPE_FILE_SOURCE $TYPE_FILE_DEST + putraw $PLUGIN_FILE plugins/$PLUGIN_FILE application/gzip + putraw $TYPE_FILE_SOURCE $TYPE_FILE_DEST text/x-yaml set +e +x ;; *) |