fix git not being in build

This commit is contained in:
xenia 2023-08-16 11:23:01 +02:00
parent 29039f1c20
commit 8d349e0727
2 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,7 @@
cd "$(git rev-parse --show-toplevel)" set +e
ROOT="$(git rev-parse --show-toplevel)"
[ $? -ne 0 ] && ROOT=./
cd "$ROOT"
# Check for lock # Check for lock
[ -f matabas-db/dev-lock ] [ -f matabas-db/dev-lock ]
@ -16,7 +19,7 @@ log() {
# Only trapped if owner # Only trapped if owner
exitHook() { exitHook() {
cd "$(git rev-parse --show-toplevel)" cd "$ROOT"
log "Stoppar brevekorren" log "Stoppar brevekorren"
pg_ctl stop --pgdata=./matabas-db pg_ctl stop --pgdata=./matabas-db
rm -f matabas-db/dev-lock rm -f matabas-db/dev-lock
@ -50,14 +53,14 @@ setupDb() {
P="$PWD" P="$PWD"
clean() { clean() {
cd "$(git rev-parse --show-toplevel)" cd "$ROOT"
log "Rensar byggnad" log "Rensar byggnad"
rm -rf artifacts rm -rf artifacts
cd - >/dev/null cd - >/dev/null
} }
build() { build() {
cd "$(git rev-parse --show-toplevel)" cd "$ROOT"
( source "buildScripts/build.sh" ) ( source "buildScripts/build.sh" )
RES=$? RES=$?
cd - >/dev/null cd - >/dev/null

View File

@ -10,6 +10,7 @@
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system}; let pkgs = nixpkgs.legacyPackages.${system};
buildInputs = [ buildInputs = [
pkgs.git
pkgs.postgresql_15_jit pkgs.postgresql_15_jit
( pkgs.ghc.withPackages (ps: with ps; [ ( pkgs.ghc.withPackages (ps: with ps; [
scotty postgresql-typed http-client-tls aeson scotty postgresql-typed http-client-tls aeson