Commit 1c18231d authored by nanahira's avatar nanahira

Merge branch 'master' of git.mycard.moe:mycard/mycard-package-script

parents 544c10e4 976e9250
#!/bin/bash #!/bin/bash
source ./src/pack-utility.sh source ./src/pack-utility.sh
cd pool searchPath="$1"
if [[ -z "$searchPath" ]]; then
searchPath=pool
fi
currentPath="$PWD"
cd "$searchPath"
for appName in *; do for appName in *; do
makeBuild "$appName" "$appName" makeBuild "$appName" "$appName" "$2"
done done
cd .. cd "$currentPath"
...@@ -34,7 +34,10 @@ makeBuild() { ...@@ -34,7 +34,10 @@ makeBuild() {
echo "Version: $appVersion" echo "Version: $appVersion"
currentPath="$PWD" currentPath="$PWD"
cd "$appPath" cd "$appPath"
result=$(tar --zstd -cvf - * | curl -sL -H "$header" -X POST "$apiRoot/release/api/build/$appName/${appVersion}${suffix}" -F file=@-) tmpfile=$(mktemp "$currentPath/upload_XXXXXX.tar.zst")
tar -I 'zstd -T0' -cf "$tmpfile" .
result=$(curl -L -H "$header" -X POST "$apiRoot/release/api/build/$appName/${appVersion}${suffix}" -F "file=@$tmpfile")
rm -f "$tmpfile"
handleErrorMessage "$result" handleErrorMessage "$result"
echo "$result" | jq . echo "$result" | jq .
cd .. cd ..
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment