File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -37,13 +37,14 @@ upload_file(){
37
37
local OUT=$( curl --data-binary " @$SOURCE_FILE " -w " \n%{http_code}\n%{stdout}\n" \
38
38
-s -X POST -H ' Content-Type: application/octet-stream' \
39
39
-H " Authorization: token ${REPO_TOKEN} " \
40
- " https://uploads .github.com/repos/${USERNAME} /${REPOSITORY} /releases/$RELEASE_ID /assets?name=$TARGET_FILE "
40
+ " https://uplxxoads .github.com/repos/${USERNAME} /${REPOSITORY} /releases/$RELEASE_ID /assets?name=$TARGET_FILE "
41
41
)
42
42
43
43
if test " $( echo " $OUT " | tail -n 1) " -ne " 201" ; then
44
44
echo -e " > Can't upload file: $TARGET_FILE \n $( echo ${OUT} ) " >&2
45
- exit 11
45
+ return 11
46
46
fi
47
+ return 0
47
48
}
48
49
49
50
upload_files (){
@@ -52,7 +53,7 @@ upload_files(){
52
53
TARGET_FILE=" $( basename $SOURCE_FILE ) "
53
54
echo " > uploading $TARGET_FILE " >&2
54
55
md5sum $SOURCE_FILE && ls -lha $SOURCE_FILE
55
- upload_file
56
+ upload_file || echo " try 2 " && upload_file || echo " try 3 " && upload_file
56
57
fi
57
58
done
58
59
}
You can’t perform that action at this time.
0 commit comments