mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-21 20:50:07 +00:00
updated uploadGitHub scripts
This commit is contained in:
parent
af9c57800c
commit
8d4b348688
@ -11,6 +11,7 @@
|
||||
#
|
||||
|
||||
source ./buildScripts/reSourceVersionEnvs
|
||||
cp ./buildScripts/reSourceVersionEnvs imageBuild/buildInfo.sh
|
||||
source ./buildScripts/uploadGitHubReleaseDSL
|
||||
|
||||
echo ""
|
||||
@ -66,16 +67,16 @@ echo "machine uploads.github.com" >> $HOME/.netrc
|
||||
echo " login $GITHUB_USERNAME" >> $HOME/.netrc
|
||||
echo " password $GITHUB_TOKEN" >> $HOME/.netrc
|
||||
|
||||
echo $BUILD_TIME > buildTime
|
||||
echo $APPIMAGE_NAME > appImageName
|
||||
echo $DOCKER_NAME > dockerImageName
|
||||
echo $APPIMAGE_NAME > appImageName.txt
|
||||
echo $DOCKER_NAME > dockerImageName.txt
|
||||
|
||||
deleteReleaseByTag "$TRAVIS_REPO_SLUG" "continuous"
|
||||
|
||||
createNewRelease "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \
|
||||
../buildScripts/uploadGitHubReleaseMessage
|
||||
|
||||
uploadAnAsset $upload_url appImageName "text/plain"
|
||||
uploadAnAsset $upload_url buildTime "text/plain"
|
||||
uploadAnAsset $upload_url dockerImageName "text/plain"
|
||||
uploadAnAsset $upload_url $APPIMAGE_NAME "application/zip"
|
||||
uploadAnAsset $upload_url "appImageName.txt" "text/plain"
|
||||
uploadAnAsset $upload_url "buildInfo.sh" "text/plain"
|
||||
uploadAnAsset $upload_url "dockerImageName.txt" "text/plain"
|
||||
uploadAnAsset $upload_url $APPIMAGE_NAME "application/zip"
|
||||
|
||||
|
@ -47,20 +47,29 @@ function deleteReleaseByTag {
|
||||
"https://api.github.com/repos/${REPO}/releases"
|
||||
)
|
||||
|
||||
releaseID=$(echo $response | jq '.[] | select(.tag_name == "$releaseTag") | .id')
|
||||
releaseID=$(echo $response | \
|
||||
jq --arg releaseTag $releaseTag \
|
||||
'.[] | select(.tag_name == $releaseTag) | .id')
|
||||
|
||||
echo ""
|
||||
echo "releaseID(s): $releaseID"
|
||||
echo ""
|
||||
|
||||
if [ -n "$releaseID" ] ; then
|
||||
|
||||
echo "deleting an existing '$releaseTag' release in the repo $REPO"
|
||||
response=$(
|
||||
curl --fail \
|
||||
--netrc \
|
||||
--silent \
|
||||
--location \
|
||||
--request "DELETE" \
|
||||
"https://api.github.com/repos/${REPO}/releases/$releaseID"
|
||||
)
|
||||
|
||||
for aReleaseID in $releaseID
|
||||
do
|
||||
echo "deleting an existing '$releaseTag'($aReleaseID) release in the repo $REPO"
|
||||
response=$(
|
||||
curl --fail \
|
||||
--netrc \
|
||||
--silent \
|
||||
--location \
|
||||
--request "DELETE" \
|
||||
"https://api.github.com/repos/${REPO}/releases/$aReleaseID"
|
||||
)
|
||||
done
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo "looking for an existing '$releaseTag' git/tag in the repo $REPO"
|
||||
@ -131,7 +140,12 @@ function createNewRelease {
|
||||
"https://api.github.com/repos/${REPO}/releases"
|
||||
)
|
||||
|
||||
upload_url="$(echo "$response" | jq -r .upload_url | sed -e "s/{?name,label}//")"
|
||||
upload_url="$(echo "$response" | \
|
||||
jq -r .upload_url | sed -e "s/{?name,label}//")"
|
||||
|
||||
echo ""
|
||||
echo "upload_url:"
|
||||
echo $upload_url
|
||||
}
|
||||
|
||||
########################
|
||||
|
Loading…
Reference in New Issue
Block a user