Skip to content

Commit

Permalink
update gitignore, add options to makefile, update make-image, update …
Browse files Browse the repository at this point in the history
…asd file, fix some errors in code
  • Loading branch information
gaussfff committed Feb 4, 2021
1 parent 6b95f35 commit a6aa93a
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
\'#*
.DS_Store
\#*
nobot-app
release/
15 changes: 13 additions & 2 deletions make-image.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,20 @@
(load "nobot/nobot.asd")
(asdf:load-system :nobot)

;; application parameters
(defparameter *nobot-application-name* "nobot")
(defparameter *nobot-version* "0.1")
(defparameter *nobot-spec-name* "mega-trash")

;; make image
(sb-ext:save-lisp-and-die
#p "nobot-app"
(sb-ext:save-lisp-and-die
(make-pathname
:directory '(:relative "release")
:name (format nil "~a-~a-~a"
*nobot-application-name*
*nobot-version*
*nobot-spec-name*)
:type "bin")
:toplevel #'nobot/startup:*run*
:save-runtime-options t
:executable t)
Expand Down
23 changes: 18 additions & 5 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
# Copyright (c) 2021 Bohdan Sokolovskyi
# Author: Bohdan Sokolovskyi <[email protected]>

# config variables
project-dir=nobot/
SHELL=/bin/bash

.PHONY: clean

project-dir=nobot/
all: build install

build: clean
mkdir release
sbcl --disable-debugger \
--load make-image.lisp

help:
@echo "all build help install uninstall clean"

install:

build:
sbcl --load make-image.lisp
uninstall:

clean:
rm nobot-app || :
(find $(project-dir) -name '*.fasl' -print0 | xargs -0 rm ||:)
(rm -rf release || :)
(find $(project-dir) -name '*.fasl' -print0 | xargs -0 rm || :)
6 changes: 3 additions & 3 deletions nobot/botscript/parser/acacia.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
#:define-rule
#:pack-parse-tree
#:acacia-packed-result
#:get-parse-tree
#:get-source-type
#:get-source))
#:acacia-get-parse-tree
#:acacia-get-source-type
#:acacia-get-source))
12 changes: 6 additions & 6 deletions nobot/botscript/parser/acacia/result-packaging.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
(:use :cl)
(:export #:pack-parse-tree
#:acacia-packed-result
#:get-parse-tree
#:get-source-type
#:get-source))
#:acacia-get-parse-tree
#:acacia-get-source-type
#:acacia-get-source))

(in-package :nobot/botscript/parser/acacia/result-packaging)

(defclass acacia-packed-result ()
((parse-tree
:type list
:initarg :parse-tree
:reader get-parse-tree)
:reader acacia-get-parse-tree)
(source-type
:type keyword
:initarg :source-type
:reader get-source-type)
:reader acacia-get-source-type)
(source
:type string
:initarg :source
:reader get-source)))
:reader acacia-get-source)))

(defmethod initialize-instance :around ((res acacia-packed-result) &key parse-tree
source-type
Expand Down
9 changes: 4 additions & 5 deletions nobot/nobot.asd
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
;;;; Author: Bohdan Sokolovskyi <[email protected]>


(asdf:defsystem "nobot"
(asdf:defsystem :nobot
:class :package-inferred-system
:defsystem-depends-on (:asdf-package-system)
:description "Engine for creating chat bots"
:version "1.0"
:version "0.1"
:author "Sokolovskyi Bohdan"
:depends-on ("nobot/startup"
"nobot/toplevel"
Expand All @@ -24,6 +24,5 @@
"cl-ppcre"
"unix-opts"
"yason")
:in-order-to ((test-op (load-op "nobot/tests")))
;;TODO: change to rewd from string + eval, or another solution
:perform (test-op (o c) (uiop:symbol-call :nobot/tests :run-unit-tests)))
:in-order-to ((asdf:test-op (asdf:load-op :nobot/tests)))
:perform (asdf:test-op (o c) (uiop:symbol-call :nobot/tests :run-unit-tests)))

0 comments on commit a6aa93a

Please sign in to comment.