Skip to content

Commit

Permalink
Fixed some deploy scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed Dec 20, 2015
1 parent c4604fa commit fcd2a43
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -15,7 +15,7 @@ before_script:
- if [ $TRAVIS_OS_NAME == osx ]; then travis_retry ./configure; fi
script: rake ci
after_success:
- if [ $TRAVIS_BRANCH == $TRAVIS_TAG ]; then rake deploy; fi
- if [ $TRAVIS_BRANCH == $TRAVIS_TAG ]; then ./script/deploy.sh; fi
branches:
only:
- master
Expand Down
4 changes: 0 additions & 4 deletions rakelib/deploy.rake

This file was deleted.

11 changes: 3 additions & 8 deletions scripts/configuration.sh
@@ -1,16 +1,11 @@
function rbx_script_path {
local dir
dir=$(dirname "$0")

cd "$dir" && pwd
}
__dir__="$(cd $(dirname "$0") && pwd)"

function rbx_git_directory {
echo "$(rbx_script_path)/../.git"
echo "$__dir__/../.git"
}

function rbx_revision_file {
echo "$(rbx_script_path)/../.revision"
echo "$__dir__/../.revision"
}

function rbx_get_revision {
Expand Down
14 changes: 8 additions & 6 deletions scripts/deploy.sh
@@ -1,8 +1,10 @@
#!/bin/bash

source "scripts/configuration.sh"
source "scripts/aws.sh"
source "scripts/io.sh"
__dir__="$(cd $(dirname "$0") && pwd)"

source "$__dir__/configuration.sh"
source "$__dir__/aws.sh"
source "$__dir__/io.sh"

function rbx_release_bucket {
echo "rubinius-releases-rubinius-com"
Expand Down Expand Up @@ -57,7 +59,7 @@ function rbx_upload_files {
if [[ $TRAVIS_OS_NAME == osx ]]; then
echo "Deploying release tarball $(rbx_release_name)..."

"$(rbx_script_path)/release.sh" || fail "unable to build release tarball"
"$__dir__/release.sh" || fail "unable to build release tarball"

rbx_upload_files "$(rbx_release_bucket)" "$(rbx_release_name)" "$(rbx_release_name)"
fi
Expand All @@ -66,7 +68,7 @@ fi
if [[ $TRAVIS_OS_NAME == osx ]]; then
echo "Deploying Homebrew binary $(rbx_release_name)..."

"$(rbx_script_path)/package.sh" homebrew || fail "unable to build Homebrew binary"
"$__dir__/package.sh" homebrew || fail "unable to build Homebrew binary"

rbx_upload_files "$(rbx_binary_bucket)" "$(rbx_release_name)" \
"$(rbx_release_name)" "/homebrew/"
Expand All @@ -75,7 +77,7 @@ fi
# Build and upload a binary to S3.
echo "Deploying Travis binary $(rbx_release_name) for ${TRAVIS_OS_NAME}..."

"$(rbx_script_path)/package.sh" binary || fail "unable to build binary"
"$__dir__/package.sh" binary || fail "unable to build binary"

declare -a paths os_releases versions

Expand Down
4 changes: 4 additions & 0 deletions scripts/package.sh
@@ -1,5 +1,9 @@
#!/bin/bash

__dir__="$(cd $(dirname "$0") && pwd)"

source "$__dir__/configuration.sh"

function rbx_digest_file {
local name digest

Expand Down
7 changes: 4 additions & 3 deletions scripts/release.sh
@@ -1,7 +1,8 @@
#!/bin/bash

source "scripts/configuration.sh"
__dir__="$(cd $(dirname "$0") && pwd)"

rbx_write_revision_file
source "$__dir__/configuration.sh"

"$(rbx_script_path)/package.sh" tar
rbx_write_revision_file
"$__dir__/package.sh" tar

0 comments on commit fcd2a43

Please sign in to comment.