0.0.5
This commit is contained in:
parent
a193f53871
commit
fe55e8680f
4 changed files with 24 additions and 13 deletions
3
.vscode/launch.json
vendored
3
.vscode/launch.json
vendored
|
@ -10,7 +10,8 @@
|
|||
"dubBuild": true,
|
||||
"name": "Build & Debug DUB project",
|
||||
"cwd": "${command:dubWorkingDirectory}",
|
||||
"program": "bin/${command:dubTarget}"
|
||||
"program": "bin/${command:dubTarget}",
|
||||
"args": ["list"]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"git": "/tmp/testgit",
|
||||
"project": "/home/alexander/Programming/new/dlang/snag/source",
|
||||
"project": "/tmp/test",
|
||||
"email": "user@site.domain",
|
||||
"user": "snag",
|
||||
"presnag": [
|
||||
|
|
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