feat(cli): 适配使用uploader上传jar包

This commit is contained in:
2024-03-01 14:32:02 +08:00
parent 826f7bc780
commit 9a6eb1e0a4
26 changed files with 97 additions and 32 deletions

20
bin/library.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
encrypt_username=AxhEbscwsJDbYMH2
encrypt_password=cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4
upload_url=http://$encrypt_username:$encrypt_password@132.126.207.34:36800
root_path=$(dirname $(cd $(dirname $0);pwd))
function upload() {
source_file_path=$(realpath $1)
file_name=$(basename $source_file_path)
echo "↪ Source md5: $(md5sum $source_file_path | awk '{print $1}')"
echo "↪ Uploading $source_file_path"
curl $upload_url/file/upload/$file_name -T $source_file_path
echo "↪ Upload ytp success"
echo "↪ Download: curl $upload_url/file/download/$file_name -o $file_name"
echo "↪ Delete source"
rm $source_file_path
}