Skip to content

Commit f0b5ce6

Browse files
committedDec 27, 2015
Fixed updating website versions.
[ci skip]
1 parent 14deac8 commit f0b5ce6

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed
 

‎scripts/deploy.sh

+9-6
Original file line numberDiff line numberDiff line change
@@ -170,22 +170,25 @@ function rbx_deploy_website_release {
170170
response=$(curl "$url")
171171

172172
download_url=$(echo "$response" | "$__dir__/json.sh" -b | \
173-
egrep '\["download_url"\][[:space:]]\"[^"]+\"' | egrep -o '\"[^\"]+\"')
174-
curl -o "$releases" "$download_url"
173+
egrep '\["download_url"\][[:space:]]\"[^"]+\"' | egrep -o '\"[^\"]+\"$')
174+
curl -o "$releases" "${download_url:1:${#download_url}-2}"
175+
176+
grep "^- version: \"$version\"\$" "$releases"
177+
if [ $? -eq 0 ]; then
178+
return
179+
fi
175180

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

179184
cat > "$updates" <<EOF
180-
- version: $version
185+
- version: "$version"
181186
date: $(rbx_revision_date)
182187
EOF
183188

184189
cat "$releases" >> "$updates"
185190

186-
let i=${#sha}
187-
188-
rbx_github_update_file "$updates" "${sha:1:$i-2}" "Version $version" "$url"
191+
rbx_github_update_file "$updates" "${sha:1:${#sha}-2}" "Version $version." "$url"
189192
fi
190193
}
191194

0 commit comments

Comments
 (0)
Please sign in to comment.