Skip to content

Commit

Permalink
Merge branch 'evm-travis' -> bump 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrieanKhisbe committed Dec 10, 2015
2 parents d62035b + bc8d020 commit eb4930c
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 47 deletions.
35 changes: 13 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
language: emacs-lisp

script:
- emacs --version
- make test

env:
matrix:
- EVM_EMACS=emacs-24.5-bin
- EVM_EMACS=emacs-24.4-bin
- EVM_EMACS=emacs-24.3-bin
- EVM_EMACS=emacs-24.2-bin
- EVM_EMACS=emacs-24.1-bin
- EVM_EMACS=emacs-git-snapshot
matrix:
fast_finish: true
allow_failures:
- env: EVM_EMACS=emacs-git-snapshot

sudo: required
language: generic
sudo: false
before_install:
- curl -fsSkL https://gist.github.com/rejeep/7736123/raw > travis.sh && source ./travis.sh
- curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > x.sh && source ./x.sh
- evm install $EVM_EMACS --use --skip
- cask
env:
- EVM_EMACS=emacs-24.1-travis
- EVM_EMACS=emacs-24.2-travis
- EVM_EMACS=emacs-24.3-travis
- EVM_EMACS=emacs-24.4-travis
- EVM_EMACS=emacs-24.5-travis
script:
- emacs --version
- make test

notifications:
email: false
email: false
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased][unreleased]
*Nothing So Far*
### [0.6.7] - 2015-12-02

### [0.7.0] - 2015-12-10
### Changed
- Update travis build for evm 0.7 + template
### Added
- add command to update travis config

## [0.6.7] - 2015-12-02
### Changed
- Wrong syntax now trigger an error
## [0.6.6] - 2015-11-18
Expand All @@ -17,6 +24,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## More history digging would be done one day

[unreleased]: https://github.com/AdrieanKhisbe/cask-package-toolset.el/compare/v0.6.7...HEAD
[unreleased]: https://github.com/AdrieanKhisbe/cask-package-toolset.el/compare/v0.7.0...HEAD
[unreleased]: https://github.com/AdrieanKhisbe/cask-package-toolset.el/compare/v0.6.7...v0.7.0
[0.6.7]: https://github.com/AdrieanKhisbe/cas-package-toolset.el/compare/v0.6.6...v0.6.7
[0.6.6]: https://github.com/AdrieanKhisbe/cas-package-toolset.el/compare/v0.6.5...v0.6.6
2 changes: 2 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Just add this has dependency to your =Cask= file
: $ cask exec package-toolset setup-ert
+ Get the code to setup coverage with [[https://github.com/sviridov/undercover.el][undercover]]
: $ cask exec package-toolset setup-undercover
+ Update travis config if needed with update-travis
: $ cask exec package-toolset update-travis

*** Options
+ In case your =origin= remote is not targeting your github repository, you can specify
Expand Down
16 changes: 15 additions & 1 deletion cask-package-toolset.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

;; Author: Adrien Becchis <adriean.khisbe@live.fr>
;; Created: 2015-05-14
;; Version: 0.6.6
;; Version: 0.7.0
;; Keywords: convenience, tools
;; Url: http://github.com/AdrieanKhisbe/cask-package-toolset.el
;; Package-Requires: ((emacs "24") (cl-lib "0.3") (s "1.6.1") (dash "1.8.0") (f "0.10.0") (commander "0.2.0") (ansi "0.1.0") (shut-up "0.1.0"))
Expand Down Expand Up @@ -299,6 +299,19 @@ Note it remove enventual trailing .el"
(message "%s" (cask-package-toolset-fill-template "undercover.el"
`(("package-name" . ,package-name)))))))

(defun cask-package-toolset-ensure-latest-travis-config()
"Updare travis recipe if up to date"
(if (f-exists? ".travis.yml")
(let ((travis-content (f-read-text ".travis.yml")))
(if (s-contains? "/ebcd57c3af83b049833b/" travis-content)
(message (ansi-green "Travis config already updated"))
(let ((template-file (cask-package-toolset--template-path ".travis.yml"))
(destination-file (f-expand ".travis.yml")))
(message "Updating travis config\nYou might need to check the emacs version you want to support")
(f-delete destination-file)
(f-copy template-file destination-file))))
(error "Travis not setup yet, run `setup' instead")))

(defun cask-package-toolset-print-badges ()
"Print Melpa Recipe."
(let ((repository-name (cask-package-toolset-github-repository-name)))
Expand Down Expand Up @@ -353,6 +366,7 @@ Note it remove enventual trailing .el"
(command "badge" "Print badges to add to your READLE" cask-package-toolset-print-badges)
(command "melpa-recipe" "Print recipe for melpa" cask-package-toolset-print-melpa-recipe)
(command "git" "Print deduced github remote" cask-package-toolset-print-github-remote)
(command "update-travis" "Update travis recipe if needed" cask-package-toolset-ensure-latest-travis-config)
(command "help" "Show usage information" commander-print-usage))


Expand Down
35 changes: 13 additions & 22 deletions templates/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
language: emacs-lisp

script:
- emacs --version
- make test

env:
matrix:
- EVM_EMACS=emacs-24.5-bin
- EVM_EMACS=emacs-24.4-bin
- EVM_EMACS=emacs-24.3-bin
- EVM_EMACS=emacs-24.2-bin
- EVM_EMACS=emacs-24.1-bin
- EVM_EMACS=emacs-git-snapshot
matrix:
fast_finish: true
allow_failures:
- env: EVM_EMACS=emacs-git-snapshot

sudo: required
language: generic
sudo: false
before_install:
- curl -fsSkL https://gist.github.com/rejeep/7736123/raw > travis.sh && source ./travis.sh
- curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > x.sh && source ./x.sh
- evm install $EVM_EMACS --use --skip
- cask
env:
- EVM_EMACS=emacs-24.1-travis
- EVM_EMACS=emacs-24.2-travis
- EVM_EMACS=emacs-24.3-travis
- EVM_EMACS=emacs-24.4-travis
- EVM_EMACS=emacs-24.5-travis
script:
- emacs --version
- make test

notifications:
email: false
email: false
20 changes: 20 additions & 0 deletions test/cask-package-toolset-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@
(should (-all? (lambda (file) (f-exists? file))
cask-package-toolset-templates))))

(ert-deftest cpt-update-travis--none ()
(within-sandbox
(shut-up (should-error (cask-package-toolset-ensure-latest-travis-config)))))

(ert-deftest cpt-update-travis--updated ()
(within-sandbox
(shut-up
(f-write "let's say it's the travis file" 'utf-8 (f-expand ".travis.yml" cpt-sandbox-path))
(cask-package-toolset-ensure-latest-travis-config)
(should (s-contains? "Updating travis"
(shut-up-current-output))))))

(ert-deftest cpt-update-travis--up-to-date ()
(within-sandbox
(shut-up
(cask-package-toolset-copy-template ".travis.yml")
(cask-package-toolset-ensure-latest-travis-config)
(should (s-contains? "Travis config already updated"
(shut-up-current-output))))))

(ert-deftest cpt-fill-template-ok()
(should
(equal
Expand Down

0 comments on commit eb4930c

Please sign in to comment.