mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-01 03:00:13 -04:00
Removed the source builder and added the zipping to the server in the release script.
This commit is contained in:
@@ -665,22 +665,6 @@ def SWIG_scilab_bin_builder(platform, gitMode = 'incremental', windows = False):
|
||||
compress="bz2"))
|
||||
return factory
|
||||
|
||||
def sourcezip_builder(gitMode = 'incremental', cmake_args = [], cmake_env = None):
|
||||
""" Zip up all the sources (including externals) and upload """
|
||||
|
||||
# Create the factory to add the actions to
|
||||
factory = getBaseFactory(gitMode=gitMode)
|
||||
factory.addStep(MakeDirectory(dir='install_root/source', haltOnFailure = True))
|
||||
factory.addStep(ShellCommand(command='chmod +x git-archive-all',
|
||||
workdir= "build/dev/scripts",
|
||||
haltOnFailure = True))
|
||||
factory.addStep(ShellCommand(command='dev/scripts/git-archive-all ../install_root/source/coolpropsource.zip',
|
||||
workdir= "build",
|
||||
haltOnFailure = True))
|
||||
# Upload the files
|
||||
factory.addStep(DirectoryUpload(slavesrc="../install_root",masterdest="public_html/binaries",url="binaries",compress="bz2"))
|
||||
return factory
|
||||
|
||||
def memory_sanitizer_builder():
|
||||
""" Run clang's memory sanitizer on the Catch tests to check for memory leaks """
|
||||
|
||||
@@ -861,13 +845,6 @@ c['builders'].append(
|
||||
factory = fortranFactory(platform=platformID["windows"],bitness=bitnessID["32bit"])
|
||||
)
|
||||
)
|
||||
c['builders'].append(
|
||||
BuilderConfig(
|
||||
name="source zipfile",
|
||||
slavenames=["OSX-slave"],
|
||||
factory = sourcezip_builder()
|
||||
)
|
||||
)
|
||||
c['builders'].append(
|
||||
BuilderConfig(
|
||||
name="Fortran-executable-linux-32bit-GCC-ExternC",
|
||||
|
||||
@@ -1,30 +1,41 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This script relys on a modified ~/.ssh/config to specify the
|
||||
# This script relys on a modified ~/.ssh/config to specify the
|
||||
# correct identity files to be used with the host aliases
|
||||
# git.code.sf.net-ibell and git.code.sf.net-jorritw
|
||||
# git.code.sf.net-ibell and git.code.sf.net-jorritw
|
||||
#
|
||||
# Work around for Cron:
|
||||
USER=coolprop
|
||||
source /home/$USER/.bash_profile
|
||||
#
|
||||
FOLDER="/home/$USER/src/CoolProp.git"
|
||||
ORIGIN="https://github.com/CoolProp/CoolProp.git"
|
||||
MIRROR="ssh://git.code.sf.net-jorritw/p/coolprop/git"
|
||||
#
|
||||
if [ ! -d $FOLDER ]; then # repo does not exist, clone it
|
||||
BASEFOLDER=${FOLDER%/*}
|
||||
REPOFOLDER=${FOLDER##*/}
|
||||
mkdir -p $BASEFOLDER
|
||||
pushd $BASEFOLDER
|
||||
git clone --mirror $ORIGIN $REPOFOLDER
|
||||
#pushd $REPOFOLDER
|
||||
#git remote add sfmirror $MIRROR
|
||||
#popd
|
||||
popd
|
||||
fi
|
||||
pushd $FOLDER
|
||||
git fetch --force $ORIGIN
|
||||
function createRepo {
|
||||
local GITOPT="$1"
|
||||
local FOLDER="$2"
|
||||
if [ ! -d $FOLDER ]; then # repo does not exist, clone it
|
||||
local BASEFOLDER=${FOLDER%/*}
|
||||
local REPOFOLDER=${FOLDER##*/}
|
||||
mkdir -p $BASEFOLDER
|
||||
pushd $BASEFOLDER
|
||||
git clone $GITOPT $ORIGIN $REPOFOLDER
|
||||
popd
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
#
|
||||
CURFOLDER="/home/$USER/src/CoolProp.git"
|
||||
createRepo "--mirror" "$CURFOLDER"
|
||||
pushd $CURFOLDER
|
||||
git fetch --force --all # $ORIGIN
|
||||
git push --force --mirror $MIRROR
|
||||
popd
|
||||
#
|
||||
CURFOLDER="/home/$USER/src/CoolPropFull.git"
|
||||
createRepo "--recursive" "$CURFOLDER"
|
||||
pushd $CURFOLDER
|
||||
git pull
|
||||
popd
|
||||
#
|
||||
exit 0
|
||||
|
||||
@@ -1,23 +1,32 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Make sure that only one argument is passed to this script - the version that will be released
|
||||
# Make sure that only two arguments are passed to this script - the version that
|
||||
# will be released and the dryrun vs. release option.
|
||||
if [ $# != 2 ]; then
|
||||
echo "Only two arguments should be passed to this script - the version that will be released and if you would like a dry run or a release; like \"release.bsh 5.0.0 dryrun\" or \"release.bsh nightly release\"."
|
||||
exit 1
|
||||
echo "Only two arguments should be passed to this script: "
|
||||
echo "The version that will be released and if you would like a dry run or a release."
|
||||
echo "for example: \"release.bsh 5.0.0 dryrun\" or \"release.bsh nightly release\" "
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
CPVERSION="$1"
|
||||
BASEDIR="$HOME/buildbot/server-master/public_html"
|
||||
REPODIR="$HOME/src/CoolPropFull.git"
|
||||
BINFOLDER="binaries"
|
||||
DOCFOLDER="sphinx"
|
||||
SRCFOLDER="$BASEDIR/$BINFOLDER/source"
|
||||
SEPARATOR="----------------------------------"
|
||||
#
|
||||
SFUSER="jorritw" # ibell or jorritw
|
||||
SFUSER="jorritw" # ibell or jorritw
|
||||
#
|
||||
function printMessage {
|
||||
echo " "
|
||||
echo $SEPARATOR
|
||||
echo "$1"
|
||||
return 0
|
||||
}
|
||||
#
|
||||
echo " "
|
||||
echo $SEPARATOR
|
||||
echo "Processing the input variables: "
|
||||
printMessage "Processing the input variables: "
|
||||
#
|
||||
CPVERSION="$1"
|
||||
if [[ $CPVERSION == +([0-9]).+([0-9]).+([0-9]) ]]; then
|
||||
@@ -31,56 +40,48 @@ fi
|
||||
#
|
||||
if [ "$2" == "release" ]; then
|
||||
DRYRUN=false
|
||||
else
|
||||
else
|
||||
DRYRUN=true
|
||||
fi
|
||||
echo "DRYRUN = $DRYRUN"
|
||||
#
|
||||
# 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 {} \;
|
||||
#
|
||||
|
||||
pushd ${BASEDIR} # Change the folder
|
||||
if [ "$DRYRUN" != "false" ]; then
|
||||
echo " "
|
||||
echo $SEPARATOR
|
||||
printMessage "Dry run detected"
|
||||
echo "Dry run; no zipping of the sources"
|
||||
echo "Dry run; no zipping of the docs"
|
||||
echo "Dry run; skipping python upload"
|
||||
echo "Dry run; skipping folder date"
|
||||
RSYNC_DRY_RUN=--dry-run
|
||||
else
|
||||
pushd "$REPODIR"
|
||||
git pull
|
||||
python dev/scripts/git-archive-all $SRCFOLDER/CoolProp_sources.zip
|
||||
popd
|
||||
if [ "$CPVERSION" = "nightly" ]; then
|
||||
RSYNC_OPTS="-a --no-perms -z --stats --delete"
|
||||
rm -rf "$BINFOLDER/docs"
|
||||
CPVERSION="$CPVERSION"/ #$(date +%F)
|
||||
else
|
||||
RSYNC_OPTS="-a --no-perms -z --stats"
|
||||
echo " "
|
||||
echo $SEPARATOR
|
||||
echo "Zipping up the docs and moving them into the $BINFOLDER folder for staging"
|
||||
printMessage "Zipping up the docs and moving them into the $BINFOLDER folder for staging"
|
||||
rm -f documentation.zip
|
||||
zip -rq documentation.zip $DOCFOLDER/*
|
||||
mkdir -p "$BINFOLDER/docs"
|
||||
cp documentation.zip "$BINFOLDER/docs"
|
||||
echo "Uploading the python binaries to pypi"
|
||||
twine upload $BINFOLDER/Python/*.whl $BINFOLDER/Python/*.tar.gz
|
||||
fi
|
||||
fi
|
||||
RSYNC_DRY_RUN=
|
||||
fi
|
||||
#
|
||||
echo " "
|
||||
echo $SEPARATOR
|
||||
echo "Copying the binaries to SourceForge"
|
||||
printMessage "Copying the binaries to SourceForge"
|
||||
rsync $RSYNC_DRY_RUN $RSYNC_OPTS "$BINFOLDER/" frs.sf.net-$SFUSER:/home/frs/project/coolprop/CoolProp/$CPVERSION
|
||||
if [ ${CPVERSION:0:7} != "nightly" ]; then
|
||||
echo " "
|
||||
echo $SEPARATOR
|
||||
echo "Publishing the docs on SourceForge"
|
||||
printMessage "Publishing the docs on SourceForge"
|
||||
rsync $RSYNC_DRY_RUN $RSYNC_OPTS "$DOCFOLDER/" frs.sf.net-$SFUSER:/home/project-web/coolprop/htdocs
|
||||
fi
|
||||
# Change back to where we came from
|
||||
popd
|
||||
echo " "
|
||||
echo "All done, goodbye."
|
||||
printMessage "All done, goodbye."
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user