File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed
Expand file tree Collapse file tree 2 files changed +47
-0
lines changed 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+ export GIT_AUTHOR_NAME=" github_actions"
16+ export GIT_AUTHOR_EMAIL=" github_actions@example.com"
17+
18+ # Add first commit
19+ cp -r ../sample/foo/main.cf /tmp/foo/foo.cf
20+ git init /tmp/foo
21+ cd /tmp/foo
22+ git add /tmp/foo/foo.cf
23+ git -c user.name=" $GIT_AUTHOR_NAME " -c user.email=" $GIT_AUTHOR_EMAIL " commit -m " initial commit"
24+ head_commit=$( git rev-parse HEAD)
25+ cd -
26+
27+ # run cfbs
28+ cfbs --non-interactive init --masterfiles no
29+ cfbs --non-interactive add /tmp/foo
30+ cfbs build
31+
32+ grep " $head_commit " cfbs.json
33+
34+ # Add second commit
35+ cp ../sample/bar/baz/main.cf /tmp/foo/baz.cf
36+ cd /tmp/foo
37+ git add /tmp/foo/baz.cf
38+ git -c user.name=" $GIT_AUTHOR_NAME " -c user.email=" $GIT_AUTHOR_EMAIL " commit -m " second commit"
39+ head_commit=$( git rev-parse HEAD)
40+ cd -
41+
42+ # run cfbs
43+ cfbs --non-interactive update
44+ cfbs build
45+
46+ 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