fix git not being in build
This commit is contained in:
parent
29039f1c20
commit
8d349e0727
|
@ -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 ]
|
||||||
|
@ -11,12 +14,12 @@ export PGDATABASE=matabas
|
||||||
export PGUSER=matabasare
|
export PGUSER=matabasare
|
||||||
|
|
||||||
log() {
|
log() {
|
||||||
printf "\e[1m\e[38;5;87m==>\e[0m\e[1m %s%s\e[0m\n" "$1" "${2:-.}"
|
printf "\e[1m\e[38;5;87m==>\e[0m\e[1m %s%s\e[0m\n" "$1" "${2:-.}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# 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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user