diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 43f28cd1..6274941a 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -161,19 +161,19 @@ jobs: fail-fast: false matrix: job: - - { target: aarch64-unknown-linux-musl , os: ubuntu-latest, dpkg_arch: arm64, use-cross: true } - - { target: aarch64-unknown-linux-gnu , os: ubuntu-latest, dpkg_arch: arm64, use-cross: true } - - { target: arm-unknown-linux-gnueabihf , os: ubuntu-latest, dpkg_arch: armhf, use-cross: true } - - { target: arm-unknown-linux-musleabihf, os: ubuntu-latest, dpkg_arch: musl-linux-armhf, use-cross: true } - - { target: i686-pc-windows-msvc , os: windows-2025, } - - { target: i686-unknown-linux-gnu , os: ubuntu-latest, dpkg_arch: i686, use-cross: true } - - { target: i686-unknown-linux-musl , os: ubuntu-latest, dpkg_arch: musl-linux-i686, use-cross: true } - - { target: x86_64-apple-darwin , os: macos-13, } - - { target: aarch64-apple-darwin , os: macos-14, } - - { target: x86_64-pc-windows-msvc , os: windows-2025, } - - { target: aarch64-pc-windows-msvc , os: windows-11-arm, } - - { target: x86_64-unknown-linux-gnu , os: ubuntu-latest, dpkg_arch: amd64, use-cross: true } - - { target: x86_64-unknown-linux-musl , os: ubuntu-latest, dpkg_arch: musl-linux-amd64, use-cross: true } + - { target: aarch64-unknown-linux-musl , os: ubuntu-latest , dpkg_arch: arm64, use-cross: true } + - { target: aarch64-unknown-linux-gnu , os: ubuntu-latest , dpkg_arch: arm64, use-cross: true } + - { target: arm-unknown-linux-gnueabihf , os: ubuntu-latest , dpkg_arch: armhf, use-cross: true } + - { target: arm-unknown-linux-musleabihf, os: ubuntu-latest , dpkg_arch: musl-linux-armhf, use-cross: true } + - { target: i686-pc-windows-msvc , os: windows-2025 , } + - { target: i686-unknown-linux-gnu , os: ubuntu-latest , dpkg_arch: i686, use-cross: true } + - { target: i686-unknown-linux-musl , os: ubuntu-latest , dpkg_arch: musl-linux-i686, use-cross: true } + - { target: x86_64-apple-darwin , os: macos-15-intel, } + - { target: aarch64-apple-darwin , os: macos-latest , } + - { target: x86_64-pc-windows-msvc , os: windows-2025 , } + - { target: aarch64-pc-windows-msvc , os: windows-11-arm, } + - { target: x86_64-unknown-linux-gnu , os: ubuntu-latest , dpkg_arch: amd64, use-cross: true } + - { target: x86_64-unknown-linux-musl , os: ubuntu-latest , dpkg_arch: musl-linux-amd64, use-cross: true } env: BUILD_CMD: cargo steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 9993c0cd..a22109d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Fix hang when using `--list-themes` with an explicit pager, see #3457 (@abhinavcool42) - Fix negative values of N not being parsed in line ranges without `=` flag value separator, see #3442 (@lmmx) +- Fix broken Docker syntax preventing use of custom assets, see #3476 (@keith-hall) ## Other - Improve README documentation on pager options passed to less, see #3443 (@injust) diff --git a/assets/syntaxes.bin b/assets/syntaxes.bin index 3e3ab970..73d454a8 100644 Binary files a/assets/syntaxes.bin and b/assets/syntaxes.bin differ diff --git a/assets/syntaxes/02_Extra/Docker b/assets/syntaxes/02_Extra/Docker index c001fb28..0f6b7bc8 160000 --- a/assets/syntaxes/02_Extra/Docker +++ b/assets/syntaxes/02_Extra/Docker @@ -1 +1 @@ -Subproject commit c001fb280561d7c16f0f2837d76af493cf6c3bf8 +Subproject commit 0f6b7bc87acf684f7b0790fd480731ffb4615b87 diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 27ee6add..5dc35d6e 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -1599,7 +1599,7 @@ Clearing metadata file ... okay", #[cfg(unix)] #[test] -fn cache_build() { +fn cache_build_blank() { let src_dir = "cache_source"; let tmp_dir = tempdir().expect("can create temporary directory"); let tmp_themes_path = tmp_dir.path().join("themes.bin"); @@ -1642,6 +1642,50 @@ Writing metadata to folder .* ... okay", assert!(tmp_metadata_path.exists()); } +#[cfg(unix)] +#[test] +fn cache_build() { + let src_dir = "cache_source"; + let tmp_dir = tempdir().expect("can create temporary directory"); + let tmp_themes_path = tmp_dir.path().join("themes.bin"); + let tmp_syntaxes_path = tmp_dir.path().join("syntaxes.bin"); + let tmp_acknowledgements_path = tmp_dir.path().join("acknowledgements.bin"); + let tmp_metadata_path = tmp_dir.path().join("metadata.yaml"); + + // Build the cache + // Include the BAT_CONFIG_PATH and BAT_THEME environment variables to ensure that + // options loaded from a config or the environment are not inserted + // before the cache subcommand, which would break it. + bat_with_config() + .current_dir(Path::new(EXAMPLES_DIR).join(src_dir)) + .env("BAT_CONFIG_PATH", "bat.conf") + .env("BAT_THEME", "1337") + .arg("cache") + .arg("--build") + // removed --blank + .arg("--source") + .arg(".") + .arg("--target") + .arg(tmp_dir.path().to_str().unwrap()) + .arg("--acknowledgements") + .assert() + .success() + .stdout( + predicate::str::is_match( + "Writing theme set to .*/themes.bin ... okay\nWriting syntax set to .*/syntaxes.bin ... okay\nWriting acknowledgements to .*/acknowledgements.bin ... okay\nWriting metadata to folder .* ... okay", + ) + .unwrap(), + ) + .stdout(predicate::str::contains("Some referenced contexts could not be found!").not()) + ; + + // Now we expect the files to exist. If they exist, we assume contents are correct + assert!(tmp_themes_path.exists()); + assert!(tmp_syntaxes_path.exists()); + assert!(tmp_acknowledgements_path.exists()); + assert!(tmp_metadata_path.exists()); +} + #[test] fn utf16() { // The output will be converted to UTF-8 with the leading UTF-16