mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
chore(travis): Allow for Travis deployment
Allows for OSX packages through travis, .travis.yml requires editing chore(travis): Let Travis deploy OSX Allows Travis to start Deploying when ever a tag is applied.
This commit is contained in:
parent
774f3c1641
commit
2639217747
22
.travis.yml
22
.travis.yml
@ -1,14 +1,24 @@
|
|||||||
sudo: required
|
sudo: required
|
||||||
dist: trusty
|
dist: trusty
|
||||||
|
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
- osx
|
- osx
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then bash ./verify-commit-messages.sh "$TRAVIS_COMMIT_RANGE" ; fi
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then bash ./verify-commit-messages.sh "$TRAVIS_COMMIT_RANGE"; fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then bash ./.travis/build-ubuntu_14_04.sh; fi
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then bash ./.travis/build-ubuntu_14_04.sh; fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -i ; fi
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -i ; fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -b ; fi
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -b ; fi
|
||||||
|
before_deploy:
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -d ; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash ./osx/qTox-Mac-Deployer-ULTIMATE.sh -dmg ; fi
|
||||||
|
deploy:
|
||||||
|
provider: releases
|
||||||
|
api_key:
|
||||||
|
secure: "BRbzTWRvadALRQSTihMKruOj64ydxusMUS9FQR//qFlS345ZYfYta43W//4LcWWDKtj6IvA6DRqNdabgWnpbpxpnm9gVftGUdOKlU3niPZhwsMkB2M12QHUnAP6DVOfGPvdciBV+6mu73SSxniEcrYjZ1CrRX7mknmehPpVKxNk="
|
||||||
|
file: "./qTox.dmg"
|
||||||
|
on:
|
||||||
|
condition: $TRAVIS_OS_NAME == osx
|
||||||
|
repo: tux3/qTox
|
||||||
|
tags: true
|
||||||
|
skip_cleanup: true
|
||||||
|
BIN
osx/DS_Store-DMG
Normal file
BIN
osx/DS_Store-DMG
Normal file
Binary file not shown.
BIN
osx/background-DMG/qTox-DMG-bak.tiff
Normal file
BIN
osx/background-DMG/qTox-DMG-bak.tiff
Normal file
Binary file not shown.
@ -17,7 +17,7 @@
|
|||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>qTox</string>
|
<string>qTox</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.2.2</string>
|
<string>1.4.1</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>@SHORT_VERSION@</string>
|
<string>@SHORT_VERSION@</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
|
@ -22,12 +22,15 @@
|
|||||||
# Use: ./qTox-Mac-Deployer-ULTIMATE.sh -h
|
# Use: ./qTox-Mac-Deployer-ULTIMATE.sh -h
|
||||||
|
|
||||||
# Your home DIR really (Most of this happens in it) {DONT USE: ~ }
|
# Your home DIR really (Most of this happens in it) {DONT USE: ~ }
|
||||||
|
SUBGIT="" #Change this to define a 'sub' git folder e.g. "-Patch"
|
||||||
|
#Applys to $QTOX_DIR, $BUILD_DIR, and $DEPLOY_DIR folders for organization puropses
|
||||||
|
|
||||||
if [[ $TRAVIS = true ]]; then #travis check
|
if [[ $TRAVIS = true ]]; then #travis check
|
||||||
MAIN_DIR="${TRAVIS_BUILD_DIR}"
|
MAIN_DIR="${TRAVIS_BUILD_DIR}"
|
||||||
QTOX_DIR="${MAIN_DIR}"
|
QTOX_DIR="${MAIN_DIR}"
|
||||||
else
|
else
|
||||||
MAIN_DIR="/Users/${USER}"
|
MAIN_DIR="/Users/${USER}"
|
||||||
QTOX_DIR="${MAIN_DIR}/qTox"
|
QTOX_DIR="${MAIN_DIR}/qTox${SUBGIT}"
|
||||||
fi
|
fi
|
||||||
QT_DIR="/usr/local/Cellar/qt5" # Folder name of QT install
|
QT_DIR="/usr/local/Cellar/qt5" # Folder name of QT install
|
||||||
# Figure out latest version
|
# Figure out latest version
|
||||||
@ -46,8 +49,8 @@ if [[ ! -e "${LIB_INSTALL_PREFIX}" ]]; then
|
|||||||
mkdir -p "${LIB_INSTALL_PREFIX}"
|
mkdir -p "${LIB_INSTALL_PREFIX}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BUILD_DIR="${MAIN_DIR}/qTox-Mac_Build"
|
BUILD_DIR="${MAIN_DIR}/qTox-Mac_Build${SUBGIT}"
|
||||||
DEPLOY_DIR="${MAIN_DIR}/qTox-Mac_Deployed"
|
DEPLOY_DIR="${MAIN_DIR}/qTox-Mac_Deployed${SUBGIT}"
|
||||||
|
|
||||||
|
|
||||||
function fcho() {
|
function fcho() {
|
||||||
@ -245,52 +248,64 @@ function bootstrap() {
|
|||||||
sudo ./bootstrap-osx.sh
|
sudo ./bootstrap-osx.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
# The commands
|
function dmgmake() {
|
||||||
if [[ "$1" == "-i" ]]; then
|
fcho "------------------------------"
|
||||||
install
|
fcho "Starting DMG creation"
|
||||||
exit
|
cd $DEPLOY_DIR
|
||||||
fi
|
ln -s /Applications "./Install to Applications"
|
||||||
|
cp -r -f $QTOX_DIR/osx/background-DMG ./.background
|
||||||
if [[ "$1" == "-u" ]]; then
|
cp -f $QTOX_DIR/osx/DS_Store-DMG ./.DS_Store
|
||||||
update
|
cp -f $QTOX_DIR/LICENSE ./LICENSE
|
||||||
exit
|
cp -f $QTOX_DIR/README.md ./README.md
|
||||||
fi
|
cd $QTOX_DIR
|
||||||
|
hdiutil create -volname qTox${SUBGIT} -srcfolder $DEPLOY_DIR -format UDZO qTox${SUBGIT}.dmg
|
||||||
|
}
|
||||||
|
|
||||||
if [[ "$1" == "-b" ]]; then
|
function helpme() {
|
||||||
build
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$1" == "-boot" ]]; then
|
|
||||||
bootstrap
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$1" == "-d" ]]; then
|
|
||||||
deploy
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$1" == "-ubd" ]]; then
|
|
||||||
update
|
|
||||||
build
|
|
||||||
deploy
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$1" == "-h" ]]; then
|
|
||||||
echo "This script was created to help ease the process of compiling and creating a distributable qTox package for OSX systems."
|
echo "This script was created to help ease the process of compiling and creating a distributable qTox package for OSX systems."
|
||||||
echo "The available commands are:"
|
echo "The available commands are:"
|
||||||
echo "-h -- This help text."
|
echo "-h | --help -- This help text."
|
||||||
echo "-i -- A slightly automated process for getting an OSX machine ready to build Toxcore and qTox."
|
echo "-i | --instal -- A slightly automated process for getting an OSX machine ready to build Toxcore and qTox."
|
||||||
echo "-u -- Check for updates and build Toxcore from git & update qTox from git."
|
echo "-u | --update -- Check for updates and build Toxcore from git & update qTox from git."
|
||||||
echo "-b -- Builds qTox in: ${BUILD_DIR}"
|
echo "-b | --build -- Builds qTox in: ${BUILD_DIR}"
|
||||||
echo "-boot -- Performs bootstrap steps."
|
echo "-d | --deploy -- Makes a distributable qTox.app file in: ${DEPLOY_DIR}"
|
||||||
echo "-d -- Makes a distributable qTox.app file in: ${DEPLOY_DIR}"
|
echo "-bs | --bootstrap -- Performs bootstrap steps."
|
||||||
echo "-ubd -- Does -u, -b, and -d sequentially"
|
|
||||||
fcho "Issues with Toxcore or qTox should be reported to their respective repos: https://github.com/irungentoo/toxcore | https://github.com/tux3/qTox"
|
fcho "Issues with Toxcore or qTox should be reported to their respective repos: https://github.com/irungentoo/toxcore | https://github.com/tux3/qTox"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
-h | --help)
|
||||||
|
helpme
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
-i | --install)
|
||||||
|
install
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
-u | --update)
|
||||||
|
update
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
-b | --build)
|
||||||
|
build
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
-d | --deploy)
|
||||||
|
deploy
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
-bs | --bootstrap)
|
||||||
|
bootstrap
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
-dmg)
|
||||||
|
dmgmake
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
fcho "Oh dear! You seemed to of started this script improperly! Use -h to get available commands and information!"
|
fcho "Oh dear! You seemed to of started this script improperly! Use -h to get available commands and information!"
|
||||||
echo " "
|
echo " "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user