actions-updater 0.1.9 → 0.1.14
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/VERSION +1 -1
- data/bin/actions-updater +11 -3
- data/lib/action.rb +2 -3
- metadata +44 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06c97dba277d9d25d568611e0f1d74ab27e5765e124d91f8db9f3d37d718eb9f
|
4
|
+
data.tar.gz: 531489c39cc86fd0eab53b3875be4534e251c76937b77ebf4cd727a27ff11ddd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e599b16b79cb9df6e5cc69f7e753c211f4f3efb4032da74190588a54c23e17d24607bd1062c4eb576f01030cc3305b7a370377f1d411b6bb2eb5248f11bbae9e
|
7
|
+
data.tar.gz: a06d82c6bce77879430f86b93f8d80a4fadf4003791f2439551e8389e98ef3aba20a601a0f7c966b657bbe30627a655d2d6f64fb688e40db719afa5001b4d569
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.14
|
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.14
|
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
|
@@ -24,6 +24,48 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.8'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '13.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '13.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
27
69
|
description:
|
28
70
|
email:
|
29
71
|
executables:
|