Skip to content

Commit

Permalink
Add package & deploy for OSX builds
Browse files Browse the repository at this point in the history
  • Loading branch information
alranel committed Nov 8, 2018
1 parent b2ec596 commit ed1429b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ dist: trusty

before_install:
- sh package/common/travis-decrypt-key
- export SLIC3R_GIT_VERSION=$(git rev-parse HEAD)
- export SLIC3R_GIT_VERSION=$(git rev-parse --short HEAD)

script:
- if [[ "${TRAVIS_OS_NAME}" == "linux" && "$TARGET" == "main" ]]; then ./package/linux/travis-build-main.sh; fi
- if [[ "${TRAVIS_OS_NAME}" == "linux" && "$TARGET" == "cpp" ]]; then ./package/linux/travis-build-cpp.sh; fi
- if [[ "${TRAVIS_OS_NAME}" == "osx" && "$TARGET" == "main" ]]; then travis_wait 60 ./package/osx/travis-build-main.sh; fi
- if [[ "${TRAVIS_OS_NAME}" == "osx" && "$TARGET" == "main" ]]; then ./package/osx/travis-build-main.sh; fi
- if [[ "${TRAVIS_OS_NAME}" == "osx" && "$TARGET" == "cpp" ]]; then ./package/osx/travis-build-cpp.sh; fi

branches:
Expand Down
10 changes: 10 additions & 0 deletions package/osx/make_dmg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ set -euo pipefail
# Adapted from script written by bubnikv for Prusa3D.
# Run from slic3r repo root directory.

# While we might have a pp executable in our path, it might not be
# using the perl binary we have in path, so make sure they belong
# to the same Perl instance:
if !(perl -Mlocal::lib=local-lib -MPAR::Packer -e1 2> /dev/null); then
echo "The PAR::Packer module was not found; installing..."
cpanm --local-lib local-lib PAR::Packer
exit 1
fi

WD=$(dirname $0)
appname=Slic3r

Expand Down Expand Up @@ -59,6 +68,7 @@ PkgInfoContents="APPL????"
source $WD/plist.sh

# Our slic3r dir and location of perl
eval $(perl -Mlocal::lib=local-lib)
PERL_BIN=$(which perl)
PP_BIN=$(which pp)
SLIC3R_DIR=$(perl -MCwd=realpath -e "print realpath '${WD}/../../'")
Expand Down
3 changes: 2 additions & 1 deletion package/osx/travis-deploy-main.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -euo pipefail

package/osx/make_dmg.sh foo
package/osx/make_dmg.sh
package/deploy/sftp.sh mac ~/slic3r-upload.rsa *.bz2 Slic3r*.dmg

0 comments on commit ed1429b

Please sign in to comment.