Skip to content

Commit

Permalink
Merge branch 'wip/ci-fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusDoe committed Nov 12, 2024
2 parents e6792c2 + f8dba45 commit c4330e6
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
accessing
installedVersion
^ ((self project version spec repositorySpecs collect: #createRepository)
detect: [:each | each projectPath = GSSelfUpdater fullRepositoryName])
projectVersion
(self project version spec repositorySpecs collect: #createRepository) do: [:each |
(self installedVersionFromRepository: each) ifNotNil: [:version | ^ version]].
self error:
'Please install git-s via git, either using a Metacello GitHub repository
or by cloning git-s using a git client (e. g. using a GitHub action).'
withoutLineEndings withBlanksCondensed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
accessing
installedVersionFromDirectoryRepository: anMCRepository
| current |
(anMCRepository isKindOf: MCDirectoryRepository) ifFalse: [^ nil].
current := anMCRepository directory asFSReference.
[current isRoot] whileFalse: [ | repository |
repository := GitRepository uninitializedOn: current.
repository exists ifTrue: [^ repository unitOfWork headRef].
current := current parent].
^ nil
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing
installedVersionFromGitHubRepository: anMCRepository
(anMCRepository isKindOf: MCFetchGithubRepository) ifFalse: [^ nil].
anMCRepository projectPath = GSSelfUpdater fullRepositoryName ifFalse: [^ nil].
^ anMCRepository projectVersion
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing
installedVersionFromRepository: each
(self installedVersionFromGitHubRepository: each) ifNotNil: [:version | ^ version].
(self installedVersionFromDirectoryRepository: each) ifNotNil: [:version | ^ version].
^ nil
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
},
"instance" : {
"baseline:" : "mad 10/9/2024 22:23",
"installedVersion" : "mad 10/9/2024 21:00",
"installedVersion" : "mad 10/24/2024 14:25",
"installedVersionFromDirectoryRepository:" : "mad 10/24/2024 14:59",
"installedVersionFromGitHubRepository:" : "mad 10/24/2024 14:27",
"installedVersionFromRepository:" : "mad 10/24/2024 14:26",
"postLoad" : "mad 10/9/2024 19:35",
"projectClass" : "jr 5/4/2017 17:25" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
instance creation
uninitializedOn: aReference
^ self basicNew basicInitializeOn: aReference asFileReference
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
initialize-release
basicInitializeOn: anFSReference
reference := anFSReference.
self initializeCache.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
initialize-release
initializeOn: anFSReference
reference := anFSReference.
self initializeCache.
self gitInitialize
self
basicInitializeOn: anFSReference;
gitInitialize.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
"initialize" : "jr 6/3/2017 12:07",
"memory" : "DamienCassou 2/26/2013 15:53",
"new" : "MaxLeske 8/11/2011 22:15",
"on:" : "CamilloBruni 8/30/2012 13:58" },
"on:" : "CamilloBruni 8/30/2012 13:58",
"uninitializedOn:" : "mad 10/24/2024 14:41" },
"instance" : {
"=" : "CamilloBruni 7/20/2011 13:07",
"addRemote:" : "jr 12/1/2018 23:35",
"baseDir" : "CamilloBruni 7/15/2011 15:40",
"basicInitializeOn:" : "mad 10/24/2024 14:39",
"configAt:ifAbsent:" : "jr 2/23/2020 21:29",
"configFile" : "jr 12/13/2016 17:45",
"configPartsFromSectionLabel:" : "jr 4/13/2017 23:04",
Expand All @@ -26,7 +28,7 @@
"headsDir" : "CamilloBruni 8/9/2011 17:41",
"initializeCache" : "jr 3/10/2020 21:22",
"initializeHEAD" : "CamilloBruni 9/2/2012 11:47",
"initializeOn:" : "jr 3/22/2017 15:12",
"initializeOn:" : "mad 10/24/2024 14:39",
"isInitialized" : "CamilloBruni 9/2/2012 11:33",
"nameOf:in:" : "jr 11/23/2016 18:22",
"newUnitOfWork" : "jr 4/20/2020 21:21",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
requests
getShaOfVersion: aString
^ (WebClient httpGet: (self githubApiUrlForVersion: aString)) content parseAsJson at: 'sha'
| response json |
response := WebClient httpGet: (self githubApiUrlForVersion: aString).
json := response content parseAsJson.
response code = 200 ifFalse: [
^ self error: ('Error while trying to resolve git-s version {1}: {2}'
format: {aString printString. json at: 'message'})].
^ json at: 'sha'
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"branchName:" : "mad 11/4/2024 13:02",
"checkForNewVersion" : "mad 10/25/2024 11:32",
"fullRepositoryName" : "mad 10/9/2024 16:33",
"getShaOfVersion:" : "mad 10/9/2024 18:39",
"getShaOfVersion:" : "mad 10/24/2024 15:07",
"githubApiUrlForVersion:" : "mad 10/9/2024 18:38",
"installScriptForInstalledVersion" : "mad 10/9/2024 16:51",
"installScriptForVersion:" : "mad 10/9/2024 16:50",
Expand Down

0 comments on commit c4330e6

Please sign in to comment.