huginn_github_autocommit_agent 0.1.0 → 0.1.1
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 00bcbaf914067d7b8f992dc30dd42dcbbb0c0a5c316ddbb66eec5b380c24f8b0
|
|
4
|
+
data.tar.gz: 7e99f410b57240a7172c792ed47bc1859275c95048ea9858f7813a05dc0aae75
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a74d41c1a171401e0c3ec2ce599e2d179df7b4b5f3e08dcdb58d3665d9132cdddc2c12e2d3f75ae92ed73495ac65e4b1cd1ed376254c9a4e2ab273d0510d8fd1
|
|
7
|
+
data.tar.gz: e2c0a2c8ea26d91b9a8ded086c0f996922b5376c48466446d222a16c216a0d01162e855d746090b97d2eb5328712197db2427cd1d6b00399e39a89a2e246ebd1
|
|
@@ -261,8 +261,12 @@ module Agents
|
|
|
261
261
|
|
|
262
262
|
file_content = Base64.decode64(file_content_base64)
|
|
263
263
|
current_version = file_content.match(/^ENV #{to_apply['pattern']} (.*)/)
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
v1 = Gem::Version.new(interpolated['version'].gsub(/^v/i, ''))
|
|
265
|
+
v2 = Gem::Version.new(current_version.to_s.split.last.gsub(/^v/i, ''))
|
|
266
|
+
comparison_result = v1 <=> v2
|
|
267
|
+
|
|
268
|
+
if comparison_result == 0 || comparison_result == -1
|
|
269
|
+
log "The current version (#{current_version.to_s.split.last}) is already greater than or equal to the given version (#{interpolated['version']}). No replacement necessary."
|
|
266
270
|
else
|
|
267
271
|
file_content.gsub!(/^ENV #{to_apply['pattern']}.*/, "ENV #{to_apply['pattern']} #{interpolated['version']}")
|
|
268
272
|
update_content(to_apply['owner'],to_apply['my_repository'],to_apply['file'],file_content,sha)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: huginn_github_autocommit_agent
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nicolas Germain
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-12-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|