mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-21 20:08:49 +00:00
Deploy docs only if Cutter Commit is newer and add Commit Info (#1313)
This commit is contained in:
parent
3489918dc2
commit
b305bef965
@ -98,7 +98,7 @@ look like:
|
||||
doSomething(value);
|
||||
}
|
||||
|
||||
Nullptr
|
||||
nullptr
|
||||
^^^^^^^
|
||||
|
||||
Please do not use ``0`` nor ``Q_NULLPTR``, only use ``nullptr``.
|
||||
|
13
scripts/deploy_docs.sh
Normal file → Executable file
13
scripts/deploy_docs.sh
Normal file → Executable file
@ -2,9 +2,12 @@
|
||||
|
||||
cd $(dirname "${BASH_SOURCE[0]}")/..
|
||||
|
||||
cutter_timestamp=$(git show -s --format=%ct)
|
||||
cutter_commit="$(git show -s --format="%H %s")"
|
||||
|
||||
echo "Cloning current cutter.re"
|
||||
|
||||
git clone git@github.com:radareorg/cutter.re.git || exit 1
|
||||
git clone --depth 1 git@github.com:radareorg/cutter.re.git || exit 1
|
||||
|
||||
echo "Updating docs"
|
||||
|
||||
@ -14,8 +17,14 @@ cp -a docs/build/html cutter.re/docs || exit 1
|
||||
echo "Committing new changes"
|
||||
|
||||
cd cutter.re || exit 1
|
||||
docs_timestamp=$(git show -s --format=%ct)
|
||||
if [ $docs_timestamp -ge $cutter_timestamp ]; then
|
||||
echo "Last commit on cutter.re is newer than this commit on cutter. Skipping."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
git add . || exit 1
|
||||
git diff --cached --quiet && echo "No changes." && exit 0
|
||||
git commit -m "Update docs from radareorg/cutter"
|
||||
printf "Update docs from radareorg/cutter\n\nOriginal Commit:\n$cutter_commit" | git commit -F -
|
||||
git push origin master || exit 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user