Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubinius/rubinius
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 114253414b4f
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 81a50cfd0c6c
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Dec 27, 2015

  1. Copy the full SHA
    62912d5 View commit details
  2. Fixed creating GitHub release.

    brixen committed Dec 27, 2015
    Copy the full SHA
    81a50cf View commit details
Showing with 20 additions and 9 deletions.
  1. +10 −5 scripts/deploy.sh
  2. +10 −4 scripts/github.sh
15 changes: 10 additions & 5 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -157,17 +157,22 @@ function rbx_deploy_github_release {
}

function rbx_deploy_website_release {
local os_name releases updates version url response sha
local os_name releases updates version url response sha download_url

os_name=$1
releases="releases.yml"
updates="updated_$releases"
version=$(rbx_revision_version)
url="https://api.github.com/repos/rubinius/rubinius.github.io/contents/_data/releases.yml"

if [[ $os_name == osx ]]; then
releases="releases.yml"
updates="updated_$releases"
version=$(rbx_revision_version)
url="https://api.github.com/repos/rubinius/rubinius.github.io/contents/_data/releases.yml"

response=$(curl "$url")

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

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

14 changes: 10 additions & 4 deletions scripts/github.sh
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ __dir__="$(cd "$(dirname "$0")" && pwd)"
source "$__dir__/digest.sh"

function rbx_github_release {
local version date previous log request response release_url upload_url
local version date previous log body request response release_url upload_url

version=$1
date=$2
@@ -20,22 +20,28 @@ function rbx_github_release {
previous="${array[0]}.$minor"
fi

log=$(git log --max-parents=1 --reverse --pretty='format:* %s (%an)%+b' \
log=$(git log --color=never --max-parents=1 --reverse --pretty='format:* %s (%an)%+b' \
"v$previous..v$version" | sed 's/\[ci skip\]//' | sed '/^$/N;/^\n$/D')

unset GEM_HOME GEM_PATH GEM_ROOT

body=$(printf 'Version %s (%s)\n\n%s' "$version" "$date" "$log" \
| bin/rbx -r json -e "puts STDIN.read.to_json")

request=$(printf '{
"tag_name": "v%s",
"target_commitish": "master",
"name": "Release %s",
"body": "Version %s (%s)\n\n%s",
"body": %s,
"draft": false,
"prerelease": false
}' "$version" "$version" "$version" "$date" "$log")
}' "$version" "$version" "$body")

response=$(curl --data "$request" \
"$release_url?access_token=$GITHUB_OAUTH_TOKEN")

if [ $? -ne 0 ]; then
echo "Creating GitHub release failed"
return
fi