Added SSH keys to sourceforge binary uploads and website update.

This commit is contained in:
Jorrit Wronski
2014-12-07 00:50:10 +01:00
parent 7d41e016a5
commit 503e7b584b
3 changed files with 44 additions and 12 deletions

View File

@@ -6,32 +6,43 @@ if [ $# != 1 ]; then
exit 1
fi
echo "DRYRUN=${DRYRUN}"
CPVERSION=$1
SFUSER=ibell
BASEDIR=${HOME}/buildbot/server-master/public_html
CPVERSION="$1"
BASEDIR="${HOME}/buildbot/server-master/public_html"
#
#SFUSER="ibell"
#SFPASS="${HOME}/etc_opt/id_ibell"
#
SFUSER="jorritw"
SFPASS="${HOME}/etc_opt/id_jorritw"
#
#set -x #echo on
# Change the folder
pushd ${BASEDIR}
#echo "Fixing the permissions of directories and files" # This is not needed, just ignore the perms in rsync
#find . -type d ! -perm 0775 -exec chmod 0775 {} \;
#find . -type f ! -perm 0664 -exec chmod 0664 {} \;
echo "Zipping up the docs and moving them into the binaries folder for staging"
rm -f documentation.zip
zip -rq documentation.zip sphinx/*
mkdir -p binaries/docs
cp documentation.zip binaries/docs
if [ "$DRYRUN" = "true" ]; then
echo "Dry run; no zipping of the docs"
echo "Dry run; skipping python upload"
RSYNC_DRY_RUN=--dry-run
else
echo "Zipping up the docs and moving them into the binaries folder for staging"
rm -f documentation.zip
zip -rq documentation.zip sphinx/*
mkdir -p binaries/docs
cp documentation.zip binaries/docs
echo "Uploading the python binaries to pypi"
twine upload binaries/Python/*.whl binaries/Python/*.tar.gz
RSYNC_DRY_RUN=
fi
echo "Copying the binaries to sourceforge, requires password for user $SFUSER"
RSYNC_PASSWORD=`less ${HOME}/sfpass` rsync $RSYNC_DRY_RUN -a --no-perms -z --stats binaries/ ${SFUSER},coolprop@frs.sf.net:/home/pfs/project/c/co/coolprop/CoolProp/${CPVERSION}
echo "Publishing the docs on sourceforge, requires password for user $SFUSER"
RSYNC_PASSWORD=`less ${HOME}/sfpass` rsync $RSYNC_DRY_RUN -a --no-perms -z --stats sphinx/ ${SFUSER}@web.sourceforge.net:/home/project-web/coolprop/htdocs
echo "Preparing the ssh key for SourceForge"
eval $(ssh-agent) # Make sure ssh-agent is running
ssh-add "$SFPASS"
#
echo "Copying the binaries to SourceForge"
rsync $RSYNC_DRY_RUN -a --no-perms -z --stats binaries/ ${SFUSER},coolprop@frs.sf.net:/home/pfs/project/c/co/coolprop/CoolProp/${CPVERSION}
echo "Publishing the docs on SourceForge"
rsync $RSYNC_DRY_RUN -a --no-perms -z --stats sphinx/ ${SFUSER}@web.sourceforge.net:/home/project-web/coolprop/htdocs
# Change back to where we came from
popd
echo "All done, goodbye."