Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion script/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ url_prefix='https://github.com/'
# Create each repo
pushd "$layout_dir"
for action_script in $script_dir/generated/*.sh; do
. $action_script
. $action_script &
done
wait
popd

# List the repositories
Expand Down
14 changes: 8 additions & 6 deletions script/internal/generate-scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ for json_file in $script_dir/../../config/actions/*.json; do
branch="${split[0]}"
sha="${split[1]}"

# Append curl download command
curl_download_commands+=("curl -s -S -L -o '$sha.tar.gz' 'https://api.github.com/repos/$owner/$repo/tarball/$sha'")
curl_download_commands+=("curl -s -S -L -o '$sha.zip' 'https://api.github.com/repos/$owner/$repo/zipball/$sha'")
# Append curl download command with retry and error handling
curl_download_commands+=("curl --retry 5 --retry-delay 2 --retry-max-time 60 --fail -s -S -L -o '$sha.tar.gz' 'https://api.github.com/repos/$owner/$repo/tarball/$sha' &")
curl_download_commands+=("curl --retry 5 --retry-delay 2 --retry-max-time 60 --fail -s -S -L -o '$sha.zip' 'https://api.github.com/repos/$owner/$repo/zipball/$sha' &")
done

# Get an array of tag info. Each item contains "<tag> <commit_sha>"
Expand All @@ -49,9 +49,9 @@ for json_file in $script_dir/../../config/actions/*.json; do
tag="${split[0]}"
sha="${split[1]}"

# Append curl download command
curl_download_commands+=("curl -s -S -L -o '$sha.tar.gz' 'https://api.github.com/repos/$owner/$repo/tarball/$sha'")
curl_download_commands+=("curl -s -S -L -o '$sha.zip' 'https://api.github.com/repos/$owner/$repo/zipball/$sha'")
# Append curl download command with retry and error handling
curl_download_commands+=("curl --retry 5 --retry-delay 2 --retry-max-time 60 --fail -s -S -L -o '$sha.tar.gz' 'https://api.github.com/repos/$owner/$repo/tarball/$sha' &")
curl_download_commands+=("curl --retry 5 --retry-delay 2 --retry-max-time 60 --fail -s -S -L -o '$sha.zip' 'https://api.github.com/repos/$owner/$repo/zipball/$sha' &")
done

# Append curl commands
Expand All @@ -61,5 +61,7 @@ for json_file in $script_dir/../../config/actions/*.json; do
do
echo "$curl_download_command" >> "$script_file"
done
echo "wait" >> "$script_file"
echo "sleep 1" >> "$script_file" # Brief pause for process settlement
echo "popd" >> "$script_file"
done