Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Commit

Permalink
fix nix scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Oct 16, 2024
1 parent a867695 commit b26cfdd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions scripts/generate_kardinal_version.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ pkgs, ... }:
pkgs.writeShellApplication {
name = "generate-kardinal-version";
runtimeInputs = with pkgs; [ git ];
runtimeInputs = with pkgs; [ git, get-docker-tag ];

text = ''
set -euo pipefail
Expand All @@ -23,8 +23,8 @@ pkgs.writeShellApplication {
new_version="${1:-}"
if [ -z "${new_version}" ]; then
if ! cd "${root_dirpath}"; then
if [ -z "$new_version" ]; then
if ! cd "$root_dirpath"; then
echo "Error: Couldn't cd to the root of this repo, '${root_dirpath}', which is required to get the Git tag" >&2
show_helptext_and_exit
fi
Expand All @@ -34,14 +34,14 @@ pkgs.writeShellApplication {
fi
fi
kardinal_version_go_file_abs_path="${root_dirpath}/${KARDINAL_VERSION_PACKAGE_DIR}/${KARDINAL_VERSION_GO_FILE}"
kardinal_version_go_file_abs_path="$root_dirpath/$KARDINAL_VERSION_PACKAGE_DIR/$KARDINAL_VERSION_GO_FILE"
cat << EOF > "${kardinal_version_go_file_abs_path}"
cat << EOF > "$kardinal_version_go_file_abs_path"
package ${KARDINAL_VERSION_PACKAGE_DIR}
const (
// !!!!!!!!!!!!!!!!!! DO NOT MODIFY THIS! IT WILL BE UPDATED AUTOMATICALLY DURING THE BUILD PROCESS !!!!!!!!!!!!!!!
KardinalVersion = "${new_version}"
KardinalVersion = "$new_version"
// !!!!!!!!!!!!!!!!!! DO NOT MODIFY THIS! IT WILL BE UPDATED AUTOMATICALLY DURING THE BUILD PROCESS !!!!!!!!!!!!!!!
)
EOF
Expand Down
4 changes: 2 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

go-tidy-all = import ./scripts/go-tidy-all.nix {inherit pkgs;};
get-docker-tag = import ./scripts/get-docker-tag.nix {inherit pkgs;};
generate-kurtosis-version = import ./scripts/generate_kurtosis_version.nix {inherit pkgs;};
generate-kardinal-version = import ./scripts/generate_kardinal_version.nix {inherit pkgs;};

manager_shell = pkgs.callPackage ./kardinal-manager/shell.nix {inherit pkgs;};
cli_shell = pkgs.callPackage ./kardinal-cli/shell.nix {inherit pkgs;};
Expand All @@ -28,7 +28,7 @@
kardinal
go-tidy-all
get-docker-tag
generate-kurtosis-version
generate-kardinal-version
kubectl
kustomize
kubernetes-helm
Expand Down

0 comments on commit b26cfdd

Please sign in to comment.