File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ set -e
2+ set -x
3+ cd tests/
4+ mkdir -p ./tmp
5+ cd ./tmp/
6+ touch cfbs.json && rm cfbs.json
7+ rm -rf .git
8+
9+ cleanup () {
10+ rm -rf /tmp/foo
11+ }
12+ trap cleanup EXIT QUIT TERM
13+ mkdir -p /tmp/foo
14+
15+ # Add first commit
16+ cp -r ../sample/foo/main.cf /tmp/foo/foo.cf
17+ git init /tmp/foo
18+ cd /tmp/foo
19+ git add /tmp/foo/foo.cf
20+ git commit -m " initial commit"
21+ head_commit=$( git rev-parse HEAD)
22+ cd -
23+
24+ # run cfbs
25+ cfbs --non-interactive init --masterfiles no
26+ cfbs --non-interactive add /tmp/foo
27+ cfbs build
28+
29+ grep " $head_commit " cfbs.json
30+
31+ # Add second commit
32+ cp ../sample/bar/baz/main.cf /tmp/foo/baz.cf
33+ cd /tmp/foo
34+ git add /tmp/foo/baz.cf
35+ git commit -m " second commit"
36+ head_commit=$( git rev-parse HEAD)
37+ cd -
38+
39+ # run cfbs
40+ cfbs --non-interactive update
41+ cfbs build
42+
43+ grep " $head_commit " cfbs.json
Original file line number Diff line number Diff line change @@ -50,5 +50,6 @@ bash tests/shell/043_replace_version.sh
5050bash tests/shell/044_replace.sh
5151bash tests/shell/045_update_from_url_branch_uptodate.sh
5252bash tests/shell/046_update_from_url_branch.sh
53+ bash tests/shell/047_absolute_path_modules.sh
5354
5455echo " All cfbs shell tests completed successfully!"
You can’t perform that action at this time.
0 commit comments