Commit 9ce2c657 authored by Alexander Sieg's avatar Alexander Sieg
Browse files

plausible: simplify update script

parent 270d0e77
Loading
Loading
Loading
Loading
+19 −3
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
  runCommand,
  nixosTests,
  npm-lockfile-fix,
  nix-update-script,
  brotli,
  tailwindcss_3,
  esbuild,
@@ -91,7 +92,9 @@ let
    };
  };

  patchedMixFodDeps = runCommand mixFodDeps.name { } ''
  patchedMixFodDeps = runCommand mixFodDeps.name {
    inherit (mixFodDeps) hash;
  } ''
    mkdir $out
    cp -r --no-preserve=mode ${mixFodDeps}/. $out

@@ -125,8 +128,21 @@ beamPackages.mixRelease rec {
    tests = {
      inherit (nixosTests) plausible;
    };
    updateScript = ./update.sh;
    inherit assets tracker;
    updateScript = nix-update-script {
      extraArgs = [
        "-s"
        "tracker"
        "-s"
        "assets"
        "-s"
        "mjmlNif"
      ];
    };
    inherit
      assets
      tracker
      mjmlNif
      ;
  };

  env = {
+0 −14
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update jq elixir npm-lockfile-fix nixfmt-rfc-style

set -euxo pipefail

nix-update plausible

version="$(nix-instantiate -A plausible.version --eval --json | jq -r)"
source_url="$(nix-instantiate -A plausible.src.url --eval --json | jq -r)"

nix-update --url "$source_url" --version "$version" plausible.tracker
nix-update --url "$source_url" --version "$version" plausible.assets