-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix BaselineOfGitS>>installedVersion for installing git-s via git in CI
Fixes #33.
- Loading branch information
Showing
9 changed files
with
44 additions
and
9 deletions.
There are no files selected for viewing
9 changes: 6 additions & 3 deletions
9
src/BaselineOfGitS.package/BaselineOfGitS.class/instance/installedVersion.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
10 changes: 10 additions & 0 deletions
10
...eOfGitS.package/BaselineOfGitS.class/instance/installedVersionFromDirectoryRepository..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
5 changes: 5 additions & 0 deletions
5
...lineOfGitS.package/BaselineOfGitS.class/instance/installedVersionFromGitHubRepository..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
5 changes: 5 additions & 0 deletions
5
src/BaselineOfGitS.package/BaselineOfGitS.class/instance/installedVersionFromRepository..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/FileSystem-Git.package/GitRepository.class/class/uninitializedOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
instance creation | ||
uninitializedOn: aReference | ||
^ self basicNew basicInitializeOn: aReference asFileReference |
4 changes: 4 additions & 0 deletions
4
src/FileSystem-Git.package/GitRepository.class/instance/basicInitializeOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
initialize-release | ||
basicInitializeOn: anFSReference | ||
reference := anFSReference. | ||
self initializeCache. |
6 changes: 3 additions & 3 deletions
6
src/FileSystem-Git.package/GitRepository.class/instance/initializeOn..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters