-
Notifications
You must be signed in to change notification settings - Fork 0
/
itest.sh
executable file
·32 lines (27 loc) · 909 Bytes
/
itest.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\t\n'
set -x
# Build the template itself
lein do clean, test
cd target
run-test() {
echo -e "foo\nbar" | DEBUG=1 lein new library "$@"
local project_dir=${1##*/}
pushd "$project_dir"
lein ancient :all
lein test
# Bump a version and check that it's replaced in README.md (part of release procedure)
lein change version leiningen.release/bump-version :patch
lein change version leiningen.release/bump-version release :patch
lein update-readme-version
grep "0.0.1" README.md >/dev/null
lein changelog release
grep "0.0.1" CHANGELOG.md >/dev/null
popd
}
# Generate a project based on the template and run tests in it
run-test org.example/foo1
# Just in case we want to try it outside of target/
lein install
echo -e "\nUsage: lein new library org.example.footeam/bar-lib\n"