Last active
September 28, 2016 15:52
-
-
Save yarinkos/43995985136969fa9c664ab4a7ff8b3b to your computer and use it in GitHub Desktop.
upload archive to nexus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SERVER=$1 | |
GROUPID=$2 | |
ARTIFACTID=$3 | |
VERSION=$4 | |
USER=$5 | |
FILENAME=$6 | |
REPO=$7 | |
URL="$SERVER/nexus/service/local/artifact/maven/content" | |
# if snapshots,pay attention that manual upload is supported | |
group=GROUPID | |
artifact=ARTIFACTID | |
version=VERSION | |
classifier=demo | |
ext=tar.gz | |
filename=$FILENAME | |
curl --write-out "\nStatus: %{http_code}\n" \ | |
--request POST \ | |
--user $USER \ | |
-F "r=$REPO" \ | |
-F "g=$group" \ | |
-F "a=$artifact" \ | |
-F "v=$version" \ | |
-F "c=$classifier" \ | |
-F "p=$ext" \ | |
-F "file=@$filename" \ | |
"$URL" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment