Merge pull request #605 from wilzbach/dub-valid-version
Generate a valid version for the DUB build merged-on-behalf-of: Brian Schott <Hackerpilot@users.noreply.github.com>
This commit is contained in:
commit
af0bebd891
6
dub.json
6
dub.json
|
@ -19,5 +19,9 @@
|
||||||
"libddoc" : "~>0.3.0-beta.1",
|
"libddoc" : "~>0.3.0-beta.1",
|
||||||
"stdx-allocator" : "~>2.77.0"
|
"stdx-allocator" : "~>2.77.0"
|
||||||
},
|
},
|
||||||
"targetPath" : "bin"
|
"targetPath" : "bin",
|
||||||
|
"stringImportPaths": ["bin"],
|
||||||
|
"preGenerateCommands": [
|
||||||
|
"rdmd --eval='auto dir=environment.get(`DUB_PACKAGE_DIR`); dir.buildPath(`bin`).mkdirRecurse; auto gitVer = (`git -C `~dir~` describe --tags`).executeShell; (gitVer.status == 0 ? gitVer.output : dir.dirName.baseName.findSplitAfter(environment.get(`DUB_ROOT_PACKAGE`)~`-`)[1]).ifThrown(`0.0.0`).toFile(dir.buildPath(`bin`, `dubhash.txt`));'",
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,10 +10,11 @@ module dscanner.dscanner_version;
|
||||||
*/
|
*/
|
||||||
enum DSCANNER_VERSION = "v0.4.0";
|
enum DSCANNER_VERSION = "v0.4.0";
|
||||||
|
|
||||||
version (Windows)
|
version (built_with_dub)
|
||||||
{
|
{
|
||||||
|
enum GIT_HASH = import("dubhash.txt");
|
||||||
}
|
}
|
||||||
else version (built_with_dub)
|
else version (Windows)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue