Skip to content

Commit 195d9b6

Browse files
committed
rake tasks to tag the release
1 parent cd8ab87 commit 195d9b6

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

RakeFile

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,16 @@ namespace :source do
6969
info.output_file = PROPS
7070
commit_hash = `git log -1 --format="%H%"`
7171

72-
info.version = info.file_version = get_version
73-
info.informational_version = Platform.config['version']
72+
info.title = Platform.config['assembly_info']['title']
73+
info.version = get_version
74+
info.informational_version = Platform.config['assembly_info']['version']
7475
info.company_name = 'http://fluentnhibernate.org'
7576
info.product_name = 'FluentNHibernate'
7677
info.description = commit_hash[0..(commit_hash.length - 3)]
7778
info.copyright = "Copyright 2008-#{Time.new.year} James Gregory and contributors (Paul Batum, Hudson Akridge et al). All rights reserved."
7879
info.namespaces = ['System.Security']
7980

80-
puts "The new build number is #{info.version}"
81+
puts "The new version is #{info.version}"
8182
end
8283

8384
task :nhibernate_version, :nhibernate_version do |t,args|
@@ -143,6 +144,27 @@ namespace :docs do
143144
end
144145
end
145146

147+
namespace :git do
148+
desc "Tags the current release"
149+
task :tag, :assembly_info do |asm, args|
150+
args.with_defaults(:assembly_info => Platform.config['assembly_info']['version'])
151+
152+
sh "git tag \"v#{args.version}\""
153+
end
154+
155+
desc "Updates the version and tags the release"
156+
task :prep_release, :assembly_info do |task, args|
157+
if !args.version.nil?
158+
task(:update_version).invoke(args.version)
159+
160+
sh "git add #{CONFIG} #{NUSPEC}"
161+
sh "git commit -m \"Updated version to #{args.version}\""
162+
163+
task(:tag).invoke(args.version)
164+
end
165+
end
166+
end
167+
146168
namespace :package do
147169
task :prepare_dist_directory do
148170
FileUtils.rm_rf 'dist'
@@ -239,4 +261,4 @@ task :sln do
239261
Thread.new do
240262
system "devenv #{SLN}"
241263
end
242-
end
264+
end

config.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"framework_version": 4.0,
33
"default_version_number": "2.0.1.0",
4-
"version": "2.0.1-alpha",
4+
"assembly_info":
5+
{
6+
"version": "2.0.1-alpha",
7+
"title": "FluentNHibernate"
8+
},
59
"build":
610
{
711
"nh_precompiler_switch": "4.x",

0 commit comments

Comments
 (0)