-
-
Save totten/7abeb9eb9558c5bc9d4105b40c19b1e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Jenkins Job | |
### Name: Tool-Publish-civix | |
### Source code management: git, https://github.com/totten/civix.git | |
### Build trigger: Poll SCM every 10 minutes | |
### Build script: | |
#!/bin/bash | |
set -ex | |
#### Config | |
PROGRAM=civix.phar | |
TMPFILE=bin/civix.phar | |
PUBLISH_DIR=/var/www/download.civicrm.org/public/civix | |
REVISION=$(date +'%Y-%m-%d')-$(git rev-parse HEAD | head -c8) | |
PHP=/opt/php/5.4.45/bin/php | |
export PATH=$HOME/buildkit/bin:$PATH | |
#### Build it | |
[ -d vendor ] && rm -rf vendor | |
[ -f "$TMPFIE" ] && rm -f "$TMPFILE" | |
$PHP `which composer` install --no-scripts | |
$PHP -dphar.readonly=0 `which box` build | |
#### Publish | |
mv "$TMPFILE" "${PUBLISH_DIR}/${PROGRAM}-${REVISION}" | |
pushd "${PUBLISH_DIR}" | |
[ -L "${PROGRAM}" ] && rm -f "${PROGRAM}" | |
ln -s "${PROGRAM}-${REVISION}" "${PROGRAM}" | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment