Starting Gitea repositories baseline loading implementation.
This commit is contained in:
parent
626cd86175
commit
06f59c71be
14
src/ExoRepo/Gofer.extension.st
Normal file
14
src/ExoRepo/Gofer.extension.st
Normal file
@ -0,0 +1,14 @@
|
||||
Extension { #name : #Gofer }
|
||||
|
||||
{ #category : #'*ExoRepo' }
|
||||
Gofer >> repositories [
|
||||
"Answer the configured monticello repositories."
|
||||
|
||||
| result |
|
||||
result := OrderedCollection withAll: repositories.
|
||||
packageCacheRepository ifNotNil: [ result addFirst: packageCacheRepository ].
|
||||
^ result asArray collect: [:each |
|
||||
(each class = MCHttpRepository and: [each location beginsWith: 'gitea'])
|
||||
ifTrue: [ MCRepository fromUrl: each location ] ifFalse: [ each ]
|
||||
].
|
||||
]
|
@ -14,6 +14,21 @@ MCGiteabRepository class >> basicFromUrl: aZnUrl [
|
||||
^ self location: aZnUrl asString
|
||||
]
|
||||
|
||||
{ #category : #'*ExoRepo' }
|
||||
MCGiteabRepository class >> createRepositoryFromSpec: aMetacelloRepositorySpec on: anIceMetacelloPharoPlatform [
|
||||
^ anIceMetacelloPharoPlatform createGiteaRepository: aMetacelloRepositorySpec
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
MCGiteabRepository class >> isAvailableFor: type [
|
||||
^ type = 'gitea'
|
||||
]
|
||||
|
||||
{ #category : #private }
|
||||
MCGiteabRepository class >> projectZipUrlFor: projectPath versionString: versionString [
|
||||
^ 'https://' , projectPath , '/archive/' , versionString , '.zip'
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
MCGiteabRepository class >> urlSchemes [
|
||||
^ #(gitea)
|
||||
@ -39,6 +54,23 @@ MCGiteabRepository >> branches [
|
||||
^ response
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
MCGiteabRepository >> calculateRepositoryDirectory [
|
||||
| directory |
|
||||
|
||||
directory := self class
|
||||
projectDirectoryFrom: self projectPath, '/', self repoPath
|
||||
version: self projectVersion.
|
||||
self repoPath isEmpty ifFalse: [
|
||||
directory := directory parent ].
|
||||
|
||||
^ directory
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
MCGiteabRepository >> location: aString [
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
MCGiteabRepository >> projectVersion [
|
||||
(projectVersion == nil or: [ projectVersion isEmpty ])
|
||||
|
6
src/ExoRepo/MCGiteabRepository.extension.st
Normal file
6
src/ExoRepo/MCGiteabRepository.extension.st
Normal file
@ -0,0 +1,6 @@
|
||||
Extension { #name : #MCGiteabRepository }
|
||||
|
||||
{ #category : #'*ExoRepo' }
|
||||
MCGiteabRepository class >> createRepositoryFromSpec: aMetacelloRepositorySpec on: anIceMetacelloPharoPlatform [
|
||||
^ anIceMetacelloPharoPlatform createGiteaRepository: aMetacelloRepositorySpec
|
||||
]
|
15
src/ExoRepo/MetacelloCommonMCSpecLoader.extension.st
Normal file
15
src/ExoRepo/MetacelloCommonMCSpecLoader.extension.st
Normal file
@ -0,0 +1,15 @@
|
||||
Extension { #name : #MetacelloCommonMCSpecLoader }
|
||||
|
||||
{ #category : #'*ExoRepo' }
|
||||
MetacelloCommonMCSpecLoader >> linearLoadPackageSpecs: packageSpecs repositories: repositories [
|
||||
|
||||
| gofer sanitizedRepos |
|
||||
gofer := MetacelloGofer new.
|
||||
sanitizedRepos := OrderedCollection withAll: repositories.
|
||||
sanitizedRepos := sanitizedRepos collect: [:each |
|
||||
(each class = MCHttpRepository and: [each location beginsWith: 'gitea'])
|
||||
ifTrue: [ MCRepository fromUrl: each location ] ifFalse: [ each ]
|
||||
].
|
||||
sanitizedRepos do: [:repo | gofer repository: repo ].
|
||||
packageSpecs do: [:pkg | pkg loadUsing: self gofer: gofer ].
|
||||
]
|
@ -1,5 +1,13 @@
|
||||
Extension { #name : #MetacelloPlatform }
|
||||
|
||||
{ #category : #'*ExoRepo' }
|
||||
MetacelloPlatform >> createGiteaRepository: aRepositorySpec [
|
||||
| cl |
|
||||
|
||||
cl := MCGiteabRepository.
|
||||
^ cl location: aRepositorySpec description
|
||||
]
|
||||
|
||||
{ #category : #'*ExoRepo' }
|
||||
MetacelloPlatform >> extractTypeFromDescription: description [
|
||||
description == nil
|
||||
|
Loading…
Reference in New Issue
Block a user