origen 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/version.rb +1 -1
- data/lib/origen/application.rb +3 -1
- data/lib/origen/revision_control/git.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7890471b8ec2f67729fe1f77eb91bc06203fd708
|
4
|
+
data.tar.gz: 46e1254090dfd0a60417b29877d4fd8fe6903b45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48539a0c1c7d0dd911d39c896a6510ad88cda19aec158c94241032337d3977439574b7c827f653a382dea13c96652c6b0f55f0bb363428bdf8e622c792424962
|
7
|
+
data.tar.gz: 1d3cc10f4d91369a046bed8a86fe77cecaffeff7f8b6c1644d542b146718b0620cecfeea8bd07b8d368b38b497f71586d9546e51744f45479ccbcff0676ab170
|
data/config/version.rb
CHANGED
data/lib/origen/application.rb
CHANGED
@@ -111,7 +111,9 @@ module Origen
|
|
111
111
|
elsif config.rc_url =~ /git/
|
112
112
|
@revision_controller ||= RevisionControl::Git.new(
|
113
113
|
local: root,
|
114
|
-
|
114
|
+
# If a workspace is based on a fork of the master repo, config.rc_url may not
|
115
|
+
# be correct
|
116
|
+
remote: RevisionControl::Git.origin || config.rc_url
|
115
117
|
)
|
116
118
|
|
117
119
|
end
|
@@ -1,6 +1,16 @@
|
|
1
1
|
module Origen
|
2
2
|
module RevisionControl
|
3
3
|
class Git < Base
|
4
|
+
# Returns the origin for the PWD
|
5
|
+
def self.origin
|
6
|
+
git('remote --verbose', verbose: false).each do |remote|
|
7
|
+
if remote =~ /^origin\s+([^\s]+)/
|
8
|
+
return Regexp.last_match(1)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
nil
|
12
|
+
end
|
13
|
+
|
4
14
|
def build(options = {})
|
5
15
|
if Dir["#{local}/*"].empty? || options[:force]
|
6
16
|
FileUtils.rm_rf(local.to_s)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: origen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen McGinty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|