mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-21 15:05:19 +00:00
Updated the 'upload exists' script with the latest fixes
This commit is contained in:
parent
909e6e0207
commit
209f058e77
@ -21,7 +21,7 @@ fork_repo=$(echo "$head_info" | grep -o '"full_name":"[^"]*' | sed 's/"full_name
|
|||||||
fork_branch=$(echo "$head_info" | grep -o '"ref":"[^"]*' | sed 's/"ref":"//')
|
fork_branch=$(echo "$head_info" | grep -o '"ref":"[^"]*' | sed 's/"ref":"//')
|
||||||
upload_dir="https://oxen.rocks/${fork_repo}/${fork_branch}"
|
upload_dir="https://oxen.rocks/${fork_repo}/${fork_branch}"
|
||||||
|
|
||||||
echo "Starting to poll ${upload_dir} every 10s to check for a build matching '${prefix}.*${suffix}'"
|
echo "Starting to poll ${upload_dir}/ every 10s to check for a build matching '${prefix}.*${suffix}'"
|
||||||
|
|
||||||
# Loop indefinitely the CI can timeout the script if it takes too long
|
# Loop indefinitely the CI can timeout the script if it takes too long
|
||||||
total_poll_duration=0
|
total_poll_duration=0
|
||||||
@ -32,14 +32,12 @@ while true; do
|
|||||||
build_artifacts_html=$(curl -s "${upload_dir}/")
|
build_artifacts_html=$(curl -s "${upload_dir}/")
|
||||||
|
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "Failed to retrieve build artifact list"
|
echo -e "\n\n\n\n\e[31;1mFailed to retrieve build artifact list\e[0m\n\n\n"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Extract 'session-ios...' titles using grep and awk
|
# Extract 'session-ios...' titles using grep and awk then look for the target file
|
||||||
current_build_artifacts=$(echo "$build_artifacts_html" | grep -o 'href="${prefix}[^"]*' | sed 's/href="//')
|
current_build_artifacts=$(echo "$build_artifacts_html" | grep -o "href=\"${prefix}[^\"]*" | sed 's/href="//')
|
||||||
|
|
||||||
# Use grep to check for the combination
|
|
||||||
target_file=$(echo "$current_build_artifacts" | grep -o "${prefix}.*${suffix}" | tail -n 1)
|
target_file=$(echo "$current_build_artifacts" | grep -o "${prefix}.*${suffix}" | tail -n 1)
|
||||||
|
|
||||||
if [ -n "$target_file" ]; then
|
if [ -n "$target_file" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user