加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
release 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
yuanwei 提交于 2021-04-20 17:52 . update release code
#! /bin/bash
# After `mvn clean package -am -pl build`, this script can help you to release `easeagent-dep.jar` to github.
RELEASE_ID=41698268
LIST_RELEASE_URL="https://api.github.com/repos/megaease/easeagent/releases"
RELEASE_URL="https://api.github.com/repos/megaease/easeagent/releases/${RELEASE_ID}"
UPLOAD_URL="https://uploads.github.com/repos/megaease/easeagent/releases/${RELEASE_ID}/assets?name=easeagent.jar"
TOKEN=""
AUTH_HEAD="Authorization: token $TOKEN"
LIB_PATH="build/target/easeagent-dep.jar"
ASSET_URL=`curl -X GET -H "$AUTH_HEAD" "$RELEASE_URL" | jq --raw-output '.assets[0].url'`
echo "Delete last asset is $ASSET_URL"
curl -X DELETE -H "$AUTH_HEAD" "$ASSET_URL"
MD5=`md5 -q $LIB_PATH`
echo "Update easeagent hash: $MD5"
curl -X PATCH -H "$AUTH_HEAD" -H "Content-Type: application/json" -d "{\"body\":\"MD5(easeagent.jar) = \`$MD5\`\"}" "$RELEASE_URL" > /dev/null
echo "Upload easeagent.jar"
curl -X POST -H "$AUTH_HEAD" -H "Content-Type: application/java-archive" --progress-bar --data-binary @$LIB_PATH "$UPLOAD_URL"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化