From 54a85d47995963b510daf576fc12c2529c4f396f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20M=20G=C3=B3mez?= Date: Tue, 23 Jul 2024 17:05:25 +0100 Subject: [PATCH] bump version (#1247) --- nimble.nimble | 2 +- src/nimblepkg/common.nim | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/nimble.nimble b/nimble.nimble index fe6b48d9..38e6df36 100644 --- a/nimble.nimble +++ b/nimble.nimble @@ -1,6 +1,6 @@ # Package -version = "0.14.2" +version = "0.16.0" author = "Dominik Picheta" description = "Nim package manager." license = "BSD" diff --git a/src/nimblepkg/common.nim b/src/nimblepkg/common.nim index 5966736c..857718b2 100644 --- a/src/nimblepkg/common.nim +++ b/src/nimblepkg/common.nim @@ -21,8 +21,15 @@ type ProcessOutput* = tuple[output: string, exitCode: int] +proc getVersionFromNimble(): string = + const content = staticRead("../../nimble.nimble") + for v in content.splitLines: + if v.startsWith("version"): + return v.split("=")[^1].strip(chars = {' ', '"'}) + error("Failed to get version from nimble.nimble") + const - nimbleVersion* = "0.14.2" + nimbleVersion* = getVersionFromNimble() nimblePackagesDirName* = "pkgs2" nimblePackagesLinksDirName* ="links" nimbleBinariesDirName* = "bin"