Skip to content

Commit

Permalink
Merge pull request #128 from immerrr/update-makefile-and-travis-yml
Browse files Browse the repository at this point in the history
Update makefile and travis yml
  • Loading branch information
immerrr committed Nov 1, 2016
2 parents 33097fe + a0d6744 commit 5640afe
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
- EVM_EMACS=emacs-24.3-travis
- EVM_EMACS=emacs-24.4-travis
- EVM_EMACS=emacs-24.5-travis
- EVM_EMACS=emacs-25.1-travis
- EVM_EMACS=emacs-git-snapshot-travis
before_install:
- curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > travis.sh && source ./travis.sh
Expand Down
22 changes: 16 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ EMACS?=emacs
EMACS_MAJOR_VERSION=$(shell $(EMACS) -batch -eval '(princ emacs-major-version)')
LUA_MODE_ELC=lua-mode.$(EMACS_MAJOR_VERSION).elc

EMACS_BATCH=cask exec $(EMACS) --batch -Q
EMACS_BATCH=$(EMACS) --batch -Q

default:
@echo version is $(VERSION)
Expand All @@ -25,24 +25,34 @@ dist:
rm -f $(DISTFILE) && \
git archive --format=zip -o $(DISTFILE) --prefix=lua-mode/ HEAD

.PHONY: test-compiled test-uncompiled
.PHONY: test-compiled-nocask test-uncompiled-nocask test-compiled test-uncompiled
# check both regular and compiled versions
test-nocask: test-compiled-nocask test-uncompiled-nocask

test: test-compiled test-uncompiled

test-compiled-nocask: $(LUA_MODE_ELC)
$(EMACS) -batch -l $(LUA_MODE_ELC) -l buttercup -f buttercup-run-discover

test-uncompiled-nocask:
$(EMACS) -batch -l lua-mode.el -l buttercup -f buttercup-run-discover

test-compiled: $(LUA_MODE_ELC)
EMACS=$(EMACS) cask exec buttercup -l $(LUA_MODE_ELC)

test-uncompiled:
EMACS=$(EMACS) cask exec buttercup -l lua-mode.el

tryout:
cask exec $(EMACS) -Q -l init-tryout.el test.lua

tryout-nocask:
$(EMACS) -Q -l init-tryout.el test.lua

release:
git fetch && \
git diff remotes/origin/master --exit-code && \
git tag -a -m "Release tag" rel-$(VERSION) && \
woger lua-l lua-mode lua-mode "release $(VERSION)" "Emacs major mode for editing Lua files" release-notes-$(VERSION) http://github.com/immerrr/lua-mode/ && \
git push origin master
@echo 'Send update to ELPA!'


tryout:
cask exec $(EMACS) -Q -l init-tryout.el test.lua

0 comments on commit 5640afe

Please sign in to comment.