add scripts for build, deploy and publish
This commit is contained in:
parent
6f2040edff
commit
3f29452b8f
3 changed files with 32 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
**/**.**~
|
**/**.**~
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
sorrel/**
|
sorrel/**
|
||||||
|
deploy-dir/**
|
||||||
|
tool/**
|
13
build.sh
Executable file
13
build.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# clean up old build
|
||||||
|
rm -rf sorrel || true
|
||||||
|
|
||||||
|
# compile binary
|
||||||
|
raco cross --target x86_64-linux exe sorrel.dev.rkt
|
||||||
|
|
||||||
|
# distribute
|
||||||
|
raco cross --target x86_64-linux dist sorrel sorrel.dev
|
||||||
|
|
||||||
|
# remove duplicated binary
|
||||||
|
rm sorrel.dev
|
17
deploy.sh
Executable file
17
deploy.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# make a clean slate locally
|
||||||
|
rm -rf ./deploy-dir || true
|
||||||
|
mkdir ./deploy-dir
|
||||||
|
|
||||||
|
# copy all the files into a deploy local directory
|
||||||
|
cp -a ./sorrel/. ./deploy-dir/.
|
||||||
|
cp -a ./static ./deploy-dir/.
|
||||||
|
cp -a ./source ./deploy-dir/.
|
||||||
|
cp -a ./data ./deploy-dir/.
|
||||||
|
|
||||||
|
# make a clean slate remotely
|
||||||
|
ssh deploy@turtle.hup.is 'rm -rf ./sorrel.dev'
|
||||||
|
|
||||||
|
# copy all the files onto remote
|
||||||
|
rsync -avz ./deploy-dir/. deploy@turtle.hup.is:~/sorrel.dev
|
Loading…
Reference in a new issue