~evanj/e3

ref: f07259c77881216ff62e998d3125c07041119356 e3/.build.yml -rw-r--r-- 1.7 KiB
f07259c7Evan J Fix(cache.go): Don't error out when item is too large for cache. 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
image: debian/testing
packages:
  - make
  - golang
sources:
  - https://git.sr.ht/~evanj/e3
secrets:
  - 0154a9d3-f2c9-4ee2-8102-7c4c92492149
tasks:
  - build: |
      export PATH=$PATH:$HOME/go/bin
      cd e3
      touch .env
      make setup gen build
      if [ `git branch | head -n 1 | awk '{print$5}' | sed 's/)//g' | xargs -I X bash -c "git log --pretty=oneline origin/master | head -n 1 | grep X" | wc -l` == "1" ]; then
        echo "deploying to production"
        ssh -o 'StrictHostKeyChecking=no' evan@140.82.14.80 'bash -c "sudo mysqldump e3 > \$(mktemp --suffix .e3.datbase.backup.sql)"'
        ssh -o 'StrictHostKeyChecking=no' evan@140.82.14.80 'bash -c "rm ~/e3/e3 2>/dev/null"'
        scp -o 'StrictHostKeyChecking=no' e3 evan@140.82.14.80:~/e3
        scp -r -o 'StrictHostKeyChecking=no' static evan@140.82.14.80:~/e3
        ssh -o 'StrictHostKeyChecking=no' evan@140.82.14.80 'bash -c "sudo systemctl restart e3"'
      elif [ `git branch | head -n 1 | awk '{print$5}' | sed 's/)//g' | xargs -I X bash -c "git log --pretty=oneline origin/tip | head -n 1 | grep X" | wc -l` == "1" ]; then
        echo "deploying to tip"
        ssh -o 'StrictHostKeyChecking=no' evan@140.82.14.80 'bash -c "sudo mysqldump e3_tip > \$(mktemp --suffix .e3.tip.datbase.backup.sql)"'
        ssh -o 'StrictHostKeyChecking=no' evan@140.82.14.80 'bash -c "rm ~/e3.tip/e3 2>/dev/null"'
        scp -o 'StrictHostKeyChecking=no' e3 evan@140.82.14.80:~/e3.tip
        scp -r -o 'StrictHostKeyChecking=no' static evan@140.82.14.80:~/e3.tip
        ssh -o 'StrictHostKeyChecking=no' evan@140.82.14.80 'bash -c "sudo systemctl restart e3.tip"'
      else 
        echo "not deploying"
      fi