| 1 |
#!/bin/bash |
| 2 |
# Script to update the version information. |
| 3 |
|
| 4 |
EXIT_FAILURE=1; |
| 5 |
EXIT_SUCCESS=0; |
| 6 |
|
| 7 |
VERSION=`date -u +"%Y%m%d"` |
| 8 |
DPKG_DATE=`date -R` |
| 9 |
|
| 10 |
# Update the Python module version. |
| 11 |
sed "s/__version__ = '[0-9]*'/__version__ = '${VERSION}'/" -i artifacts/__init__.py |
| 12 |
|
| 13 |
# Update the version in the dpkg configuration files. |
| 14 |
cat > config/dpkg/changelog << EOT |
| 15 |
artifacts (${VERSION}-1) unstable; urgency=low |
| 16 |
|
| 17 |
* Auto-generated |
| 18 |
|
| 19 |
-- Forensic artifacts <[email protected]> ${DPKG_DATE} |
| 20 |
EOT |
| 21 |
|
| 22 |
# Regenerate the statistics documentation. |
| 23 |
PYTHONPATH=. ./tools/stats.py > docs/sources/background/Stats.md |
| 24 |
|
| 25 |
# Regenerate the API documentation. |
| 26 |
tox -edocs |
| 27 |
|
| 28 |
exit ${EXIT_SUCCESS}; |