FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
wolfPKCS11/pre-commit.sh at master · wolfSSL/wolfPKCS11 · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
wolfSSL
/
wolfPKCS11
Public
Notifications
You must be signed in to change notification settings
Fork
29
Star
24
Code
Issues
0
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
wolfPKCS11
/
pre-commit.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
36 lines (29 loc) · 908 Bytes
Breadcrumbs
wolfPKCS11
/
pre-commit.sh
Copy path
File metadata and controls
executable file
·
36 lines (29 loc) · 908 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
33
34
35
36
#!
/bin/sh
#
#
#
Our "pre-commit" hook.
#
save current config
echo
"
\n\nSaving current config\n\n
"
cp config.status tmp.status
cp wolfpkcs11/options.h tmp.options.h
#
stash modified files not part of this commit, don't test them
echo
"
\n\nStashing any modified files not part of commit\n\n
"
git stash -q --keep-index
#
do the commit tests
echo
"
\n\nRunning commit tests...\n\n
"
./commit-tests.sh
RESULT=
$?
#
restore modified files not part of this commit
echo
"
\n\nPopping any stashed modified files not part of commit\n
"
git stash pop -q
#
restore current config
echo
"
\nRestoring current config\n
"
mv tmp.status config.status
#
don't show output in case error from above
./config.status
>
/dev/null
2>&1
mv tmp.options.h wolfpkcs11/options.h
make clean
>
/dev/null
2>&1
make -j 8
>
/dev/null
2>&1
[
$RESULT
-ne
0 ]
&&
echo
"
\nOops, your commit failed\n
"
&&
exit
1
echo
"
\nCommit tests passed!\n
"
exit
0
Back
|
FazBrowse Home
|
New Git URL