-
Notifications
You must be signed in to change notification settings - Fork 20
/
step-087.sh
27 lines (20 loc) · 849 Bytes
/
step-087.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
#!/bin/sh
# Test:
# Cli tool: manage update time configuration
if ! sh /var/lib/githooks/install.sh; then
echo "! Failed to execute the install script"
exit 1
fi
# Update time configuration
! git hooks config unknown update-time || exit 2
git hooks config print update-time | grep 'never' || exit 3
git config --global githooks.autoupdate.lastrun 123 &&
git hooks config print update-time | grep -v 'never' || exit 4
git hooks config reset update-time &&
git hooks config print update-time | grep 'never' || exit 5
# Check the Git alias
git hooks config print update-time | grep 'never' || exit 10
git config --global githooks.autoupdate.lastrun 123 &&
git hooks config print update-time | grep -v 'never' || exit 11
git hooks config reset update-time &&
git hooks config print update-time | grep 'never' || exit 12