forked from Mudlet/Mudlet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add after_success scripts for deployment * Some fixes to installer creation process * Add transfer.sh deployment for macOS installers * Make end output a little nicer and echo deploy URL * Add gitter notification to after_success hook * Adapt travis.osx.after_succes.sh to latest installer changes * Add everything needed for tag deployment * Fix shellcheck warnings * Avoid building the installer if the build repo is not "Mudlet/Mudlet"
- Loading branch information
Showing
6 changed files
with
82 additions
and
11 deletions.
There are no files selected for viewing
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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
if [ "${TRAVIS_REPO_SLUG}" != "Mudlet/Mudlet" ]; then | ||
exit 0 | ||
fi | ||
|
||
if [ -z "${TRAVIS_OS_NAME}" ] || [ "${TRAVIS_OS_NAME}" = "linux" ]; then | ||
echo Deploy on linux. | ||
. CI/travis.linux.after_success.sh; | ||
fi | ||
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then | ||
echo Deploy on OSX. | ||
. CI/travis.osx.after_success.sh; | ||
fi | ||
|
||
if [ ! -z "${DEPLOY_URL}" ]; then | ||
curl \ | ||
--data-urlencode "message=Deployed Mudlet \`${VERSION}${BUILD}\` (${TRAVIS_OS_NAME}) to [${DEPLOY_URL}](${DEPLOY_URL})" \ | ||
https://webhooks.gitter.im/e/cc99072d43b642c4673a | ||
fi | ||
|
||
echo "" | ||
echo "******************************************************" | ||
echo "" | ||
echo "Finished building Mudlet ${VERSION}${BUILD}" | ||
if [ ! -z "${DEPLOY_URL}" ]; then | ||
echo "Deployed the output to ${DEPLOY_URL}" | ||
fi | ||
echo "" | ||
echo "******************************************************" |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# we deploy only qmake and clang combination for macOS | ||
if [ "${Q_OR_C_MAKE}" = "qmake" ] && [ "${CC}" = "clang" ]; then | ||
git clone https://github.com/Mudlet/installers.git "${TRAVIS_BUILD_DIR}/../installers" | ||
|
||
cd "${TRAVIS_BUILD_DIR}/../installers/osx" | ||
|
||
ln -s "${TRAVIS_BUILD_DIR}" source | ||
|
||
if [ -z "${TRAVIS_TAG}" ]; then | ||
appBaseName="Mudlet-${VERSION}${BUILD}" | ||
mv "source/build/Mudlet.app" "source/build/${appBaseName}.app" | ||
|
||
bash make-installer.sh "${appBaseName}.app" | ||
|
||
DEPLOY_URL=$(wget --method PUT --body-file="${HOME}/Desktop/${appBaseName}.dmg" "https://transfer.sh/${appBaseName}.dmg" -O - -q) | ||
else | ||
|
||
# add ssh-key to ssh-agent for deployment | ||
# shellcheck disable=2154 | ||
# the two "undefined" variables are defined by travis | ||
openssl aes-256-cbc -K "${encrypted_70dbe4c5e427_key}" -iv "${encrypted_70dbe4c5e427_iv}" -in "${TRAVIS_BUILD_DIR}/CI/mudlet-deploy-key.enc" -out /tmp/mudlet-deploy-key -d | ||
eval "$(ssh-agent -s)" | ||
chmod 600 /tmp/mudlet-deploy-key | ||
ssh-add /tmp/mudlet-deploy-key | ||
|
||
bash make-installer.sh -r "${VERSION}" source/build/Mudlet.app | ||
|
||
mv "${HOME}/Desktop/Mudlet.dmg" "${HOME}/Desktop/Mudlet-${VERSION}.dmg" | ||
|
||
DEPLOY_URL=$(scp -i /tmp/mudlet-deploy-key "${HOME}/Desktop/Mudlet-${VERSION}.dmg" "keneanung@mudlet.org:${DEPLOY_PATH}") | ||
fi | ||
export DEPLOY_URL | ||
fi | ||
|
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