-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
#!/usr/bin/env ruby | ||
require 'turbulence' | ||
require 'turbulence/checks_environment' | ||
#!/usr/bin/env ruby_executable_hooks | ||
# | ||
# This file was generated by RubyGems. | ||
# | ||
# The application 'turbulence' is installed as part of a gem, and | ||
# this file is here to facilitate running it. | ||
# | ||
|
||
cli = Turbulence::CommandLineInterface.new(ARGV) | ||
require 'rubygems' | ||
|
||
unless Turbulence::ChecksEnvironment.scm_repo?(Dir.pwd) | ||
STDERR.puts "Turbulence could not calculate metrics, as we could not find a repository in the current directory." | ||
STDERR.puts "Please run bule from inside a repository." | ||
exit | ||
version = ">= 0" | ||
|
||
if ARGV.first | ||
str = ARGV.first | ||
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding | ||
if str =~ /\A_(.*)_\z/ | ||
version = $1 | ||
ARGV.shift | ||
end | ||
end | ||
|
||
cli.generate_bundle | ||
cli.open_bundle | ||
gem 'turbulence', version | ||
load Gem.bin_path('turbulence', 'bule', version) |