From: Frank Duncan Date: Fri, 24 Jul 2015 21:58:05 +0000 (-0500) Subject: Setting up repository X-Git-Tag: 0.1~5 X-Git-Url: https://code.consxy.com/gitweb/?a=commitdiff_plain;h=a7319414d0f0ea8a66764a040e7827b1801da5e5;p=sheep Setting up repository --- diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..df93fc1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +before_install: + - wget http://frank.kank.net/travissbcl/docgen/b9787e5/$(git rev-parse HEAD)/travissbcl + - chmod +x travissbcl + +script: + - ./travissbcl --script bin/travis.lisp diff --git a/bin/buildRelease.sh b/bin/buildRelease.sh new file mode 100755 index 0000000..9254274 --- /dev/null +++ b/bin/buildRelease.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +version=$(sbcl --noinform --disable-ldb --lose-on-corruption --end-runtime-options --eval '(format t "~A" (asdf:component-version (asdf:find-system :docgen)))' --eval "(quit)") + +echo -n "Building version $version, hit enter to continue" +read + +mkdir docgen_$version +cp -ap src/main/* docgen_$version/ +tar zcf docgen_${version}.tar.gz docgen_$version/ +rm -rf docgen_$version + +echo "All done, it's in docgen_${version}.tar.gz, you should tag it and push it up to github" diff --git a/bin/buildtravisexec.sh b/bin/buildtravisexec.sh new file mode 100755 index 0000000..e686a22 --- /dev/null +++ b/bin/buildtravisexec.sh @@ -0,0 +1,36 @@ +#!/bin/bash -e + +mkdir -p tmp/sbcl + +cwd=$PWD +( cd tmp && + tar jxf ../deps/tarpit/sbcl-1.2.6-x86-64-linux-binary.tar.bz2 && + cd sbcl-1.2.6-x86-64-linux/ && + SBCL_HOME="" INSTALL_ROOT=$cwd/tmp/sbcl/ bash install.sh ) + +mkdir -p tmp/deps/ + +( cd tmp/deps && + tar zxf ../../deps/tarpit/cl-ppcre.tar.gz && + tar zxf ../../deps/tarpit/style-checker_0.1.tar.gz && + ln -s cl-ppcre-2.0.10/cl-ppcre.asd . && + ln -s style-checker_0.1/style-checker.asd . +) + + +SBCL_HOME="" tmp/sbcl/bin/sbcl --core tmp/sbcl/lib/sbcl/sbcl.core --no-sysinit --no-userinit \ + --eval "(require 'asdf)" \ + --eval '(setf asdf:*central-registry* (list #p"tmp/deps/"))' \ + --eval "(asdf:load-system :cl-ppcre)" \ + --eval "(asdf:load-system :style-checker)" \ + --eval "(asdf:clear-output-translations)" \ + --eval '(sb-ext:save-lisp-and-die "travissbcl" :executable t)' \ + +chmod +x travissbcl +travisname=travissbcl-$(git rev-parse --short HEAD) +mv travissbcl $travisname + +echo "You should upload via the command: scp $travisname nami:/opt/travis/sbcls/docgen/" +echo "You should also set travisname in .travis.yml to $travisname" + +rm -rf tmp diff --git a/bin/travis.lisp b/bin/travis.lisp new file mode 100644 index 0000000..6a3ed0f --- /dev/null +++ b/bin/travis.lisp @@ -0,0 +1,18 @@ +(setf *compile-print* nil) +(require 'asdf) +(setf asdf:*central-registry* (list #p"deps/")) +(asdf:load-system :docgen.internal) +(asdf:load-system :docgen-test.internal) + +(format t "~%~c[1;33mRunning Tests~c[0m~%" #\Esc #\Esc) +(when (not (docgen-test:run-all-tests)) + (format t "~c[1;31mFailed tests!~c[0m~%" #\Esc #\Esc) + (sb-ext:exit :code 1)) + +(format t "~%~c[1;33mChecking Style~c[0m~%" #\Esc #\Esc) +(when (not (syntax-checker:pretty-print-check-directory "src")) + (format t "~c[1;31mFailed style check!~c[0m~%" #\Esc #\Esc) + (sb-ext:exit :code 1)) + +(format t "~c[1;32mSuccess!~c[0m~%" #\Esc #\Esc) +(sb-ext:exit :code 0) diff --git a/deps/docgen-test.asd b/deps/docgen-test.asd new file mode 120000 index 0000000..0fb4a40 --- /dev/null +++ b/deps/docgen-test.asd @@ -0,0 +1 @@ +../src/test/docgen-test.asd \ No newline at end of file diff --git a/deps/docgen-test.internal.asd b/deps/docgen-test.internal.asd new file mode 120000 index 0000000..0fb4a40 --- /dev/null +++ b/deps/docgen-test.internal.asd @@ -0,0 +1 @@ +../src/test/docgen-test.asd \ No newline at end of file diff --git a/deps/docgen.asd b/deps/docgen.asd new file mode 120000 index 0000000..fd2f220 --- /dev/null +++ b/deps/docgen.asd @@ -0,0 +1 @@ +../src/main/docgen.asd \ No newline at end of file diff --git a/deps/docgen.internal.asd b/deps/docgen.internal.asd new file mode 120000 index 0000000..fd2f220 --- /dev/null +++ b/deps/docgen.internal.asd @@ -0,0 +1 @@ +../src/main/docgen.asd \ No newline at end of file diff --git a/deps/tarpit/cl-ppcre.tar.gz b/deps/tarpit/cl-ppcre.tar.gz new file mode 100644 index 0000000..67d6e15 Binary files /dev/null and b/deps/tarpit/cl-ppcre.tar.gz differ diff --git a/deps/tarpit/sbcl-1.2.6-x86-64-linux-binary.tar.bz2 b/deps/tarpit/sbcl-1.2.6-x86-64-linux-binary.tar.bz2 new file mode 100644 index 0000000..9d09cb4 Binary files /dev/null and b/deps/tarpit/sbcl-1.2.6-x86-64-linux-binary.tar.bz2 differ diff --git a/deps/tarpit/style-checker_0.1.tar.gz b/deps/tarpit/style-checker_0.1.tar.gz new file mode 100644 index 0000000..568ed83 Binary files /dev/null and b/deps/tarpit/style-checker_0.1.tar.gz differ diff --git a/src/main/docgen.asd b/src/main/docgen.asd new file mode 100644 index 0000000..5697064 --- /dev/null +++ b/src/main/docgen.asd @@ -0,0 +1,19 @@ +; The systems are split up into two because travis will run more smoothly +; if we use a custom built sbcl that has all the deps pre-loaded since +; we are sure those will work just fine :) +; +; You should link to this file in your systems directory, or however you +; handle your asdf configurations. Then just (asdf:load-system :clnl) +; +; There's probably a better way, but I don't know it +(asdf:defsystem docgen.internal + :serial t + :components ((:file "package") (:file "docgen"))) + +(asdf:defsystem docgen + :name "Documentation Generator" + :version "0.1" + :maintainer "Frank Duncan (frank@kank.com)" + :author "Frank Duncan (frank@kank.com)" + :serial t + :depends-on (:cl-ppcre :docgen.internal)) diff --git a/src/main/docgen.lisp b/src/main/docgen.lisp new file mode 100644 index 0000000..7142dfe --- /dev/null +++ b/src/main/docgen.lisp @@ -0,0 +1,5 @@ +(in-package #:docgen) + +(defun validate-package (package)) + +(defun export-package (package)) diff --git a/src/main/package.lisp b/src/main/package.lisp new file mode 100644 index 0000000..c45dd5c --- /dev/null +++ b/src/main/package.lisp @@ -0,0 +1,2 @@ +(defpackage #:docgen (:use :cl) + (:export #:validate-package #:export-package)) diff --git a/src/test/docgen-test.asd b/src/test/docgen-test.asd new file mode 100644 index 0000000..ea788a5 --- /dev/null +++ b/src/test/docgen-test.asd @@ -0,0 +1,12 @@ +; For why this is the way it is, see src/main/style-checker.asd +(asdf:defsystem docgen-test.internal + :components ((:file "package") + (:file "main"))) + +(asdf:defsystem docgen-test + :name "Document Generator Tests" + :version "0.0.1" + :maintainer "Frank Duncan (frank@kank.com)" + :author "Frank Duncan (frank@kank.com)" + :serial t + :depends-on (:docgen docgen-test.internal)) diff --git a/src/test/main.lisp b/src/test/main.lisp new file mode 100644 index 0000000..0858ada --- /dev/null +++ b/src/test/main.lisp @@ -0,0 +1,3 @@ +(in-package #:docgen-test) + +(defun run-all-tests () t) diff --git a/src/test/package.lisp b/src/test/package.lisp new file mode 100644 index 0000000..f2bed40 --- /dev/null +++ b/src/test/package.lisp @@ -0,0 +1,2 @@ +(defpackage #:docgen-test (:use :common-lisp) + (:export :run-all-tests))