11 writeShellScript "update-esphome" ''
12 PATH=${lib.makeBinPath [ curl gnugrep gnused jq git nix-update ]}
14 LATEST=$(curl https://api.github.com/repos/esphome/esphome/releases/latest | jq -r '.name')
15 echo "Latest version: $LATEST"
17 DASHBOARD_VERSION=$(curl https://raw.githubusercontent.com/esphome/esphome/$LATEST/requirements.txt | \
18 grep "esphome-dashboard==" | sed "s/.*=//")
19 echo "Dashboard version: $DASHBOARD_VERSION"
21 nix-update esphome.dashboard --version $DASHBOARD_VERSION
22 nix-update esphome --version $LATEST