gjp 0.24.0 → 0.25.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/gjp/cli.rb +4 -4
- data/lib/gjp/project.rb +4 -4
- data/lib/gjp/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -95,7 +95,7 @@ At this point `gjp` restored `src/` as it was before the build while taking note
|
|
95
95
|
|
96
96
|
Note that, if the build was unsusccesful, the following command can be used to cancel it and return to pre-dry running state:
|
97
97
|
|
98
|
-
gjp finish --
|
98
|
+
gjp finish --abort
|
99
99
|
|
100
100
|
#### Generating a build script
|
101
101
|
|
data/lib/gjp/cli.rb
CHANGED
@@ -54,7 +54,7 @@ module Gjp
|
|
54
54
|
puts "Now dry-running, please start your build."
|
55
55
|
puts "To run a Maven installation from the kit, use \"gjp mvn\"."
|
56
56
|
puts "If the build succeedes end this dry run with \"gjp finish\"."
|
57
|
-
puts "If the build does not succeed use \"gjp finish --
|
57
|
+
puts "If the build does not succeed use \"gjp finish --abort\" to restore files."
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
@@ -93,11 +93,11 @@ module Gjp
|
|
93
93
|
end
|
94
94
|
|
95
95
|
subcommand "finish", "Ends the current dry-run" do
|
96
|
-
option ["-f", "--
|
96
|
+
option ["-f", "--abort"], :flag, "build abort, restore files as before dry-run"
|
97
97
|
def execute
|
98
98
|
checking_exceptions do
|
99
|
-
if Gjp::Project.new(".").finish(
|
100
|
-
if
|
99
|
+
if Gjp::Project.new(".").finish(abort?)
|
100
|
+
if abort?
|
101
101
|
puts "Project reverted as before dry-run."
|
102
102
|
else
|
103
103
|
puts "Dry-run finished."
|
data/lib/gjp/project.rb
CHANGED
@@ -100,11 +100,11 @@ module Gjp
|
|
100
100
|
end
|
101
101
|
|
102
102
|
# ends a dry-run.
|
103
|
-
# if
|
104
|
-
# if
|
105
|
-
def finish(
|
103
|
+
# if abort is true, reverts the whole directory
|
104
|
+
# if abort is false, reverts sources and updates output file lists
|
105
|
+
def finish(abort)
|
106
106
|
if is_dry_running
|
107
|
-
if
|
107
|
+
if abort
|
108
108
|
@git.revert_whole_directory(".", latest_tag(:dry_run_started))
|
109
109
|
@git.delete_tag(latest_tag(:dry_run_started))
|
110
110
|
else
|
data/lib/gjp/version.rb
CHANGED