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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cdb741aab26127261ac1b0ab4f5ac223efb3a334
4
- data.tar.gz: d48c4c6494a7c32732ce4305d36dc5bafbfbad02
3
+ metadata.gz: 7890471b8ec2f67729fe1f77eb91bc06203fd708
4
+ data.tar.gz: 46e1254090dfd0a60417b29877d4fd8fe6903b45
5
5
  SHA512:
6
- metadata.gz: 66b4cd9a2872c4bd6e63f71dc48a2799dc843f0c5de477708fd502462fde0c7e4bba209233b8581425d853ff28814e9a70aad1d63c9c7c998b1af7335c9918c5
7
- data.tar.gz: 0d342df42ce048de8392a03b37b0b2a14dbe4ec9eb7f4547914488cb46dee7c8ca8aa337ee8ffc17f92a954e15aa12292e5205a84e98fb82c620692b51931d44
6
+ metadata.gz: 48539a0c1c7d0dd911d39c896a6510ad88cda19aec158c94241032337d3977439574b7c827f653a382dea13c96652c6b0f55f0bb363428bdf8e622c792424962
7
+ data.tar.gz: 1d3cc10f4d91369a046bed8a86fe77cecaffeff7f8b6c1644d542b146718b0620cecfeea8bd07b8d368b38b497f71586d9546e51744f45479ccbcff0676ab170
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Origen
2
2
  MAJOR = 0
3
3
  MINOR = 5
4
- BUGFIX = 6
4
+ BUGFIX = 7
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -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
- remote: config.rc_url
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.6
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-09-25 00:00:00.000000000 Z
11
+ date: 2015-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport