Skip to content

Commit

Permalink
fix: ensure git apply only patch file
Browse files Browse the repository at this point in the history
  • Loading branch information
cxfksword committed Sep 22, 2024
1 parent 2577d53 commit 12bea3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ jobs:
- name: Upload binary to GitHub Release
uses: softprops/action-gh-release@v2
with:
name: ${{ env.RELEASE_VERSION }}
name: ${{ contains(env.RELEASE_VERSION, '-') && env.RELEASE_VERSION || env.BUILD_VERSION }}
tag_name: ${{ env.RELEASE_VERSION }}
files: |
./dist/release/*.txt
./dist/release/*.zip
prerelease: ${{ contains(github.event.inputs.version, '-') }}
prerelease: ${{ contains(env.RELEASE_VERSION, '-') }}
body_path: /tmp/RELEASE_NOTE.txt
generate_release_notes: true
fail_on_unmatched_files: true
Expand Down
5 changes: 4 additions & 1 deletion Sources/BuildScripts/XCFrameworkBuild/base.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ class BaseBuild {
_ = try? Utility.launch(path: "/usr/bin/git", arguments: ["checkout", "."], currentDirectoryURL: directoryURL)
let fileNames = try! FileManager.default.contentsOfDirectory(atPath: patch.path).sorted()
for fileName in fileNames {
if !fileName.hasSuffix(".patch") {
continue
}
try! Utility.launch(path: "/usr/bin/git", arguments: ["apply", "\((patch + fileName).path)"], currentDirectoryURL: directoryURL)
}
}
Expand Down Expand Up @@ -475,7 +478,7 @@ class BaseBuild {

// CFBundleIdentifier must contain only alphanumerics, dots, hyphens
private func normalizeBundleIdentifier(_ identifier: String) -> String {
return identifier.replacingOccurrences(of: "_", with: "")
return identifier.replacingOccurrences(of: "_", with: "-")
}


Expand Down

0 comments on commit 12bea3b

Please sign in to comment.