SHA256
1
0
forked from pool/salt
salt/update-documentation.sh

101 lines
2.0 KiB
Bash
Raw Normal View History

Accepting request 540260 from systemsmanagement:saltstack:products:unstable.py3 - Update to 2017.7.2 See https://docs.saltstack.com/en/latest/topics/releases/2017.7.2.html - Added: * enable-with-salt-version-parameter-for-setup.py-scri.patch - Removed: * add-a-salt-minion-service-control-file.patch * add-clean_id-function-to-salt.utils.verify.py.patch * add-options-for-dockerng.patch * add-ssh-option-to-salt-ssh.patch * add-unit-test-for-skip-false-values-from-preferred_i.patch * add-yum-plugin.patch * add-zypp-notify-plugin.patch * adding-salt-minion-watchdog-for-sysv-systems-rhel6-a.patch * adding-support-for-installing-patches-in-yum-dnf-exe.patch * avoid-failures-on-sles-12-sp2-because-of-new-systemd.patch * bugfix-jobs-scheduled-to-run-at-a-future-time-stay-p.patch * bugfix-unable-to-use-127-as-hostname.patch * catching-error-when-pidfile-cannot-be-deleted.patch * change-travis-configuration-file-to-use-salt-toaster.patch * check-if-byte-strings-are-properly-encoded-in-utf-8.patch * clean-up-change-attribute-from-interface-dict.patch * do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch * enables-salt-minion-watchdog-on-init.d-script-for-sy.patch * escape-the-os.sep.patch * fix-for-delete_deployment-in-kubernetes-module.patch * fix-format-error-bsc-1043111.patch * fix-grain-for-os_family-on-suse-series.patch * fix-os_family-case-in-unittest.patch * fix-regression-in-file.get_managed-add-unit-tests.patch * fix-salt-summary-to-count-not-responding-minions-cor.patch OBS-URL: https://build.opensuse.org/request/show/540260 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=98
2017-11-10 08:17:55 +01:00
#!/bin/bash
#
# Update html.tar.bz2 documentation tarball
# Author: Bo Maryniuk <bo@suse.de>
#
NO_SPHINX_PARAM="--without-sphinx"
function build_virtenv() {
virtualenv --system-site-packages $1
source $1/bin/activate
pip install --upgrade pip
if [ -z "$2" ]; then
pip install -I Sphinx
fi
}
Accepting request 540260 from systemsmanagement:saltstack:products:unstable.py3 - Update to 2017.7.2 See https://docs.saltstack.com/en/latest/topics/releases/2017.7.2.html - Added: * enable-with-salt-version-parameter-for-setup.py-scri.patch - Removed: * add-a-salt-minion-service-control-file.patch * add-clean_id-function-to-salt.utils.verify.py.patch * add-options-for-dockerng.patch * add-ssh-option-to-salt-ssh.patch * add-unit-test-for-skip-false-values-from-preferred_i.patch * add-yum-plugin.patch * add-zypp-notify-plugin.patch * adding-salt-minion-watchdog-for-sysv-systems-rhel6-a.patch * adding-support-for-installing-patches-in-yum-dnf-exe.patch * avoid-failures-on-sles-12-sp2-because-of-new-systemd.patch * bugfix-jobs-scheduled-to-run-at-a-future-time-stay-p.patch * bugfix-unable-to-use-127-as-hostname.patch * catching-error-when-pidfile-cannot-be-deleted.patch * change-travis-configuration-file-to-use-salt-toaster.patch * check-if-byte-strings-are-properly-encoded-in-utf-8.patch * clean-up-change-attribute-from-interface-dict.patch * do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch * enables-salt-minion-watchdog-on-init.d-script-for-sy.patch * escape-the-os.sep.patch * fix-for-delete_deployment-in-kubernetes-module.patch * fix-format-error-bsc-1043111.patch * fix-grain-for-os_family-on-suse-series.patch * fix-os_family-case-in-unittest.patch * fix-regression-in-file.get_managed-add-unit-tests.patch * fix-salt-summary-to-count-not-responding-minions-cor.patch OBS-URL: https://build.opensuse.org/request/show/540260 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=98
2017-11-10 08:17:55 +01:00
function check_env() {
if [[ -z "$1" || "$1" != "$NO_SPHINX_PARAM" ]] && [ ! -z "$(which sphinx-build 2>/dev/null)" ]; then
cat <<EOF
You've installed Spinx globally. But it might be outdated or
clash with the version I am going to install into the temporary
virtual environment from PIP.
Please consider to remove Sphinx from your system, perhaps?
Or pass me "$NO_SPHINX_PARAM" param so I will try reusing yours
and see what happens. :)
EOF
exit 1;
fi
for cmd in "make" "quilt" "virtualenv" "pip"; do
Accepting request 540260 from systemsmanagement:saltstack:products:unstable.py3 - Update to 2017.7.2 See https://docs.saltstack.com/en/latest/topics/releases/2017.7.2.html - Added: * enable-with-salt-version-parameter-for-setup.py-scri.patch - Removed: * add-a-salt-minion-service-control-file.patch * add-clean_id-function-to-salt.utils.verify.py.patch * add-options-for-dockerng.patch * add-ssh-option-to-salt-ssh.patch * add-unit-test-for-skip-false-values-from-preferred_i.patch * add-yum-plugin.patch * add-zypp-notify-plugin.patch * adding-salt-minion-watchdog-for-sysv-systems-rhel6-a.patch * adding-support-for-installing-patches-in-yum-dnf-exe.patch * avoid-failures-on-sles-12-sp2-because-of-new-systemd.patch * bugfix-jobs-scheduled-to-run-at-a-future-time-stay-p.patch * bugfix-unable-to-use-127-as-hostname.patch * catching-error-when-pidfile-cannot-be-deleted.patch * change-travis-configuration-file-to-use-salt-toaster.patch * check-if-byte-strings-are-properly-encoded-in-utf-8.patch * clean-up-change-attribute-from-interface-dict.patch * do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch * enables-salt-minion-watchdog-on-init.d-script-for-sy.patch * escape-the-os.sep.patch * fix-for-delete_deployment-in-kubernetes-module.patch * fix-format-error-bsc-1043111.patch * fix-grain-for-os_family-on-suse-series.patch * fix-os_family-case-in-unittest.patch * fix-regression-in-file.get_managed-add-unit-tests.patch * fix-salt-summary-to-count-not-responding-minions-cor.patch OBS-URL: https://build.opensuse.org/request/show/540260 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=98
2017-11-10 08:17:55 +01:00
if [ -z "$(which $cmd 2>/dev/null)" ]; then
echo "Error: '$cmd' is still missing. Install it, please."
Accepting request 540260 from systemsmanagement:saltstack:products:unstable.py3 - Update to 2017.7.2 See https://docs.saltstack.com/en/latest/topics/releases/2017.7.2.html - Added: * enable-with-salt-version-parameter-for-setup.py-scri.patch - Removed: * add-a-salt-minion-service-control-file.patch * add-clean_id-function-to-salt.utils.verify.py.patch * add-options-for-dockerng.patch * add-ssh-option-to-salt-ssh.patch * add-unit-test-for-skip-false-values-from-preferred_i.patch * add-yum-plugin.patch * add-zypp-notify-plugin.patch * adding-salt-minion-watchdog-for-sysv-systems-rhel6-a.patch * adding-support-for-installing-patches-in-yum-dnf-exe.patch * avoid-failures-on-sles-12-sp2-because-of-new-systemd.patch * bugfix-jobs-scheduled-to-run-at-a-future-time-stay-p.patch * bugfix-unable-to-use-127-as-hostname.patch * catching-error-when-pidfile-cannot-be-deleted.patch * change-travis-configuration-file-to-use-salt-toaster.patch * check-if-byte-strings-are-properly-encoded-in-utf-8.patch * clean-up-change-attribute-from-interface-dict.patch * do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch * enables-salt-minion-watchdog-on-init.d-script-for-sy.patch * escape-the-os.sep.patch * fix-for-delete_deployment-in-kubernetes-module.patch * fix-format-error-bsc-1043111.patch * fix-grain-for-os_family-on-suse-series.patch * fix-os_family-case-in-unittest.patch * fix-regression-in-file.get_managed-add-unit-tests.patch * fix-salt-summary-to-count-not-responding-minions-cor.patch OBS-URL: https://build.opensuse.org/request/show/540260 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=98
2017-11-10 08:17:55 +01:00
exit 1;
fi
done
}
function quilt_setup() {
quilt setup salt.spec
cd $1
quilt push -a
}
function build_docs() {
cd $1
make html
rm _build/html/.buildinfo
cd _build/html
chmod -R -x+X *
cd ..
tar cvf - html | bzip2 > $2/html.tar.bz2
Accepting request 540260 from systemsmanagement:saltstack:products:unstable.py3 - Update to 2017.7.2 See https://docs.saltstack.com/en/latest/topics/releases/2017.7.2.html - Added: * enable-with-salt-version-parameter-for-setup.py-scri.patch - Removed: * add-a-salt-minion-service-control-file.patch * add-clean_id-function-to-salt.utils.verify.py.patch * add-options-for-dockerng.patch * add-ssh-option-to-salt-ssh.patch * add-unit-test-for-skip-false-values-from-preferred_i.patch * add-yum-plugin.patch * add-zypp-notify-plugin.patch * adding-salt-minion-watchdog-for-sysv-systems-rhel6-a.patch * adding-support-for-installing-patches-in-yum-dnf-exe.patch * avoid-failures-on-sles-12-sp2-because-of-new-systemd.patch * bugfix-jobs-scheduled-to-run-at-a-future-time-stay-p.patch * bugfix-unable-to-use-127-as-hostname.patch * catching-error-when-pidfile-cannot-be-deleted.patch * change-travis-configuration-file-to-use-salt-toaster.patch * check-if-byte-strings-are-properly-encoded-in-utf-8.patch * clean-up-change-attribute-from-interface-dict.patch * do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch * enables-salt-minion-watchdog-on-init.d-script-for-sy.patch * escape-the-os.sep.patch * fix-for-delete_deployment-in-kubernetes-module.patch * fix-format-error-bsc-1043111.patch * fix-grain-for-os_family-on-suse-series.patch * fix-os_family-case-in-unittest.patch * fix-regression-in-file.get_managed-add-unit-tests.patch * fix-salt-summary-to-count-not-responding-minions-cor.patch OBS-URL: https://build.opensuse.org/request/show/540260 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=98
2017-11-10 08:17:55 +01:00
}
function write_changelog() {
mv salt.changes salt.changes.previous
TIME=$(date -u +'%a %b %d %T %Z %Y')
MAIL=$1
SEP="-------------------------------------------------------------------"
cat <<EOF > salt.changes
$SEP
$TIME - $MAIL
- Updated html.tar.bz2 documentation tarball.
EOF
cat salt.changes.previous >> salt.changes
rm salt.changes.previous
}
if [ -z "$1" ]; then
echo "Usage: $0 <your e-mail> [--without-sphinx]"
Accepting request 540260 from systemsmanagement:saltstack:products:unstable.py3 - Update to 2017.7.2 See https://docs.saltstack.com/en/latest/topics/releases/2017.7.2.html - Added: * enable-with-salt-version-parameter-for-setup.py-scri.patch - Removed: * add-a-salt-minion-service-control-file.patch * add-clean_id-function-to-salt.utils.verify.py.patch * add-options-for-dockerng.patch * add-ssh-option-to-salt-ssh.patch * add-unit-test-for-skip-false-values-from-preferred_i.patch * add-yum-plugin.patch * add-zypp-notify-plugin.patch * adding-salt-minion-watchdog-for-sysv-systems-rhel6-a.patch * adding-support-for-installing-patches-in-yum-dnf-exe.patch * avoid-failures-on-sles-12-sp2-because-of-new-systemd.patch * bugfix-jobs-scheduled-to-run-at-a-future-time-stay-p.patch * bugfix-unable-to-use-127-as-hostname.patch * catching-error-when-pidfile-cannot-be-deleted.patch * change-travis-configuration-file-to-use-salt-toaster.patch * check-if-byte-strings-are-properly-encoded-in-utf-8.patch * clean-up-change-attribute-from-interface-dict.patch * do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch * enables-salt-minion-watchdog-on-init.d-script-for-sy.patch * escape-the-os.sep.patch * fix-for-delete_deployment-in-kubernetes-module.patch * fix-format-error-bsc-1043111.patch * fix-grain-for-os_family-on-suse-series.patch * fix-os_family-case-in-unittest.patch * fix-regression-in-file.get_managed-add-unit-tests.patch * fix-salt-summary-to-count-not-responding-minions-cor.patch OBS-URL: https://build.opensuse.org/request/show/540260 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=98
2017-11-10 08:17:55 +01:00
exit 1;
fi
check_env $2;
Accepting request 540260 from systemsmanagement:saltstack:products:unstable.py3 - Update to 2017.7.2 See https://docs.saltstack.com/en/latest/topics/releases/2017.7.2.html - Added: * enable-with-salt-version-parameter-for-setup.py-scri.patch - Removed: * add-a-salt-minion-service-control-file.patch * add-clean_id-function-to-salt.utils.verify.py.patch * add-options-for-dockerng.patch * add-ssh-option-to-salt-ssh.patch * add-unit-test-for-skip-false-values-from-preferred_i.patch * add-yum-plugin.patch * add-zypp-notify-plugin.patch * adding-salt-minion-watchdog-for-sysv-systems-rhel6-a.patch * adding-support-for-installing-patches-in-yum-dnf-exe.patch * avoid-failures-on-sles-12-sp2-because-of-new-systemd.patch * bugfix-jobs-scheduled-to-run-at-a-future-time-stay-p.patch * bugfix-unable-to-use-127-as-hostname.patch * catching-error-when-pidfile-cannot-be-deleted.patch * change-travis-configuration-file-to-use-salt-toaster.patch * check-if-byte-strings-are-properly-encoded-in-utf-8.patch * clean-up-change-attribute-from-interface-dict.patch * do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch * enables-salt-minion-watchdog-on-init.d-script-for-sy.patch * escape-the-os.sep.patch * fix-for-delete_deployment-in-kubernetes-module.patch * fix-format-error-bsc-1043111.patch * fix-grain-for-os_family-on-suse-series.patch * fix-os_family-case-in-unittest.patch * fix-regression-in-file.get_managed-add-unit-tests.patch * fix-salt-summary-to-count-not-responding-minions-cor.patch OBS-URL: https://build.opensuse.org/request/show/540260 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=98
2017-11-10 08:17:55 +01:00
START=$(pwd)
V_ENV="sphinx_doc_gen"
V_TMP=$(mktemp -d)
for f in "salt.spec" "salt*tar.gz"; do
cp -v $f $V_TMP
done
cd $V_TMP;
build_virtenv $V_ENV $2;
Accepting request 540260 from systemsmanagement:saltstack:products:unstable.py3 - Update to 2017.7.2 See https://docs.saltstack.com/en/latest/topics/releases/2017.7.2.html - Added: * enable-with-salt-version-parameter-for-setup.py-scri.patch - Removed: * add-a-salt-minion-service-control-file.patch * add-clean_id-function-to-salt.utils.verify.py.patch * add-options-for-dockerng.patch * add-ssh-option-to-salt-ssh.patch * add-unit-test-for-skip-false-values-from-preferred_i.patch * add-yum-plugin.patch * add-zypp-notify-plugin.patch * adding-salt-minion-watchdog-for-sysv-systems-rhel6-a.patch * adding-support-for-installing-patches-in-yum-dnf-exe.patch * avoid-failures-on-sles-12-sp2-because-of-new-systemd.patch * bugfix-jobs-scheduled-to-run-at-a-future-time-stay-p.patch * bugfix-unable-to-use-127-as-hostname.patch * catching-error-when-pidfile-cannot-be-deleted.patch * change-travis-configuration-file-to-use-salt-toaster.patch * check-if-byte-strings-are-properly-encoded-in-utf-8.patch * clean-up-change-attribute-from-interface-dict.patch * do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch * enables-salt-minion-watchdog-on-init.d-script-for-sy.patch * escape-the-os.sep.patch * fix-for-delete_deployment-in-kubernetes-module.patch * fix-format-error-bsc-1043111.patch * fix-grain-for-os_family-on-suse-series.patch * fix-os_family-case-in-unittest.patch * fix-regression-in-file.get_managed-add-unit-tests.patch * fix-salt-summary-to-count-not-responding-minions-cor.patch OBS-URL: https://build.opensuse.org/request/show/540260 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=98
2017-11-10 08:17:55 +01:00
SRC_DIR="salt-$(cat salt.spec | grep ^Version: | cut -d: -f2 | sed -e 's/[[:blank:]]//g')";
quilt_setup $SRC_DIR
build_docs doc $V_TMP
Accepting request 540260 from systemsmanagement:saltstack:products:unstable.py3 - Update to 2017.7.2 See https://docs.saltstack.com/en/latest/topics/releases/2017.7.2.html - Added: * enable-with-salt-version-parameter-for-setup.py-scri.patch - Removed: * add-a-salt-minion-service-control-file.patch * add-clean_id-function-to-salt.utils.verify.py.patch * add-options-for-dockerng.patch * add-ssh-option-to-salt-ssh.patch * add-unit-test-for-skip-false-values-from-preferred_i.patch * add-yum-plugin.patch * add-zypp-notify-plugin.patch * adding-salt-minion-watchdog-for-sysv-systems-rhel6-a.patch * adding-support-for-installing-patches-in-yum-dnf-exe.patch * avoid-failures-on-sles-12-sp2-because-of-new-systemd.patch * bugfix-jobs-scheduled-to-run-at-a-future-time-stay-p.patch * bugfix-unable-to-use-127-as-hostname.patch * catching-error-when-pidfile-cannot-be-deleted.patch * change-travis-configuration-file-to-use-salt-toaster.patch * check-if-byte-strings-are-properly-encoded-in-utf-8.patch * clean-up-change-attribute-from-interface-dict.patch * do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch * enables-salt-minion-watchdog-on-init.d-script-for-sy.patch * escape-the-os.sep.patch * fix-for-delete_deployment-in-kubernetes-module.patch * fix-format-error-bsc-1043111.patch * fix-grain-for-os_family-on-suse-series.patch * fix-os_family-case-in-unittest.patch * fix-regression-in-file.get_managed-add-unit-tests.patch * fix-salt-summary-to-count-not-responding-minions-cor.patch OBS-URL: https://build.opensuse.org/request/show/540260 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=98
2017-11-10 08:17:55 +01:00
cd $START
mv $V_TMP/html.tar.bz2 $START
rm -rf $V_TMP
Accepting request 540260 from systemsmanagement:saltstack:products:unstable.py3 - Update to 2017.7.2 See https://docs.saltstack.com/en/latest/topics/releases/2017.7.2.html - Added: * enable-with-salt-version-parameter-for-setup.py-scri.patch - Removed: * add-a-salt-minion-service-control-file.patch * add-clean_id-function-to-salt.utils.verify.py.patch * add-options-for-dockerng.patch * add-ssh-option-to-salt-ssh.patch * add-unit-test-for-skip-false-values-from-preferred_i.patch * add-yum-plugin.patch * add-zypp-notify-plugin.patch * adding-salt-minion-watchdog-for-sysv-systems-rhel6-a.patch * adding-support-for-installing-patches-in-yum-dnf-exe.patch * avoid-failures-on-sles-12-sp2-because-of-new-systemd.patch * bugfix-jobs-scheduled-to-run-at-a-future-time-stay-p.patch * bugfix-unable-to-use-127-as-hostname.patch * catching-error-when-pidfile-cannot-be-deleted.patch * change-travis-configuration-file-to-use-salt-toaster.patch * check-if-byte-strings-are-properly-encoded-in-utf-8.patch * clean-up-change-attribute-from-interface-dict.patch * do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch * enables-salt-minion-watchdog-on-init.d-script-for-sy.patch * escape-the-os.sep.patch * fix-for-delete_deployment-in-kubernetes-module.patch * fix-format-error-bsc-1043111.patch * fix-grain-for-os_family-on-suse-series.patch * fix-os_family-case-in-unittest.patch * fix-regression-in-file.get_managed-add-unit-tests.patch * fix-salt-summary-to-count-not-responding-minions-cor.patch OBS-URL: https://build.opensuse.org/request/show/540260 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=98
2017-11-10 08:17:55 +01:00
echo "Done"
echo "---------------"