0.0.5
This commit is contained in:
parent
a193f53871
commit
fe55e8680f
4 changed files with 24 additions and 13 deletions
30
source/app.d
30
source/app.d
|
@ -12,6 +12,10 @@ int main(string[] args)
|
|||
.add(new Command("init", "Initializing the repository for storing snapshots"))
|
||||
.add(new Command("status", "Checking the status of tracked files"))
|
||||
.add(new Command("create", "Create a new backup"))
|
||||
.add(new Command("list", "List of backups"))
|
||||
.add(new Command("restore", "Restore to the specified snapshot state")
|
||||
.add(new Argument("hash", "hash").required)
|
||||
)
|
||||
.add(new Option("c", "config", "Сonfiguration file path")
|
||||
.optional
|
||||
.validateEachWith(
|
||||
|
@ -33,18 +37,24 @@ int main(string[] args)
|
|||
}
|
||||
|
||||
auto snag = new Snag(config);
|
||||
|
||||
import std.stdio;
|
||||
try {
|
||||
argumets
|
||||
.on("init", (init) {
|
||||
snag.initialize();
|
||||
})
|
||||
.on("status", (status) {
|
||||
snag.status();
|
||||
})
|
||||
.on("create", (create) {
|
||||
snag.create();
|
||||
});
|
||||
.on("init", init =>
|
||||
snag.initialize()
|
||||
)
|
||||
.on("status", status =>
|
||||
snag.status()
|
||||
)
|
||||
.on("create", create =>
|
||||
snag.create()
|
||||
)
|
||||
.on("list", list =>
|
||||
snag.list()
|
||||
)
|
||||
.on("restore", restore =>
|
||||
snag.restore(restore.arg("hash"))
|
||||
);
|
||||
} catch (SnagException e) {
|
||||
e.print();
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module snag.version_;
|
||||
|
||||
enum snagVersion = "0.0.4";
|
||||
enum snagVersion = "0.0.5";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue