supabase-cli: 2.98.2 -> 2.100.1 & modernize (#522002)
This commit is contained in:
@@ -3,36 +3,42 @@
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
testers,
|
||||
supabase-cli,
|
||||
versionCheckHook,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "supabase-cli";
|
||||
version = "2.98.2";
|
||||
version = "2.100.1";
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "supabase";
|
||||
repo = "cli";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-ZiptplUqebmId7noXuVXu9G5y1SW8+FGV6WqPH8R3Cw=";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-vCaPZXf4I2f9kJDBDsZcl1q8PIM35NxwuLTeq1aastw=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-2BIP500MgABRzsG13UaUVv8KKtA0dPM0U10Uk/rfVQY=";
|
||||
# Supabase is in the process of porting the CLI to TS, for now we continue with the Go cli.
|
||||
sourceRoot = "${finalAttrs.src.name}/apps/cli-go";
|
||||
|
||||
vendorHash = "sha256-MebmiEFfWozJV/zEQyRtjmd9eR2nG3ZXcpyY6lEEQgI=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X=github.com/supabase/cli/internal/utils.Version=${finalAttrs.version}"
|
||||
];
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
doCheck = false; # tests are trying to connect to localhost
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
doCheck = false; # Root Go package does not have any tests.
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
doInstallCheck = true;
|
||||
|
||||
postInstall = ''
|
||||
mv $out/bin/{cli,supabase}
|
||||
|
||||
@@ -42,15 +48,10 @@ buildGoModule (finalAttrs: {
|
||||
--zsh <($out/bin/supabase completion zsh)
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests.version = testers.testVersion {
|
||||
package = supabase-cli;
|
||||
};
|
||||
updateScript = nix-update-script {
|
||||
# Fetch versions from GitHub releases to detect pre-releases and
|
||||
# avoid updating to them.
|
||||
extraArgs = [ "--use-github-releases" ];
|
||||
};
|
||||
passthru.updateScript = nix-update-script {
|
||||
# Fetch versions from GitHub releases to detect pre-releases and
|
||||
# avoid updating to them.
|
||||
extraArgs = [ "--use-github-releases" ];
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user