Browse Source

Merge branch 'drone-build' of nico/pass into master

master
Nicolas Petton 1 year ago
committed by Gitea
parent
commit
919d8e3826
3 changed files with 22 additions and 55 deletions
  1. +3
    -4
      .drone.yml
  2. +0
    -6
      Cask
  3. +19
    -45
      Makefile

+ 3
- 4
.drone.yml View File

@ -10,7 +10,6 @@ steps:
image: ubuntu:latest
commands:
- apt-get update
- apt-get install -y coreutils make gnutls-bin emacs-nox nodejs npm
- make env
- make info
- make check
- apt-get install -y coreutils make gnutls-bin emacs-nox npm
- make dependencies
- make test

+ 0
- 6
Cask View File

@ -1,6 +0,0 @@
(source melpa)
(package-file "pass.el")
(development
(depends-on "ert"))

+ 19
- 45
Makefile View File

@ -1,52 +1,26 @@
CASK ?= cask
EMACS ?= emacs
DIST ?= dist
EMACSFLAGS = --batch -Q
EMACSBATCH = $(EMACS) $(EMACSFLAGS)
SRCS = pass*.el
TEST_ERT_FILES=$(wildcard test/*.el)
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
LOAD_PATH = -L .
SRCS = $(filter-out %-pkg.el, $(wildcard *.el))
TESTS = $(wildcard test/*.el)
TAR = $(DIST)/pass-$(VERSION).tar
EMACSBIN ?= emacs
BATCH = $(EMACSBIN) -Q --batch $(LOAD_PATH) \
--eval "(require 'package)" \
--eval "(add-to-list 'package-archives '(\"melpa-stable\" . \"http://stable.melpa.org/packages/\"))" \
--funcall package-initialize
.PHONY: all clean dependencies check test lint
.PHONY: all deps check install uninstall reinstall clean-all clean
all : deps $(TAR)
all: test
deps :
$(CASK) install
dependencies:
# Install dependencies in ~/.emacs.d/elpa
$(BATCH) \
--eval "(progn (setq package-check-signature nil) (package-refresh-contents))" \
--eval "(package-install 'ert)" \
--eval "(package-install 'password-store)"
check : deps
$(CASK) exec $(EMACSBATCH) \
$(patsubst %,-l % , $(SRCS))\
$(patsubst %,-l % , $(TESTS))\
-f ert-run-tests-batch-and-exit
install : $(TAR)
$(EMACSBATCH) -l package -f package-initialize \
--eval '(package-install-file "$(PROJ_ROOT)/$(TAR)")'
uninstall :
rm -rf $(USER_ELPA_D)/pass-*
reinstall : clean uninstall install
clean-all : clean
rm -rf $(PKG_DIR)
clean :
rm -f *.elc
rm -rf $(DIST)
rm -f *-pkg.el
$(TAR) : $(DIST) $(SRCS)
$(CASK) package $(DIST)
$(DIST) :
mkdir $(DIST)
test:
TRAVIS=true $(BATCH) \
--eval "(progn $(patsubst %,(load-file \"%\"),$(filter-out %-autoloads.el,${TEST_ERT_FILES})) (ert-run-tests-batch-and-exit))"

Loading…
Cancel
Save