Skip to content

Commit

Permalink
Docker, travis, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
sordina committed Jan 1, 2015
1 parent a16bcd9 commit 0b53b81
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dist
doc
test
.git
.cabal-sandbox
hugsin
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
language: haskell
ghc: 7.8
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM haskell:7.8
MAINTAINER Lyndon Maydwell <[email protected]>
RUN cabal update
ADD . /opt/deadpan-ddp
RUN cd /opt/deadpan-ddp && cabal install -j4

RUN apt-get update
RUN apt-get -y install zip 1> /dev/null 2> /dev/null

ENV PATH /root/.cabal/bin:/bin:/opt/X11/bin:/opt/local/sbin:/sbin:/usr/X11R6/bin:/usr/bin:/usr/local/bin:/usr/local/git/bin:/usr/local/sbin:/usr/pkg/bin:/usr/pkg/sbin:/usr/sbin:~/bin
WORKDIR /opt/deadpan-ddp
RUN ls
RUN ./scripts/cabal-s3
CMD ["deadpan"]
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
todo:
grep -r TODO src test/client/* README.md
grep -r undefined src test/client/* README.md

docker-build:
docker build .
docker run
docker cp /opt/deadpan-ddp/*.zip `pwd`
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ Pre-compiled binaries can be found for the `deadpan` debugging tool below:
* <http://sordina.binaries.s3.amazonaws.com/deadpan-0.2.0.1-MacOSX-10.9.5-13F34.zip>
* <http://sordina.binaries.s3.amazonaws.com/deadpan-0.2.0.0-MacOSX-10.9.5-13F34.zip>
* <http://sordina.binaries.s3.amazonaws.com/deadpan-0.1.0.1-MacOSX-10.9.5-13F34.zip>
* <http://sordina.binaries.s3.amazonaws.com/deadpan-0.6.0.0-Linux-3.16.7-tinycore64-x86_64.zip>


## TODO
Expand Down
23 changes: 23 additions & 0 deletions scripts/cabal-s3
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

set -e

version=` sed -n 's/^version:[ ]*\([0-9-]*\)/\1/p' *.cabal`
executable=`sed -n 's/^executable[ ]*\(.*\)/\1/p' *.cabal`
zipfile="$executable-$version.zip"

if [ "`uname`" = "Darwin" ]
then
zipfile="$executable-$version-`sw_vers -productName | sed 's/ //g'`-`sw_vers -productVersion`-`sw_vers -buildVersion`.zip"
fi

if [ "`uname`" = "Linux" ]
then
zipfile="$executable-$version-`uname -mrs | sed 's/ /-/g'`.zip"
fi

echo $version
echo $executable
echo $zipfile

zip $zipfile dist/build/$executable/$executable README.md *.cabal
7 changes: 7 additions & 0 deletions scripts/cabal-s3-upload
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

set -e

zipfile="$1"

s3cmd put --acl-public $zipfile s3://sordina.binaries/$zipfile

0 comments on commit 0b53b81

Please sign in to comment.