Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

Commit

Permalink
Releasing v1.2788.0
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic committed Dec 13, 2014
1 parent 5eb701b commit f3fe180
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 10 deletions.
56 changes: 49 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,76 @@ Traveling BOSH CLI

This project packages the BOSH CLI (with plugins) into self-contained packages that can be downloaded and used by anyone without requiring Ruby and native extensions.

Download
--------
Simple installation
-------------------

Coming soon.

Step-by-step installation
-------------------------

To download the latest release https://github.com/cloudfoundry-community/traveling-bosh/releases

For example:

```
rm -rf tar xfz bosh_cli*.tar.gz
wget https://github.com/cloudfoundry-community/traveling-bosh/releases/download/v1.2788.0/bosh_cli-1.2788.0-linux-x86_64.tar.gz
tar xfz bosh_cli*.tar.gz
rm bosh_cli*.tar.gz
```

To check that its runnable:

```
./bosh_cli-*/bosh
```

You could now create a symlink:

```
rm -f bosh_cli
ln -s $PWD/$(ls -d bosh_cli* | head -n1) bosh_cli
```

Check that its runnable via the symlink:

To check that its runnable:

```
./bosh_cli/bosh
```

Finally, add the `bosh_cli` path into your `$PATH`:

```
export PATH=/path/to/bosh_cli:$PATH
```

Background
----------

This project uses http://phusion.github.io/traveling-ruby/

Create releases
---------------
Create & publish releases
-------------------------

Anyone in the @cloudfoundry-community can create new releases whenever new BOSH CLI versions are released. This section contains the instructions.

You are required to use Ruby 2.1 to create releases as this is what traveling-ruby uses.

You will also need to install https://github.com/aktau/github-release to share the releases on Github.

The release version number is directly taken from the BOSH CLI to be packaged. First, upgrade to latest BOSH CLI.

```
bundle update
rake package:bundle_install
```

To create the new release:
To create the new release, create new commit & git tag, and upload the packages:

```
rake package
rake release
```

This will create three packages:
Expand Down
39 changes: 37 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,54 @@ require 'bundler/setup'
PACKAGE_NAME = "bosh_cli"
INTERNAL_BIN = "bosh"

RELEASE_NAME = "Self-contained BOSH CLI"
RELEASE_DESCRIPTION = "It is now easier than ever to install and use BOSH CLI. Download, unpack, and use `./bosh` script."

# http://traveling-ruby.s3-us-west-2.amazonaws.com/list.html
TRAVELING_RUBY_VERSION = "20141209-2.1.5"
NOKOGIRI_VERSION = "1.6.5" # Must match Gemfile
SQLITE3_VERSION = "1.3.9" # Must match Gemfile
MYSQL2_VERSION = "0.3.17" # Must match Gemfile
PG_VERSION = "0.17.1" # Must match Gemfile
NATIVE_GEMS = {"nokogiri" => NOKOGIRI_VERSION}
# MYSQL2_VERSION = "0.3.17" # Must match Gemfile
# PG_VERSION = "0.17.1" # Must match Gemfile
# , "sqlite3" => SQLITE3_VERSION,
# "mysql2" => MYSQL2_VERSION, "pg" => PG_VERSION}

desc "Package your app"
task :package => ['package:linux:x86', 'package:linux:x86_64', 'package:osx']

desc "Create a release on github and upload"
task :create_release do
tag = "v#{bosh_cli_version}"
sh "git commit -a -m 'Releasing #{tag}'"
sh "git tag #{tag}"
sh "git push origin master"
sh "git push --tag"
sh "github-release release \
--user cloudfoundry-community --repo traveling-bosh --tag #{tag} \
--name '#{RELEASE_NAME} #{tag}' \
--description '#{RELEASE_DESCRIPTION}'"
end

desc "Upload files to github release"
task :upload_files do
tag = "v#{bosh_cli_version}"

files = Dir["*#{bosh_cli_version}*.tar.gz"]
if files.size == 0
$stderr.puts "Run `rake package` to create packages first"
exit 1
end
files.each do |file|
sh "github-release upload \
--user cloudfoundry-community --repo traveling-bosh --tag #{tag} \
--name #{file} --file #{file}"
end
end

desc "Package and upload"
task :release => ['package', 'create_release', 'upload_files']

namespace :package do
namespace :linux do
desc "Package your app for Linux x86"
Expand Down
2 changes: 1 addition & 1 deletion packaging/wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export BUNDLE_GEMFILE="$SELFDIR/lib/vendor/Gemfile"
unset BUNDLE_IGNORE_CONFIG

# Run the actual app using the bundled Ruby interpreter, with Bundler activated.
exec "$SELFDIR/lib/ruby/bin/ruby" -rbundler/setup lib/vendor/ruby/2.1.0/bin/bosh $@
exec "$SELFDIR/lib/ruby/bin/ruby" -rbundler/setup $SELFDIR/lib/vendor/ruby/2.1.0/bin/bosh $@

0 comments on commit f3fe180

Please sign in to comment.