Skip to content

Commit

Permalink
Simplified build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Ghionoiu committed Oct 16, 2015
1 parent 96ed9de commit cad9282
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 0 additions & 7 deletions lib/tdl/version.rb
Expand Up @@ -2,11 +2,4 @@ module TDL
PREVIOUS_VERSION = '0.1.2'
# the current MAJOR.MINOR version is dynamically computed from the version of the Spec
CURRENT_PATCH_VERSION = '3'

def TDL.version
spec_folder = File.expand_path('../../../features/spec',__FILE__).to_s
# puts "Spec folder is: #{spec_folder}"
major_minor_version = `git --git-dir #{spec_folder}/.git describe --all | cut -d '/' -f 2 | tr -d 'v'`.strip
"#{major_minor_version}.#{TDL::CURRENT_PATCH_VERSION}"
end
end
7 changes: 6 additions & 1 deletion tdl-client-ruby.gemspec
Expand Up @@ -3,9 +3,14 @@ lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'tdl/version'

SPEC_FOLDER = File.expand_path('../features/spec',__FILE__).to_s
puts "Spec folder is: #{SPEC_FOLDER}"
MAJOR_MINOR_VERSION = `git --git-dir #{SPEC_FOLDER}/.git describe --all | cut -d '/' -f 2 | tr -d 'v'`.strip
VERSION = "#{MAJOR_MINOR_VERSION}.#{TDL::CURRENT_PATCH_VERSION}"

Gem::Specification.new do |spec|
spec.name = 'tdl-client-ruby'
spec.version = TDL.version
spec.version = VERSION
spec.authors = ['Julian Ghionoiu']
spec.email = ['iulian.ghionoiu@gmail.com']

Expand Down

0 comments on commit cad9282

Please sign in to comment.