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"
|
"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 Command("export", "Export snapshot to a tar.gz archive")
|
||||||
.add(new Argument("path", "Output directory path for the archive").required)
|
.add(new Argument("path", "Output directory path for the archive").required)
|
||||||
|
@ -96,6 +104,14 @@ int main(string[] args)
|
||||||
"must contain an email address"
|
"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 Command("list", "List of snapshots")
|
||||||
.add(new Flag("c", "comment", "Show comment")
|
.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 Command("restore", "Restore to the specified snapshot state")
|
||||||
.add(new Argument("snapshot", "Specify snapshot hash").required)
|
.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")
|
.add(new Option("c", "config", "Сonfiguration file path")
|
||||||
.optional
|
.optional
|
||||||
|
@ -147,13 +171,15 @@ int main(string[] args)
|
||||||
.on("status", status =>
|
.on("status", status =>
|
||||||
snag.status()
|
snag.status()
|
||||||
)
|
)
|
||||||
.on("create", create =>
|
.on("create", (create) {
|
||||||
|
create.flag("nopre") || snag.executePreSnag();
|
||||||
snag.create(
|
snag.create(
|
||||||
create.option("comment", ""),
|
create.option("comment", ""),
|
||||||
create.option("author", ""),
|
create.option("author", ""),
|
||||||
create.option("email", "")
|
create.option("email", "")
|
||||||
)
|
);
|
||||||
)
|
create.flag("nopost") || snag.executePostSnag();
|
||||||
|
})
|
||||||
.on("list", list =>
|
.on("list", list =>
|
||||||
snag.list(
|
snag.list(
|
||||||
list.flag("comment"),
|
list.flag("comment"),
|
||||||
|
@ -161,23 +187,27 @@ int main(string[] args)
|
||||||
list.flag("email")
|
list.flag("email")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.on("restore", restore =>
|
.on("restore", (restore) {
|
||||||
snag.restore(restore.arg("snapshot"))
|
restore.flag("nopre") || snag.executePreSnag();
|
||||||
)
|
snag.restore(restore.arg("snapshot"));
|
||||||
|
restore.flag("nopost") || snag.executePostSnag();
|
||||||
|
})
|
||||||
.on("export", e =>
|
.on("export", e =>
|
||||||
snag.exportSnapshot(
|
snag.exportSnapshot(
|
||||||
e.arg("path"),
|
e.arg("path"),
|
||||||
e.option("snapshot", ""),
|
e.option("snapshot", ""),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.on("import", i =>
|
.on("import", (i) {
|
||||||
|
i.flag("nopre") || snag.executePreSnag();
|
||||||
snag.importSnapshot(
|
snag.importSnapshot(
|
||||||
i.arg("archive"),
|
i.arg("archive"),
|
||||||
i.option("comment", ""),
|
i.option("comment", ""),
|
||||||
i.option("author", ""),
|
i.option("author", ""),
|
||||||
i.option("email", "")
|
i.option("email", "")
|
||||||
)
|
);
|
||||||
)
|
i.flag("nopost") || snag.executePostSnag();
|
||||||
|
})
|
||||||
.on("rules", (r) {
|
.on("rules", (r) {
|
||||||
auto rules = new SnagRules(config);
|
auto rules = new SnagRules(config);
|
||||||
r
|
r
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
module snag.version_;
|
module snag.version_;
|
||||||
|
|
||||||
enum snagVersion = "0.0.11";
|
enum snagVersion = "0.0.12";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue