Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed updating website versions.
[ci skip]
  • Loading branch information
brixen committed Dec 27, 2015
1 parent 14deac8 commit f0b5ce6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions scripts/deploy.sh
Expand Up @@ -170,22 +170,25 @@ function rbx_deploy_website_release {
response=$(curl "$url")

download_url=$(echo "$response" | "$__dir__/json.sh" -b | \
egrep '\["download_url"\][[:space:]]\"[^"]+\"' | egrep -o '\"[^\"]+\"')
curl -o "$releases" "$download_url"
egrep '\["download_url"\][[:space:]]\"[^"]+\"' | egrep -o '\"[^\"]+\"$')
curl -o "$releases" "${download_url:1:${#download_url}-2}"

grep "^- version: \"$version\"\$" "$releases"
if [ $? -eq 0 ]; then
return
fi

sha=$(echo "$response" | "$__dir__/json.sh" -b | \
egrep '\["sha"\][[:space:]]\"[^"]+\"' | egrep -o '\"[[:xdigit:]]+\"')

cat > "$updates" <<EOF
- version: $version
- version: "$version"
date: $(rbx_revision_date)
EOF

cat "$releases" >> "$updates"

let i=${#sha}

rbx_github_update_file "$updates" "${sha:1:$i-2}" "Version $version" "$url"
rbx_github_update_file "$updates" "${sha:1:${#sha}-2}" "Version $version." "$url"
fi
}

Expand Down

0 comments on commit f0b5ce6

Please sign in to comment.