Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload to ign-gazebo docs to both api/gazebo and api/sim #436

Merged
merged 2 commits into from
Apr 25, 2024
Merged
Changes from 1 commit
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
13 changes: 13 additions & 0 deletions tools/scripts/build_gz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ if [[ ! -z "$4" && "$4" != "n" ]]; then
libName=`echo "$2" | grep -oP "(?<=gz-).*"`
libName="${libName//-/_}"

majorVersion="${version/\.*/}"
# Make sure the majorVersion is a valid number
numberCheckRegex='^[0-9]+$'
if [[ $majorVersion =~ $numberCheckRegex ]]; then
# If this is ign-gazebo (gz-sim < 6), the upload_doc.sh will upload to api/gazebo so we'll need to
# sync to api/sim manually
if [[ "$libName" == "sim" && "$majorVersion" -le 6 ]]; then
caguero marked this conversation as resolved.
Show resolved Hide resolved
aws s3 sync s3://gazebosim.org/api/gazebo/${majorVersion}/ s3://gazebosim.org/api/sim/${majorVersion}/
fi
else
echo "Invalid major version ${majorVersion}"
fi

echo -e "\e[46m\e[30mAdding version [$version] for library [$libName], release date [$5]...\e[0m\e[39m"
curl -k -X POST -d '{"libName":"'"$libName"'", "version":"'"$version"'", "releaseDate":"'"$5"'","password":"'"$6"'"}' https://api.gazebosim.org/1.0/versions
echo -e "\e[46m\e[30mAdded version [$version] for library [$libName], release date [$5]\e[0m\e[39m"
Expand Down
Loading