Skip to content

Commit

Permalink
Merge branch 'release-3.6.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasvanlierop committed Sep 6, 2013
2 parents d7ee505 + c8759b1 commit df2d727
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 35 deletions.
62 changes: 27 additions & 35 deletions bin/makeRelease.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# @todo add more error handling

RELEASE_DIR=${HOME}/Releases
GITHUB_USER=OpenConext
Expand Down Expand Up @@ -27,64 +28,55 @@ else
TAG=$1
fi

PROJECT_DIR_NAME=${PROJECT_NAME}-${TAG}
PROJECT_DIR=${RELEASE_DIR}/${PROJECT_DIR_NAME}

# Create empty dir
mkdir -p ${RELEASE_DIR}
rm -rf ${RELEASE_DIR}/${PROJECT_NAME}
rm -rf ${PROJECT_DIR}

# get Composer
(
cd ${RELEASE_DIR}
curl -O http://getcomposer.org/composer.phar
)

# clone the tag
(
cd ${RELEASE_DIR}
git clone -b ${TAG} https://github.com/${GITHUB_USER}/${PROJECT_NAME}.git
)
git clone -b ${TAG} https://github.com/${GITHUB_USER}/${PROJECT_NAME}.git ${PROJECT_DIR_NAME}

# run Composer
(
cd ${RELEASE_DIR}/${PROJECT_NAME}
cd ${PROJECT_DIR}
php ${RELEASE_DIR}/composer.phar install --no-dev
)

# remove Git and Composer files
(
rm -rf ${RELEASE_DIR}/${PROJECT_NAME}/.git
rm -f ${RELEASE_DIR}/${PROJECT_NAME}/.gitignore
rm -f ${RELEASE_DIR}/${PROJECT_NAME}/composer.json
rm -f ${RELEASE_DIR}/${PROJECT_NAME}/composer.lock
rm -f ${RELEASE_DIR}/${PROJECT_NAME}/makeRelease.sh
rm -f ${RELEASE_DIR}/${PROJECT_NAME}/bin/composer.phar
rm -rf ${RELEASE_DIR}/${PROJECT_NAME}/features
rm -rf ${RELEASE_DIR}/${PROJECT_NAME}/behat.yml
rm -rf ${RELEASE_DIR}/${PROJECT_NAME}/build.xml
rm -rf ${RELEASE_DIR}/${PROJECT_NAME}/tests
rm -rf ${RELEASE_DIR}/${PROJECT_NAME}/ci

)

# remove files that are not required for production
rm -rf ${PROJECT_DIR}/.idea
rm -rf ${PROJECT_DIR}/.git
rm -f ${PROJECT_DIR}/.gitignore
rm -f ${PROJECT_DIR}/composer.json
rm -f ${PROJECT_DIR}/composer.lock
rm -f ${PROJECT_DIR}/makeRelease.sh
rm -f ${PROJECT_DIR}/bin/composer.phar
rm -rf ${PROJECT_DIR}/features
rm -rf ${PROJECT_DIR}/behat.yml
rm -rf ${PROJECT_DIR}/build.xml
rm -rf ${PROJECT_DIR}/tests
rm -rf ${PROJECT_DIR}/ci
rm -rf ${PROJECT_DIR}/.travis.yml

# create tarball
(
cd ${RELEASE_DIR}
tar -czf ${PROJECT_DIR_NAME}.tar.gz ${PROJECT_DIR_NAME}

tar -czf ${PROJECT_NAME}-${TAG}.tar.gz ${PROJECT_NAME}
)

# create checksum file
(
cd ${RELEASE_DIR}
shasum ${PROJECT_NAME}-${TAG}.tar.gz > ${PROJECT_NAME}.sha
)
shasum ${PROJECT_DIR_NAME}.tar.gz > ${PROJECT_DIR_NAME}.sha

# sign it if requested
(
if [ -n "$2" ]
then
if [ "$2" == "sign" ]
then
cd ${RELEASE_DIR}
gpg -o ${PROJECT_NAME}.sha.gpg --clearsign ${PROJECT_NAME}.sha
gpg -o ${PROJECT_DIR_NAME}.sha.gpg --clearsign ${PROJECT_DIR_NAME}.sha
fi
fi
)
fi
4 changes: 4 additions & 0 deletions docs/release_notes/v3.6.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SURFnet SURFconext v3.6.1 Release Notes #

Feature/Bugfix release
Updated make releas escript so that the dir in tar contains a version nr

0 comments on commit df2d727

Please sign in to comment.