flit 0.3.pre → 0.3.1.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/flit/commands/version.rb +18 -1
- data/lib/flit/hooks.rb +1 -1
- data/lib/flit/version.rb +1 -1
- metadata +3 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.pre
|
1
|
+
0.3.1.pre
|
@@ -1,10 +1,27 @@
|
|
1
1
|
module Flit
|
2
2
|
module Commands
|
3
3
|
class Version
|
4
|
-
DESC = "Mark the current commit as a new version"
|
4
|
+
DESC = "Mark the current commit as a new version. Creates a new annotated tag."
|
5
|
+
USAGE = "VERSION [MESSAGE]"
|
6
|
+
OPTIONS = {
|
7
|
+
:version => "Should be a version string in the form X.Y.Z",
|
8
|
+
:message => "An optional message to add to the tag. Defaults to 'Bump to X.Y.Z'"
|
9
|
+
}
|
5
10
|
|
6
11
|
def run(args)
|
12
|
+
# Gatekeepers
|
13
|
+
fatal "directory isn't a flit repository" unless is_flit?
|
14
|
+
show_help unless args.count >= 1
|
7
15
|
|
16
|
+
Hooks.fire :didStartCommand__version
|
17
|
+
|
18
|
+
config = open_config
|
19
|
+
version, message = args
|
20
|
+
message ||= "Bump to #{config[:tags][:version_prefix]}#{version}"
|
21
|
+
|
22
|
+
`git tag -a #{config[:tags][:version_prefix]}#{version} -m "#{message}"`
|
23
|
+
|
24
|
+
Hooks.fire :didFinishCommand__version
|
8
25
|
end
|
9
26
|
|
10
27
|
end
|
data/lib/flit/hooks.rb
CHANGED
data/lib/flit/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
+
- 1
|
8
9
|
- pre
|
9
|
-
version: 0.3.pre
|
10
|
+
version: 0.3.1.pre
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Matt Kirman
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
+
date: 2010-09-03 00:00:00 +01:00
|
18
19
|
default_executable: flit
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|