avm-git 0.13.0 → 0.13.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c527e07290b2c56ad8f4aeb91cdbb3b0f78223dc34c9babf50f372573555d79
|
4
|
+
data.tar.gz: f9cf685952de778334ce13137152065a246bbcd0b95135b627439fee1fdd2a8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2685abcc268908517117700c16217f2bd928e0eadb0564f81e7702dd20a7a0fef4273178ebbe7c9baf4b12c93e7c5b0bd2e7e2e1773c6b97d9d1d3d8d2b063ba
|
7
|
+
data.tar.gz: f72d76691c1d21a09fbcb7e2c9f73f802f168734e34575e5c7e3a55f2401005d99b6492739f9a467e7fea30ce13d611f64e1b1a19b41f78ca344c3a474321f2b
|
@@ -15,6 +15,8 @@ module Avm
|
|
15
15
|
CHECKERS = %w[remote_url remote_fetch publish_remote_no_exist remote_equal remote_following
|
16
16
|
local_following].freeze
|
17
17
|
|
18
|
+
DEFAULT_REMOTE_REF = 'master'
|
19
|
+
|
18
20
|
REMOTE_UNAVAILABLE_MESSAGES = ['could not resolve host', 'connection timed out',
|
19
21
|
'no route to host'].map(&:downcase).freeze
|
20
22
|
|
@@ -108,7 +110,7 @@ module Avm
|
|
108
110
|
|
109
111
|
def remote_sha_uncached
|
110
112
|
remote_fetch
|
111
|
-
b = sgit.git.branches["#{remote_name}
|
113
|
+
b = sgit.git.branches["#{remote_name}/#{remote_ref}"]
|
112
114
|
b ? b.gcommit.sha : nil
|
113
115
|
end
|
114
116
|
|
@@ -119,6 +121,11 @@ module Avm
|
|
119
121
|
def remote_name
|
120
122
|
::Avm::Git::Launcher::WarpBase::TARGET_REMOTE
|
121
123
|
end
|
124
|
+
|
125
|
+
# @return [String]
|
126
|
+
def remote_ref
|
127
|
+
DEFAULT_REMOTE_REF
|
128
|
+
end
|
122
129
|
end
|
123
130
|
end
|
124
131
|
end
|
@@ -7,6 +7,23 @@ module Avm
|
|
7
7
|
module LauncherStereotypes
|
8
8
|
class GitSubrepo
|
9
9
|
class Publish < ::Avm::Git::Launcher::PublishBase
|
10
|
+
# @return [Pathname]
|
11
|
+
def config_path
|
12
|
+
instance.parent.warped.to_pathname.join(
|
13
|
+
"./#{instance.to_parent_path}",
|
14
|
+
::Avm::Git::LauncherStereotypes::GitSubrepo::CONFIG_SUBPATH
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# @return [EacGit::Local::Subrepo::Config]
|
19
|
+
def config
|
20
|
+
::EacGit::Local::Subrepo::Config.from_file(config_path)
|
21
|
+
end
|
22
|
+
|
23
|
+
# @return [String]
|
24
|
+
def remote_ref
|
25
|
+
config.remote_branch || super
|
26
|
+
end
|
10
27
|
end
|
11
28
|
end
|
12
29
|
end
|
@@ -11,9 +11,11 @@ module Avm
|
|
11
11
|
require_sub __FILE__
|
12
12
|
include Avm::Launcher::Stereotype
|
13
13
|
|
14
|
+
CONFIG_SUBPATH = '.gitrepo'
|
15
|
+
|
14
16
|
class << self
|
15
17
|
def match?(path)
|
16
|
-
File.exist?(path.real.subpath(
|
18
|
+
File.exist?(path.real.subpath(CONFIG_SUBPATH)) && subrepo_url(path.real) != 'none'
|
17
19
|
end
|
18
20
|
|
19
21
|
def color
|
@@ -21,7 +23,7 @@ module Avm
|
|
21
23
|
end
|
22
24
|
|
23
25
|
def subrepo_url(path)
|
24
|
-
File.read(path.subpath(
|
26
|
+
File.read(path.subpath(CONFIG_SUBPATH)).each_line do |l|
|
25
27
|
m = /remote\s*=\s(.+)/.match(l)
|
26
28
|
return m[1] if m
|
27
29
|
end
|
data/lib/avm/git/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avm-git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Put here the authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.64'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.64.2
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,6 +27,9 @@ dependencies:
|
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '0.64'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.64.2
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: avm-files
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,20 +84,14 @@ dependencies:
|
|
78
84
|
requirements:
|
79
85
|
- - "~>"
|
80
86
|
- !ruby/object:Gem::Version
|
81
|
-
version: '1.
|
82
|
-
- - ">="
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
version: 1.17.2
|
87
|
+
version: '1.18'
|
85
88
|
type: :runtime
|
86
89
|
prerelease: false
|
87
90
|
version_requirements: !ruby/object:Gem::Requirement
|
88
91
|
requirements:
|
89
92
|
- - "~>"
|
90
93
|
- !ruby/object:Gem::Version
|
91
|
-
version: '1.
|
92
|
-
- - ">="
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: 1.17.2
|
94
|
+
version: '1.18'
|
95
95
|
- !ruby/object:Gem::Dependency
|
96
96
|
name: aranha-parsers
|
97
97
|
requirement: !ruby/object:Gem::Requirement
|