summaryrefslogtreecommitdiff
path: root/.radicle
diff options
context:
space:
mode:
Diffstat (limited to '.radicle')
-rw-r--r--.radicle/native.yaml12
1 files changed, 12 insertions, 0 deletions
diff --git a/.radicle/native.yaml b/.radicle/native.yaml
index 4d4c0fe..994b12f 100644
--- a/.radicle/native.yaml
+++ b/.radicle/native.yaml
@@ -11,3 +11,15 @@ shell: |
cd lambda-calcul/haskell
cabal test all
+
+ EXE=$(cabal list-bin lambda)
+ HEAD=$(git rev-parse HEAD)
+
+ # restart service only if building master branch
+ if git branch --column=never --no-color --contains $HEAD | grep master | tr -d ' ' 2>&1 > /dev/null; then
+ [[ -d ${HOME}/.local/bin ]] || mkdir -p ${HOME}/.local/bin
+ [[ -f ${HOME}/.local/bin/lambda ]] && rm ${HOME}/.local/bin/lambda
+
+ cp "$EXE" ${HOME}/.local/bin/
+ sudo systemctl restart lambda
+ fi