-
-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
contrib: learn to build website/_uploads
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
- Loading branch information
Showing
3 changed files
with
57 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
# | ||
# vim: expandtab ts=2 : | ||
|
||
WEBSITE_UPLOADS='./website/_uploads' | ||
|
||
while true | ||
do | ||
test -d .git && break | ||
cd .. | ||
done | ||
|
||
set -e | ||
|
||
echo "make clean" | ||
make clean >/dev/null | ||
echo "make targz" | ||
make targz >/dev/null | ||
|
||
# Defined in the root Makefile. | ||
version="$(./offlineimap.py --version)" | ||
abbrev="$(git log --format='%h' HEAD~1..)" | ||
targz="../offlineimap-v${version}-${abbrev}.tar.gz" | ||
|
||
filename="offlineimap-v${version}.tar.gz" | ||
|
||
mv -v "$targz" "${WEBSITE_UPLOADS}/${filename}" | ||
cd "$WEBSITE_UPLOADS" | ||
for digest in sha1 sha256 sha512 | ||
do | ||
target="${filename}.${digest}" | ||
echo "Adding digest ${WEBSITE_UPLOADS}/${target}" | ||
"${digest}sum" "$filename" > "$target" | ||
done |