forked from vesoft-inc/nebula
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upload package to oss (vesoft-inc#1972)
* upload oss * update * Remove redundant * address @yixinlu's comment Co-authored-by: dutor <440396+dutor@users.noreply.github.com>
- Loading branch information
1 parent
b504b0c
commit 405cfb9
Showing
4 changed files
with
51 additions
and
6 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# This script upload package to oss. | ||
# | ||
# - OSS_ENDPOINT | ||
# - OSS_ID | ||
# - OSS_SECRET | ||
# - filepath | ||
# - tag | ||
# - nightly | ||
# | ||
# Example: | ||
# | ||
# upload-oss.sh OSS_ENDPOINT=xxx OSS_ID=xxx OSS_SECRET=xxx tag=v0.1.0 filepath=xxx | ||
# upload-oss.sh OSS_ENDPOINT=xxx OSS_ID=xxx OSS_SECRET=xxx filepath=xxx nightly=true | ||
|
||
set -e | ||
|
||
for op in $@; do | ||
eval "$op" | ||
done | ||
|
||
if [[ $nightly != "" ]]; then | ||
OSS_SUBDIR=`date +%Y%m%d` | ||
OSS_URL="oss://nebula-graph/build-deb"/nightly/${OSS_SUBDIR} | ||
else | ||
OSS_SUBDIR=`echo $tag |sed 's/^v//'` | ||
OSS_URL="oss://nebula-graph/build-deb"/${OSS_SUBDIR} | ||
fi | ||
|
||
echo "Uploading oss... " | ||
ossutil64 -e ${OSS_ENDPOINT} -i ${OSS_ID} -k ${OSS_SECRET} -f cp ${filepath} ${OSS_URL}/$(basename ${filepath}) |