0.0.12
This commit is contained in:
parent
a2131ec574
commit
f924800387
2 changed files with 40 additions and 10 deletions
48
source/app.d
48
source/app.d
|
@ -63,6 +63,14 @@ int main(string[] args)
|
|||
"must contain an email address"
|
||||
)
|
||||
)
|
||||
.add(new Flag(null, "no-presnag", "Execution without running pre-execution commands")
|
||||
.name("nopre")
|
||||
.optional
|
||||
)
|
||||
.add(new Flag(null, "no-postsnag", "Execution without running post-execution commands")
|
||||
.name("nopost")
|
||||
.optional
|
||||
)
|
||||
)
|
||||
.add(new Command("export", "Export snapshot to a tar.gz archive")
|
||||
.add(new Argument("path", "Output directory path for the archive").required)
|
||||
|
@ -96,6 +104,14 @@ int main(string[] args)
|
|||
"must contain an email address"
|
||||
)
|
||||
)
|
||||
.add(new Flag(null, "no-presnag", "Execution without running pre-execution commands")
|
||||
.name("nopre")
|
||||
.optional
|
||||
)
|
||||
.add(new Flag(null, "no-postsnag", "Execution without running post-execution commands")
|
||||
.name("nopost")
|
||||
.optional
|
||||
)
|
||||
)
|
||||
.add(new Command("list", "List of snapshots")
|
||||
.add(new Flag("c", "comment", "Show comment")
|
||||
|
@ -113,6 +129,14 @@ int main(string[] args)
|
|||
)
|
||||
.add(new Command("restore", "Restore to the specified snapshot state")
|
||||
.add(new Argument("snapshot", "Specify snapshot hash").required)
|
||||
.add(new Flag(null, "no-presnag", "Execution without running pre-execution commands")
|
||||
.name("nopre")
|
||||
.optional
|
||||
)
|
||||
.add(new Flag(null, "no-postsnag", "Execution without running post-execution commands")
|
||||
.name("nopost")
|
||||
.optional
|
||||
)
|
||||
)
|
||||
.add(new Option("c", "config", "Сonfiguration file path")
|
||||
.optional
|
||||
|
@ -147,13 +171,15 @@ int main(string[] args)
|
|||
.on("status", status =>
|
||||
snag.status()
|
||||
)
|
||||
.on("create", create =>
|
||||
.on("create", (create) {
|
||||
create.flag("nopre") || snag.executePreSnag();
|
||||
snag.create(
|
||||
create.option("comment", ""),
|
||||
create.option("author", ""),
|
||||
create.option("email", "")
|
||||
)
|
||||
)
|
||||
);
|
||||
create.flag("nopost") || snag.executePostSnag();
|
||||
})
|
||||
.on("list", list =>
|
||||
snag.list(
|
||||
list.flag("comment"),
|
||||
|
@ -161,23 +187,27 @@ int main(string[] args)
|
|||
list.flag("email")
|
||||
)
|
||||
)
|
||||
.on("restore", restore =>
|
||||
snag.restore(restore.arg("snapshot"))
|
||||
)
|
||||
.on("restore", (restore) {
|
||||
restore.flag("nopre") || snag.executePreSnag();
|
||||
snag.restore(restore.arg("snapshot"));
|
||||
restore.flag("nopost") || snag.executePostSnag();
|
||||
})
|
||||
.on("export", e =>
|
||||
snag.exportSnapshot(
|
||||
e.arg("path"),
|
||||
e.option("snapshot", ""),
|
||||
)
|
||||
)
|
||||
.on("import", i =>
|
||||
.on("import", (i) {
|
||||
i.flag("nopre") || snag.executePreSnag();
|
||||
snag.importSnapshot(
|
||||
i.arg("archive"),
|
||||
i.option("comment", ""),
|
||||
i.option("author", ""),
|
||||
i.option("email", "")
|
||||
)
|
||||
)
|
||||
);
|
||||
i.flag("nopost") || snag.executePostSnag();
|
||||
})
|
||||
.on("rules", (r) {
|
||||
auto rules = new SnagRules(config);
|
||||
r
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module snag.version_;
|
||||
|
||||
enum snagVersion = "0.0.11";
|
||||
enum snagVersion = "0.0.12";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue