actions-updater 0.1.10 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/bin/actions-updater +11 -3
- data/lib/action.rb +2 -3
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dde16c15f62f3b262496566a1d01979a8b768e0c00fdb5602bf5853848538126
|
4
|
+
data.tar.gz: e40574b505bdf564ad184cc2235641f9162f7a77fd13f5be5973aea89aa85baa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6569975e42325ae09b36ab92c65b69b6dd601aadef04e2e795867d014373bef0167c289494c96b18bec436aa53d64896c12aa63451e98fa10e8f6889a223ab86
|
7
|
+
data.tar.gz: 2f2882830a8a11afcd77101af48a697aa0449f6b07119702029937d63412c134c41fc18cdbc8d4617917b38a26f2cb2f2cea6e92b75ee20adcedae4564558805
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.15
|
data/bin/actions-updater
CHANGED
@@ -17,16 +17,24 @@ OptionParser.new do |parser|
|
|
17
17
|
end.parse!
|
18
18
|
|
19
19
|
ARGV.each do |path|
|
20
|
-
puts
|
20
|
+
puts path.magenta
|
21
21
|
yaml = File.read(path)
|
22
22
|
actions = Action.array_from_yaml(yaml)
|
23
23
|
actions.each do |current_action|
|
24
24
|
new_action = current_action.clone
|
25
25
|
new_action.ref = current_action.latest_tag
|
26
|
+
new_ref_str = new_action.ref.bold
|
27
|
+
current_ref_str = current_action.ref.bold
|
28
|
+
current_action_str = current_action.print_without_ref.cyan.bold
|
26
29
|
|
27
|
-
|
30
|
+
if current_action == new_action
|
31
|
+
next if @newer
|
32
|
+
else
|
33
|
+
new_ref_str = new_ref_str.green
|
34
|
+
current_ref_str = current_ref_str.red
|
35
|
+
end
|
28
36
|
|
29
|
-
puts "#{
|
37
|
+
puts "#{current_action_str} : #{current_ref_str} ==> #{new_ref_str}"
|
30
38
|
|
31
39
|
next unless @write
|
32
40
|
|
data/lib/action.rb
CHANGED
@@ -4,7 +4,6 @@ require 'yaml'
|
|
4
4
|
|
5
5
|
class Action
|
6
6
|
attr_accessor :user, :repo, :dir, :ref
|
7
|
-
attr_reader :url
|
8
7
|
|
9
8
|
USES_REGEX = %r{^(?<user>[^/]+)[/](?<repo>[^/]+)[/]?(?<dir>.+)?[@](?<ref>.+)$}.freeze
|
10
9
|
TAGS_REGEX = %r{refs/tags/(.*)$}.freeze
|
@@ -34,7 +33,6 @@ class Action
|
|
34
33
|
@repo = captures['repo']
|
35
34
|
@dir = captures['dir']
|
36
35
|
@ref = captures['ref']
|
37
|
-
@url = "#{DOMAIN}/#{@user}/#{@repo}"
|
38
36
|
end
|
39
37
|
|
40
38
|
def to_s
|
@@ -54,7 +52,8 @@ class Action
|
|
54
52
|
end
|
55
53
|
|
56
54
|
def latest_tag
|
57
|
-
|
55
|
+
url = "#{DOMAIN}/#{@user}/#{@repo}"
|
56
|
+
tags = `git ls-remote -t #{url}`.scan(TAGS_REGEX).flatten
|
58
57
|
tags.reject! do |tag|
|
59
58
|
TAG_REJECT_REASONS.any? do |reason|
|
60
59
|
tag.include?(reason)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actions-updater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dawid Dziurla
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -28,30 +28,30 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
|
-
rubygems_version: 3.0.
|
98
|
+
rubygems_version: 3.0.3
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: Updater of used Github Actions in workflow files
|