Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No need of monticello dependency to get package repository #1501

Merged
merged 1 commit into from
Dec 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 10 additions & 23 deletions src/BaselineOfSpec2/BaselineOfSpec2.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,6 @@ BaselineOfSpec2 >> defaultRepositoryURL [
ifAbsent: [ 'github://pharo-spec/Spec' ]
]

{ #category : 'external projects' }
BaselineOfSpec2 >> packageRepository [

" Tries to determine a repository from which the baseline is being loaded. Useful for
refering other baselines in the same repository. "

^ (self class package mcWorkingCopy repositoryGroup repositories
reject: [:each | each = MCCacheRepository uniqueInstance])
ifNotEmpty: [ :repositories |
repositories
detect: [ :each | each description beginsWith: 'tonel://' ]
ifNone: [ repositories anyOne ] ]
ifEmpty: [ nil ]
]

{ #category : 'accessing' }
BaselineOfSpec2 >> project [
"Atomic loading is needed for Spec because we are moving classes of package and it breaks their subclasses.
Expand Down Expand Up @@ -103,18 +88,20 @@ We need to use atomic loading only during update of existing Spec upgrade"
{ #category : 'external projects' }
BaselineOfSpec2 >> specCore: spec [

spec baseline: 'SpecCore' with: [
spec
repository: (self packageRepositoryURL ifEmpty: [ self defaultRepositoryURL ]);
loads: #('Base' 'Tests') ]
spec baseline: 'SpecCore' with: [
spec
repository: ((self packageRepositoryURLForSpec: spec) ifEmpty: [
self defaultRepositoryURL ]);
loads: #( 'Base' 'Tests' ) ]
]

{ #category : 'external projects' }
BaselineOfSpec2 >> specCoreCode: spec [

spec baseline: 'SpecCoreCode' with: [
spec
repository: (self packageRepositoryURL ifEmpty: [ self defaultRepositoryURL ]);
spec baseline: 'SpecCoreCode' with: [
spec
repository: ((self packageRepositoryURLForSpec: spec) ifEmpty: [
self defaultRepositoryURL ]);
className: 'BaselineOfSpecCore';
loads: #('Code' 'CodeTests') ]
loads: #( 'Code' 'CodeTests' ) ]
]
Loading