diff --git a/pkgs/applications/networking/cluster/crc/default.nix b/pkgs/applications/networking/cluster/crc/default.nix index 6f975de875db..fd5012447fe3 100644 --- a/pkgs/applications/networking/cluster/crc/default.nix +++ b/pkgs/applications/networking/cluster/crc/default.nix @@ -10,16 +10,17 @@ }: let - openShiftVersion = "4.12.5"; - okdVersion = "4.12.0-0.okd-2023-02-18-033438"; - podmanVersion = "4.3.1"; - writeKey = "cvpHsNcmGCJqVzf6YxrSnVlwFSAZaYtp"; - gitHash = "sha256-zk/26cG2Rt3jpbhKgprtq2vx7pIQVi7cPUA90uoQa80="; + openShiftVersion = "4.14.3"; + okdVersion = "4.14.0-0.okd-2023-12-01-225814"; + microshiftVersion = "4.14.3"; + podmanVersion = "4.4.4"; + writeKey = "$(MODULEPATH)/pkg/crc/segment.WriteKey=cvpHsNcmGCJqVzf6YxrSnVlwFSAZaYtp"; + gitCommit = "b6532a3c38f2c81143153fed022bc4ebf3f2f508"; + gitHash = "sha256-LH1vjWVzSeSswnMibn4YVjV2glauQGDXP+6i9kGzzU4="; in buildGoModule rec { - version = "2.15.0"; + version = "2.30.0"; pname = "crc"; - gitCommit = "72256c3cb00ac01519b26658dd5cfb0dd09b37a1"; modRoot = "cmd/crc"; src = fetchFromGitHub { @@ -44,12 +45,13 @@ buildGoModule rec { tags = [ "containers_image_openpgp" ]; ldflags = [ - "-X github.com/crc-org/crc/pkg/crc/version.crcVersion=${version}" - "-X github.com/crc-org/crc/pkg/crc/version.ocpVersion=${openShiftVersion}" - "-X github.com/crc-org/crc/pkg/crc/version.okdVersion=${okdVersion}" - "-X github.com/crc-org/crc/pkg/crc/version.podmanVersion=${podmanVersion}" - "-X github.com/crc-org/crc/pkg/crc/version.commitSha=${builtins.substring 0 8 gitCommit}" - "-X github.com/crc-org/crc/pkg/crc/segment.WriteKey=${writeKey}" + "-X github.com/crc-org/crc/v2/pkg/crc/version.crcVersion=${version}" + "-X github.com/crc-org/crc/v2/pkg/crc/version.ocpVersion=${openShiftVersion}" + "-X github.com/crc-org/crc/v2/pkg/crc/version.okdVersion=${okdVersion}" + "-X github.com/crc-org/crc/v2/pkg/crc/version.podmanVersion=${podmanVersion}" + "-X github.com/crc-org/crc/v2/pkg/crc/version.microshiftVersion=${microshiftVersion}" + "-X github.com/crc-org/crc/v2/pkg/crc/version.commitSha=${builtins.substring 0 8 gitCommit}" + "-X github.com/crc-org/crc/v2/pkg/crc/segment.WriteKey=${writeKey}" ]; preBuild = '' diff --git a/pkgs/applications/networking/cluster/crc/update.sh b/pkgs/applications/networking/cluster/crc/update.sh index 6114ee46bc09..98bed3ee88e3 100755 --- a/pkgs/applications/networking/cluster/crc/update.sh +++ b/pkgs/applications/networking/cluster/crc/update.sh @@ -40,7 +40,10 @@ OKD_VERSION=$(grep 'OKD_VERSION' ${FILE_MAKEFILE} | PODMAN_VERSION=$(grep 'PODMAN_VERSION' ${FILE_MAKEFILE} | head -n1 | awk '{print $3}') -WRITE_KEY=$(grep '$(REPOPATH)/pkg/crc/segment.WriteKey' ${FILE_MAKEFILE} | +MICROSHIFT_VERSION=$(grep 'MICROSHIFT_VERSION' ${FILE_MAKEFILE} | + head -n1 | awk '{print $3}') + +WRITE_KEY=$(grep 'pkg/crc/segment.WriteKey' ${FILE_MAKEFILE} | head -n1 | awk '{print $4}' | sed -e 's/$(REPOPATH)\/pkg\/crc\/segment.WriteKey=//g') sed -i "s|version = \".*\"|version = \"${CRC_VERSION:-}\"|" \ @@ -61,5 +64,8 @@ sed -i "s|okdVersion = \".*\"|okdVersion = \"${OKD_VERSION:-}\"|" \ sed -i "s|podmanVersion = \".*\"|podmanVersion = \"${PODMAN_VERSION:-}\"|" \ ${NIXPKGS_CRC_FOLDER}/default.nix +sed -i "s|microshiftVersion = \".*\"|microshiftVersion = \"${MICROSHIFT_VERSION:-}\"|" \ + ${NIXPKGS_CRC_FOLDER}/default.nix + sed -i "s|writeKey = \".*\"|writeKey = \"${WRITE_KEY:-}\"|" \ ${NIXPKGS_CRC_FOLDER}/default.nix