mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
updated uploadGitHub scripts
This commit is contained in:
parent
af9c57800c
commit
8d4b348688
@ -11,6 +11,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
source ./buildScripts/reSourceVersionEnvs
|
source ./buildScripts/reSourceVersionEnvs
|
||||||
|
cp ./buildScripts/reSourceVersionEnvs imageBuild/buildInfo.sh
|
||||||
source ./buildScripts/uploadGitHubReleaseDSL
|
source ./buildScripts/uploadGitHubReleaseDSL
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
@ -66,16 +67,16 @@ echo "machine uploads.github.com" >> $HOME/.netrc
|
|||||||
echo " login $GITHUB_USERNAME" >> $HOME/.netrc
|
echo " login $GITHUB_USERNAME" >> $HOME/.netrc
|
||||||
echo " password $GITHUB_TOKEN" >> $HOME/.netrc
|
echo " password $GITHUB_TOKEN" >> $HOME/.netrc
|
||||||
|
|
||||||
echo $BUILD_TIME > buildTime
|
echo $APPIMAGE_NAME > appImageName.txt
|
||||||
echo $APPIMAGE_NAME > appImageName
|
echo $DOCKER_NAME > dockerImageName.txt
|
||||||
echo $DOCKER_NAME > dockerImageName
|
|
||||||
|
|
||||||
deleteReleaseByTag "$TRAVIS_REPO_SLUG" "continuous"
|
deleteReleaseByTag "$TRAVIS_REPO_SLUG" "continuous"
|
||||||
|
|
||||||
createNewRelease "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \
|
createNewRelease "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \
|
||||||
../buildScripts/uploadGitHubReleaseMessage
|
../buildScripts/uploadGitHubReleaseMessage
|
||||||
|
|
||||||
uploadAnAsset $upload_url appImageName "text/plain"
|
uploadAnAsset $upload_url "appImageName.txt" "text/plain"
|
||||||
uploadAnAsset $upload_url buildTime "text/plain"
|
uploadAnAsset $upload_url "buildInfo.sh" "text/plain"
|
||||||
uploadAnAsset $upload_url dockerImageName "text/plain"
|
uploadAnAsset $upload_url "dockerImageName.txt" "text/plain"
|
||||||
uploadAnAsset $upload_url $APPIMAGE_NAME "application/zip"
|
uploadAnAsset $upload_url $APPIMAGE_NAME "application/zip"
|
||||||
|
|
||||||
|
@ -47,20 +47,29 @@ function deleteReleaseByTag {
|
|||||||
"https://api.github.com/repos/${REPO}/releases"
|
"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
|
if [ -n "$releaseID" ] ; then
|
||||||
|
|
||||||
echo "deleting an existing '$releaseTag' release in the repo $REPO"
|
for aReleaseID in $releaseID
|
||||||
|
do
|
||||||
|
echo "deleting an existing '$releaseTag'($aReleaseID) release in the repo $REPO"
|
||||||
response=$(
|
response=$(
|
||||||
curl --fail \
|
curl --fail \
|
||||||
--netrc \
|
--netrc \
|
||||||
--silent \
|
--silent \
|
||||||
--location \
|
--location \
|
||||||
--request "DELETE" \
|
--request "DELETE" \
|
||||||
"https://api.github.com/repos/${REPO}/releases/$releaseID"
|
"https://api.github.com/repos/${REPO}/releases/$aReleaseID"
|
||||||
)
|
)
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "looking for an existing '$releaseTag' git/tag in the repo $REPO"
|
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"
|
"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