makit 0.0.49 → 0.0.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/makit/version.rb +11 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64340bba48407ffa89557a7b90cb32f85edc071c929b69ab4d0aab8766485344
|
4
|
+
data.tar.gz: aa84958ecdd413fe6d9648c8b405c47831998f123b539139a185ec6d0d577ab7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d45e02545c54fa25d33aa38a9a7f662f6ef1be87f2bae21a218a28f9e87814c53ee5f743b2bd5e379a62774e52085a55f447edec23817845d97fe4513c37444e
|
7
|
+
data.tar.gz: df50c413323903f11c776fe1deac3bca58c5d9c4a0c87081417ae553d5fff06ed7f82dcbac0c5b7b334eb3df3900ccc9fa581f52c659673829d29e727fb4595d
|
data/lib/makit/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Makit
|
4
|
-
VERSION = "0.0.
|
4
|
+
VERSION = "0.0.50"
|
5
5
|
|
6
6
|
class Version
|
7
7
|
# given an array of version strings, return the highest version
|
@@ -9,6 +9,13 @@ module Makit
|
|
9
9
|
versions.sort { |a, b| Gem::Version.new(a) <=> Gem::Version.new(b) }.last
|
10
10
|
end
|
11
11
|
|
12
|
+
|
13
|
+
# example content from .gitlab-ci.yml
|
14
|
+
#variables:
|
15
|
+
# VERSION: "0.0.26" # Define the version here
|
16
|
+
|
17
|
+
|
18
|
+
|
12
19
|
def self.get_version_from_file(path)
|
13
20
|
if (!File.exist?(path))
|
14
21
|
raise "file #{path}does not exist"
|
@@ -24,6 +31,8 @@ module Makit
|
|
24
31
|
Makit::Version.detect_from_file(path, /<Version>([-\w\d.]+)</)
|
25
32
|
when ".wxs"
|
26
33
|
Makit::Version.detect_from_file(path, / Version="([\d\.]+)"/)
|
34
|
+
when ".yml"
|
35
|
+
Makit::Version.detect_from_file(path, /VERSION:\s?(['|"])([\d\.]+)\1/)
|
27
36
|
else
|
28
37
|
raise "unrecognized file type"
|
29
38
|
end
|
@@ -41,6 +50,7 @@ module Makit
|
|
41
50
|
def self.set_version_in_file(filename, version)
|
42
51
|
text = IO.read(filename)
|
43
52
|
new_text = text
|
53
|
+
new_text = text.gsub(/VERSION:\s?['|"]([.\d]+)['|"]/, "VERSION: \"#{version}\"") if filename.include?(".yml")
|
44
54
|
new_text = text.gsub(/version\s?=\s?['|"]([.\d]+)['|"]/, "version='#{version}'") if filename.include?(".gemspec")
|
45
55
|
new_text = text.gsub(/<Version>([-\w\d.]+)</, "<Version>#{version}<") if filename.include?(".csproj")
|
46
56
|
new_text = text.gsub(/<version>([-\w\d.]+)</, "<version>#{version}<") if filename.include?(".nuspec")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: makit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.50
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lou Parslow
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|