Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghcr.io/cross-rs/cross:main shows wrong version (without commit info) #1594

Open
AndreyMZ opened this issue Dec 2, 2024 · 0 comments
Open
Labels

Comments

@AndreyMZ
Copy link

AndreyMZ commented Dec 2, 2024

Problem description

cross in the Docker image ghcr.io/cross-rs/cross:main shows wrong version (0.2.5, without commit info).

Impact

This version is used as the default version for build images:

pub const DEFAULT_IMAGE_VERSION: &str = if crate::commit_info().is_empty() {
env!("CARGO_PKG_VERSION")
} else {
"main"
};

So, outdated build images are used. For example, ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.5 is used instead of ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main.

Steps to reproduce

docker pull ghcr.io/cross-rs/cross:main
docker run -it ghcr.io/cross-rs/cross:edge cross --version

Actual result

$ docker run -it ghcr.io/cross-rs/cross:edge cross --version
cross 0.2.5

Expected result

$ docker run -it ghcr.io/cross-rs/cross:edge cross --version
cross 0.2.5 (4090bec 2024-10-15)

Workaround

Configure build images explicitly for every target:

  • in "Cargo.toml":
    [package.metadata.cross.target.x86_64-unknown-linux-gnu]
    image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main"
  • or using environment variables:
    CROSS_TARGET_X86_64_UNKNOWN_LINUX_GNU_IMAGE=ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main
@Emilgardis Emilgardis added the bug label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants