diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f7bb80..c73f022 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,6 @@ jobs: pytest-coverage-path: ./pytest-coverage.txt junitxml-path: ./pytest.xml if: | - matrix.python-version == '3.x' && matrix.platform == 'ubuntu-latest' + false && matrix.python-version == '3.x' && matrix.platform == 'ubuntu-latest' && !contains(github.ref, 'refs/tags/') diff --git a/.github/workflows/ci_docker.yml b/.github/workflows/ci_docker.yml index 94b26e2..7412592 100644 --- a/.github/workflows/ci_docker.yml +++ b/.github/workflows/ci_docker.yml @@ -79,7 +79,7 @@ jobs: # relative path to the place where source code with Dockerfile is located # TODO file:, move to docker/ context: . - file: Dockerfile + file: docker/Dockerfile # builder: ${{ steps.buildx.outputs.name }} # Note: tags has to be all lower-case pull: true @@ -152,7 +152,7 @@ jobs: # relative path to the place where source code with Dockerfile is located platforms: linux/amd64,linux/arm64 context: . - file: Dockerfile_only_txt + file: docker/Dockerfile_only_txt # builder: ${{ steps.buildx.outputs.name }} # Note: tags has to be all lower-case pull: true @@ -235,7 +235,7 @@ jobs: # relative path to the place where source code with Dockerfile is located # TODO file:, move to docker/ context: . - file: Dockerfile + file: docker/Dockerfile # builder: ${{ steps.buildx.outputs.name }} build-args: | BASE_IMAGE=python:3.11-slim-buster diff --git a/Pipfile.lock b/Pipfile.lock index 6dda857..5cf773f 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -55,7 +55,7 @@ "sha256:f64bb98ac59b3ea3bf74b02f13836eb2e24e48e0ab0145bbda646295769bd780", "sha256:f9006288bcf4895917d02583cf3411f98631275bc67cce355a7f39f8c14338fa" ], - "markers": "python_version >= '3.7'", + "markers": "python_version >= '3.10'", "version": "==1.24.2" }, "opencv-contrib-python": { diff --git a/README.md b/README.md index 1ba5d14..e43f2ce 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ The secrets can be exported to JSON or CSV, or printed as QR codes to console or ## Table of contents - [Download and run binary executable (πŸ†• since v2.1)](#download-and-run-binary-executable--since-v21) - - [MacOS application](#macos-application) + - [MacOS](#macos) - [Usage](#usage) - [Capture QR codes from camera (πŸ†• since version 2.0)](#capture-qr-codes-from-camera--since-version-20) - [With builtin QR decoder from image files (πŸ†• since version 2.0)](#with-builtin-qr-decoder-from-image-files--since-version-20) @@ -108,7 +108,7 @@ The secrets can be exported to JSON or CSV, or printed as QR codes to console or :information_source: The executables are not signed. Thus, the operating system may show a warning about download from unknown source. -### MacOS application +### MacOS > Beginning in macOS 10.15, all software built after June 1, 2019, and distributed with Developer ID must be notarized. However, you aren’t required to notarize software that you distribute through the Mac App Store because the App Store submission process already includes equivalent security checks. [developer.apple.com](https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution) @@ -122,6 +122,15 @@ However, the bare executable can be executed from the command line: 4. Set executable bit for the downloaded file: `chmod +x extract_otp_secrets_OS_vX.X.X` 5. Start executable from command line: `./extract_otp_secrets_OS_vX.X.X` +#### Apple Silicon (ARM) + +Currently, there is no build for M1 and M2 Apple Silicon processors due to lack of hardware. However, the binary executable should be runnable by Rosetta2 emulation. + +``` +arch -x86_64 extract_otp_secrets_OS_vX.X.X +``` +:warning: This command is untested due to lack of hardware. + ## Usage ### Capture QR codes from camera (πŸ†• since version 2.0) @@ -345,8 +354,8 @@ python extract_otp_secrets.py = < example_export.png * extract_otp_secrets_linux_arm64 (requires glibc >= 2.28) * extract_otp_secrets_win_x86_64.exe * extract_otp_secrets_macos_x86_64 (optional [libzbar](#installation-of-optional-shared-system-libraries-recommended) needs to be installed manually if needed) - * extract_otp_secrets_macos_x86_64.dmg N/A, see [why](#macos-application) - * extract_otp_secrets_macos_x86_64.pkg N/A, see [why](#macos-application) + * extract_otp_secrets_macos_x86_64.dmg N/A, see [why](#macos) + * extract_otp_secrets_macos_x86_64.pkg N/A, see [why](#macos) * Prebuilt Docker images provided for amd64 and arm64 (πŸ†• since v2.0) * Many ways to run the script: * Native Python @@ -622,7 +631,7 @@ pip install -U -r requirements.txt Build and run the app within the container: ```bash -docker build . -t extract_otp_secrets --pull --build-arg RUN_TESTS=false +docker build . -t extract_otp_secrets --pull -f docker/Dockerfile --build-arg RUN_TESTS=false ``` Run tests in docker container: @@ -634,7 +643,7 @@ docker run --entrypoint /extract/run_pytest.sh --rm -v "$(pwd)":/files:ro extrac #### Alpine (only text file processing) ```bash -docker build . -t extract_otp_secrets:only_txt --pull -f Dockerfile_only_txt --build-arg RUN_TESTS=false +docker build . -t extract_otp_secrets:only_txt --pull -f docker/Dockerfile_only_txt --build-arg RUN_TESTS=false ``` Run tests in docker container: diff --git a/build.sh b/build.sh index 8c91ca8..119d5c5 100755 --- a/build.sh +++ b/build.sh @@ -374,7 +374,7 @@ if $build_docker; then # Build docker # Build Dockerfile_only_txt (Alpine) - cmd="docker build . -t extract_otp_secrets_only_txt -t extract_otp_secrets:only-txt -t extract_otp_secrets:alpine -f Dockerfile_only_txt --pull --build-arg RUN_TESTS=false" + cmd="docker build . -t extract_otp_secrets_only_txt -t extract_otp_secrets:only-txt -t extract_otp_secrets:alpine -f docker/Dockerfile_only_txt --pull --build-arg RUN_TESTS=false" if $interactive ; then askContinueYn "$cmd"; else echo -e "${cyan}$cmd${reset}";fi eval "$cmd" @@ -391,7 +391,7 @@ if $build_docker; then eval "$cmd" # Build extract_otp_secrets (Debian Bullseye) - cmd="docker build . -t extract_otp_secrets -t extract_otp_secrets:bullseye --pull --build-arg RUN_TESTS=false" + cmd="docker build . -t extract_otp_secrets -t extract_otp_secrets:bullseye --pull -f docker/Dockerfile --build-arg RUN_TESTS=false" if $interactive ; then askContinueYn "$cmd"; else echo -e "${cyan}$cmd${reset}";fi eval "$cmd" @@ -412,7 +412,7 @@ if $build_docker; then eval "$cmd" # Build extract_otp_secrets (Debian Buster) - cmd="docker build . -t extract_otp_secrets:buster --pull --build-arg RUN_TESTS=false --build-arg BASE_IMAGE=python:3.11-slim-buster" + cmd="docker build . -t extract_otp_secrets:buster --pull -f docker/Dockerfile --build-arg RUN_TESTS=false --build-arg BASE_IMAGE=python:3.11-slim-buster" if $interactive ; then askContinueYn "$cmd"; else echo -e "${cyan}$cmd${reset}";fi eval "$cmd" @@ -469,7 +469,7 @@ if $build_docker; then # build linux/arm64 # Build extract_otp_secrets (Debian Buster) - cmd="docker buildx build --platform=linux/arm64 . -t extract_otp_secrets:buster --pull --build-arg RUN_TESTS=false --build-arg BASE_IMAGE=python:3.11-slim-buster" + cmd="docker buildx build --platform=linux/arm64 . -t extract_otp_secrets:buster --pull -f docker/Dockerfile --build-arg RUN_TESTS=false --build-arg BASE_IMAGE=python:3.11-slim-buster" if $interactive ; then askContinueYn "$cmd"; else echo -e "${cyan}$cmd${reset}";fi eval "$cmd" diff --git a/Dockerfile b/docker/Dockerfile similarity index 100% rename from Dockerfile rename to docker/Dockerfile diff --git a/Dockerfile_only_txt b/docker/Dockerfile_only_txt similarity index 100% rename from Dockerfile_only_txt rename to docker/Dockerfile_only_txt diff --git a/docs/README_TOC.md b/docs/README_TOC.md index 6e9c008..a65addd 100644 --- a/docs/README_TOC.md +++ b/docs/README_TOC.md @@ -4,7 +4,7 @@ Generate from file: README.md - [Table of contents](#table-of-contents) - [Download and run binary executable (πŸ†• since v2.1)](#download-and-run-binary-executable--since-v21) - - [MacOS application](#macos-application) + - [MacOS](#macos) - [Usage](#usage) - [Capture QR codes from camera (πŸ†• since version 2.0)](#capture-qr-codes-from-camera--since-version-20) - [With builtin QR decoder from image files (πŸ†• since version 2.0)](#with-builtin-qr-decoder-from-image-files--since-version-20)