Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Patil <[email protected]>
  • Loading branch information
Sachin Patil committed Dec 3, 2020
1 parent 7bfea92 commit d5cf5ba
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 31 deletions.
16 changes: 16 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
image: iquiw/alpine-emacs

before_script:
- apk add make

build:
stage: build
script:
- make clean
- make

test:
stage: test
script:
- make clean
- make test
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Makefile for insert-shebang

EMACS=emacs

EMACS_CLEAN=-Q
Expand All @@ -18,7 +20,7 @@ TEST_DEP_1_LATEST_URL=http://git.savannah.gnu.org/cgit/emacs.git/plain/lisp/emac
test test-interactive clean edit test-dep-1 test-dep-2 test-dep-3 \
test-dep-4 test-dep-5 test-dep-6 test-dep-7 test-dep-8 test-dep-9

build :
build:
$(EMACS) $(EMACS_BATCH) --eval \
"(progn \
(setq byte-compile-error-on-warn t) \
Expand Down
40 changes: 16 additions & 24 deletions ReadMe.org
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
* insert-shebang [[https://travis-ci.org/psachin/insert-shebang.png?branch=master][https://travis-ci.org/psachin/insert-shebang.png]] [[https://gitter.im/psachin/insert-shebang?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge][https://badges.gitter.im/psachin/insert-shebang.svg]]
Insert shebang line automatically for Emacs.

* insert-shebang
Insert shebang line automatically.
** Clone
- Clone this repository
#+BEGIN_SRC sh
git clone https://github.com/psachin/insert-shebang.git
#+END_SRC
Clone this repository
#+BEGIN_SRC shell
git clone https://gitlab.com/psachin/insert-shebang.git
#+END_SRC

** Install
*** Melpa-stable: [[http://stable.melpa.org/#/insert-shebang][file:http://stable.melpa.org/packages/insert-shebang-badge.svg]] [[http://marmalade-repo.org/packages/insert-shebang][Marmalade]]
Expand All @@ -14,8 +13,8 @@
#+END_SRC

*** Manual install
- Add directory containing =insert-shebang.el= file to
=load-path= in your =~/.emacs= file. For example:
- Add directory containing =insert-shebang.el= file to =load-path= in your
=~/.emacs= file. For example:
#+BEGIN_SRC emacs-lisp
(add-to-list 'load-path "/path/to/insert-shebang/")
#+END_SRC
Expand All @@ -28,10 +27,10 @@
- Optionally, run =make= to byte-compile the file.

** Customize
- Customize using:
#+BEGIN_SRC emacs-lisp
M-x customize-group RET insert-shebang RET
#+END_SRC
Customize using:
#+BEGIN_SRC emacs-lisp
M-x customize-group RET insert-shebang RET
#+END_SRC

*** Env Path
Defines path to =env=. Default is =/usr/bin/env=.
Expand All @@ -51,24 +50,17 @@
in =~/.insert-shebang.log= file. Set to *nil* if you want to
disable this feature.

You can visit this log file using
You can visit this log file using:
#+BEGIN_SRC emacs-lisp
M-x insert-shebang-open-log-buffer
#+END_SRC

** Contribute
- Feel free to send PRs
- Feel free to send a [[https://docs.gitlab.com/ee/user/project/merge_requests/][Merge Request]]
- Create new issues
- Make sure to run tests before sending a PR
#+BEGIN_SRC sh
cask --verbose
- Make sure to run tests before sending a Merge Request:
#+BEGIN_SRC shell
make test

## alternate commands
bash ./run-tests.sh

# travis
bash ./run-travis-ci.sh
#+END_SRC

** License
Expand Down
13 changes: 7 additions & 6 deletions insert-shebang.el
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
;;; insert-shebang.el --- Insert shebang line automatically.

;; Copyright (C) 2013-2018 Sachin Patil
;; Copyright (C) 2013-2020 Sachin Patil

;; Author: Sachin Patil <[email protected]>
;; URL: http://github.com/psachin/insert-shebang
;; URL: https://gitlab.com/psachin/insert-shebang
;; Keywords: shebang, tool, convenience
;; Version: 0.9.6
;; Version: 0.9.7

;; This file is NOT a part of GNU Emacs.

Expand All @@ -15,7 +15,7 @@

;;; Commentary:
;; Inserts shebang line automatically
;; URL: http://github.com/psachin/insert-shebang
;; URL: https://gitlab.com/psachin/insert-shebang

;; Install

Expand All @@ -36,7 +36,8 @@
(defgroup insert-shebang nil
"Inserts shebang line automatically."
:group 'extensions
:link '(url-link :tag "Github" "https://github.com/psachin/insert-shebang"))
:link '(url-link :tag "github" "https://github.com/psachin/insert-shebang"
:tag "gitlab" "https://gitlab.com/psachin/insert-shebang"))

(defcustom insert-shebang-env-path "/usr/bin/env"
"Full path to `env' binary.
Expand All @@ -61,7 +62,7 @@ terminal."
:group 'insert-shebang)

(defcustom insert-shebang-ignore-extensions
'("txt" "org")
'("txt" "org" "el")
"*Add extensions you want to ignore.
List of file extensions to be ignored by default."
:type '(repeat (string :tag "extn"))
Expand Down

0 comments on commit d5cf5ba

Please sign in to comment.