diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 863a0a1..e1554c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,20 +18,20 @@ jobs: - name: Build Swift Script run: | - swiftc -target x86_64-apple-macos10.15 -o ocr-x86_64 main.swift - swiftc -target arm64-apple-macos11 -o ocr-arm64 main.swift + swiftc -target x86_64-apple-macos10.15 -o ocr-x86_64-apple-darwin main.swift + swiftc -target arm64-apple-macos11 -o ocr-aarch64-apple-darwin main.swift - name: Test - run: ./ocr-x86_64 $(pwd)/test.jpg auto + run: ./ocr-x86_64-apple-darwin $(pwd)/test.jpg auto - name: Upload Binary uses: actions/upload-artifact@v3 with: - name: ocr-x86_64 - path: ./ocr-x86_64 + name: ocr-x86_64-apple-darwin + path: ./ocr-x86_64-apple-darwin - name: Upload Binary uses: actions/upload-artifact@v3 with: - name: ocr-arm64 - path: ./ocr-arm64 + name: ocr-aarch64-apple-darwin + path: ./ocr-aarch64-apple-darwin diff --git a/main.swift b/main.swift index 8aeef41..55d1500 100644 --- a/main.swift +++ b/main.swift @@ -70,7 +70,7 @@ if CommandLine.argc < 2 { } else { let inputURL = URL(fileURLWithPath: CommandLine.arguments[1]) let language = CommandLine.arguments[2] - if let features = detectText(fileName : inputURL, lang : String), !features.isEmpty{} + if let features = detectText(fileName : inputURL, lang : language), !features.isEmpty{} } exit(EXIT_SUCCESS)