Skip to content

Commit

Permalink
Bump to version 19
Browse files Browse the repository at this point in the history
Dub now requires SemVer so I just added some zeroes
  • Loading branch information
rushsteve1 committed Mar 6, 2023
1 parent 3370b09 commit 2dc1d3f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.directory
*.swp
.vscode
.DS_Store

# Compiled Object files
*.o
Expand Down
4 changes: 2 additions & 2 deletions dub.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"authors": ["Steven vanZyl <[email protected]>"],
"copyright": "Copyright © 2022, Steven vanZyl",
"copyright": "Copyright © 2023, Steven vanZyl",
"description": "A near drop-in replacement for rm that uses the trash bin",
"version": "18",
"version": "19.0.0",
"versionName": "M. Bison",
"license": "MIT",
"name": "trash-d",
Expand Down
9 changes: 5 additions & 4 deletions source/trash/ver.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Version and copyright information that gets bundled in with trash-d

module trash.ver;

import std.conv : to;
import std.format : format;
import std.array;
import std.conv: to;
import std.format: format;
import std.json;

/// The dub.json file inlined as a string
Expand All @@ -25,7 +26,7 @@ const string VER_TEXT = format("trash-d version %s '%s'", VER, VER_NAME);
const string COPY_TEXT = copy_text_from_json();

private int version_from_json() {
return DUB_JSON.parseJSON()["version"].str.to!int;
return DUB_JSON.parseJSON()["version"].str.split(".")[0].to!int;
}

private string version_name_from_json() {
Expand All @@ -48,5 +49,5 @@ This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by %s.", j["copyright"].str, j["license"].str, j["license"].str,
j["homepage"].str, authors);
j["homepage"].str, authors);
}

0 comments on commit 2dc1d3f

Please sign in to comment.