Browse Source

Merge branch 'fix-build' into 'master'

Fix build

See merge request !1
master
Nicolas Petton 4 years ago
parent
commit
2739206b95
7 changed files with 81 additions and 77 deletions
  1. +0
    -1
      .ert-runner
  2. +2
    -9
      .travis.yml
  3. +10
    -0
      Cask
  4. +65
    -0
      Makefile
  5. +4
    -0
      pass-secrets.el
  6. +0
    -36
      test/pass-secrets.el-test.el
  7. +0
    -31
      test/test-helper.el

+ 0
- 1
.ert-runner View File

@ -1 +0,0 @@
-L .

+ 2
- 9
.travis.yml View File

@ -7,9 +7,8 @@ before_install:
- cask
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-25.2-travis
- EVM_EMACS=emacs-git-snapshot
matrix:
@ -19,10 +18,4 @@ matrix:
script:
- emacs --version
- make info
- make check
addons:
apt:
packages:
- texinfo

+ 10
- 0
Cask View File

@ -0,0 +1,10 @@
(source gnu)
(source melpa)
(package-file "pass-secrets.el")
(depends-on "f")
(depends-on "pass")
(development
(depends-on "package-lint"))

+ 65
- 0
Makefile View File

@ -0,0 +1,65 @@
CASK ?= cask
EMACS ?= emacs
DIST ?= dist
EMACSFLAGS = --batch -Q
EMACSBATCH = $(EMACS) $(EMACSFLAGS)
VERSION := $(shell EMACS=$(EMACS) $(CASK) version)
PKG_DIR := $(shell EMACS=$(EMACS) $(CASK) package-directory)
PROJ_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
EMACS_D = ~/.emacs.d
USER_ELPA_D = $(EMACS_D)/elpa
SRCS = $(filter-out %-autoloads.el, $(filter-out %-pkg.el, $(wildcard *.el)))
TESTS = $(wildcard test/*.el)
TAR = $(DIST)/pass-secrets-$(VERSION).tar
.PHONY: all check lint deps install uninstall reinstall clean-all clean clean-elc
all : deps $(TAR)
deps :
$(CASK) install
install : $(TAR)
$(EMACSBATCH) -l package -f package-initialize \
--eval '(package-install-file "$(PROJ_ROOT)/$(TAR)")'
uninstall :
rm -rf $(USER_ELPA_D)/pass-secrets-*
reinstall : clean uninstall install
clean-all : clean
rm -rf $(PKG_DIR)
clean-elc :
rm -f *.elc test/*.elc
clean : clean-elc
rm -rf $(DIST)
rm -f *-pkg.el
$(TAR) : $(DIST) $(SRCS)
$(CASK) package $(DIST)
$(DIST) :
mkdir $(DIST)
check: lint
lint : $(SRCS) clean-elc
# Byte compile all and stop on any warning or error
${CASK} emacs $(EMACSFLAGS) \
--eval "(setq byte-compile-error-on-warn t)" \
-L . -f batch-byte-compile ${SRCS} ${TESTS}
# Run package-lint to check for packaging mistakes
${CASK} emacs $(EMACSFLAGS) \
--eval "(require 'package)" \
--eval "(push '(\"melpa\" . \"http://melpa.org/packages/\") package-archives)" \
--eval "(package-initialize)" \
--eval "(package-refresh-contents)" \
-l package-lint.el \
-f package-lint-batch-and-exit ${SRCS}

+ 4
- 0
pass-secrets.el View File

@ -3,6 +3,10 @@
;; Copyright (C) 2017 Nicolas Petton
;; Author: Nicolas Petton <nicolas@petton.fr>
;; Version: 0.1.0
;; Package-Requires: ((emacs "25.1") (f "0.19.0") (pass "1.7"))
;; GIT: https://gitlab.petton.fr/nico/pass-secrets.el.git
;; Keywords: tools
;; This program is free software; you can redistribute it and/or modify


+ 0
- 36
test/pass-secrets.el-test.el View File

@ -1,36 +0,0 @@
;;; pass-secrets.el-test.el --- Tests for pass-secrets.el.el
;; Copyright (C) 2013 Nicolas Petton
;; Author: Nicolas Petton <nicolas@petton.fr>
;; This file is not part of GNU Emacs.
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; Tests for pass-secrets.el.el
;;; Code:
(require 'ert)
(require 'pass-secrets.el)
(ert-deftest pass-secrets.el-check-sum ()
(should (equal (+ 1 1) 2)))
(provide 'pass-secrets.el-test)
;;; pass-secrets.el-test.el ends here

+ 0
- 31
test/test-helper.el View File

@ -1,31 +0,0 @@
;;; test-helper.el --- Helper functions to test pass-secrets.el -*- lexical-binding: t; -*-
;; Copyright (C) 2017 Nicolas Petton
;; Author: Nicolas Petton <nicolas@petton.fr>
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;;; Code:
(declare-function undercover "undercover")
(when (require 'undercover nil t)
(undercover "pass-secrets.el.el"))
;;; test-helper.el ends here

Loading…
Cancel
Save