spec: Add pre-release hook to check desired package consistency
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
This commit is contained in:
parent
3847cec1a5
commit
da6a1218df
1 changed files with 23 additions and 0 deletions
23
.gear/check
Executable file
23
.gear/check
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash -efu
|
||||
|
||||
RET=0
|
||||
|
||||
f=tools/server/public/index.html.gz
|
||||
email=$(git log -1 --pretty=%ae -- "$f")
|
||||
if [[ $email != *@altlinux.org ]]; then
|
||||
echo >&2 "$f is not updated by ALT. Perhaps, run .gear/generate"
|
||||
(set -x; git l -1 -- "$f")
|
||||
RET=1
|
||||
fi
|
||||
|
||||
ts_f=$(git log -1 --date=unix --pretty='%cd' "$f")
|
||||
s=tools/server/webui
|
||||
ts_s=$(git log -1 --date=unix --pretty='%cd' "$s")
|
||||
if (( ts_f < ts_s )); then
|
||||
echo >&2 "$f is not updated after $s update."
|
||||
(set -x; git l -1 -- "$f")
|
||||
(set -x; git l -1 -- "$s")
|
||||
RET=1
|
||||
fi
|
||||
|
||||
exit $RET
|
||||
Loading…
Add table
Add a link
Reference in a new issue