Skip to content

Commit

Permalink
Add husky hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
tdraier committed Aug 20, 2024
1 parent c6f4f9a commit c6d776e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .husky/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

echo "Running post-merge hook"
./front/admin/copy_apps.sh

exit 0
6 changes: 6 additions & 0 deletions .husky/pre-rebase
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

echo "Running pre-rebase hook"
./front/admin/copy_apps.sh

exit 0
5 changes: 3 additions & 2 deletions front/admin/copy_apps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ fi

mkdir -p /tmp/dust-apps

${DIR}/cli.sh registry dump > /tmp/dust-apps/specs 2> /dev/null
cd ${DIR}/..

./admin/cli.sh registry dump > /tmp/dust-apps/specs 2> /dev/null

REGISTRY_COUNT=$(cat /tmp/dust-apps/specs | wc -w)
IN_CLAUSE=$(cat /tmp/dust-apps/specs | cut -f4 -d\| | sed -E "s/(.*)/'\\1'/g" | paste -sd "," - )
Expand Down Expand Up @@ -104,5 +106,4 @@ else

fi


rm -R /tmp/dust-apps

0 comments on commit c6d776e

Please sign in to comment.