Skip to content

Commit

Permalink
IOS-8414: Fix submodule update in PrepareRelease
Browse files Browse the repository at this point in the history
  • Loading branch information
JPedroAmorim committed Apr 3, 2024
1 parent 886fe7b commit 6f1d8e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/ReleaseScripts/PrepareRelease/Sources/git.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ func fetchOriginForSubmodules() throws {
try runInShell("git submodule foreach 'git fetch origin'")
}

func updateSubmodules() throws {
try runInShell("git submodule update --init --recursive")
func updateSubmodule(submodule: Submodule) throws {
try runInShell("git submodule update --init", cwd: URL(fileURLWithPath: submodule.path))
}

func checkoutSubmoduleToCommit(submodule: Submodule, commitHash: String) throws {
Expand Down
7 changes: 5 additions & 2 deletions scripts/ReleaseScripts/PrepareRelease/Sources/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ do {
log("Fetching origin for git submodules")
try fetchOriginForSubmodules()

log("Updating git submodules")
try updateSubmodules()
log("Updating git submodule \(Submodule.sdk.description)")
try updateSubmodule(submodule: .sdk)

log("Updating git submodule \(Submodule.chatSDK.description)")
try updateSubmodule(submodule: .chatSDK)

log("Checking out \(Submodule.sdk.description) to \(userInput.sdkHash)")
try checkoutSubmoduleToCommit(submodule: .sdk, commitHash: userInput.sdkHash)
Expand Down

0 comments on commit 6f1d8e2

Please sign in to comment.