Skip to content

Commit

Permalink
make deploy added for macosx
Browse files Browse the repository at this point in the history
  • Loading branch information
uliss committed Mar 23, 2018
1 parent 1480750 commit 61ab2b1
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
39 changes: 39 additions & 0 deletions ceammc/distrib/mac/github_upload_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

cd ~
eval `gpgshell`
cd -

if [[ -z ${GITHUB_TOKEN} ]]
then
tput setaf 9
echo "ERROR: "
tput setaf 15
echo " \$GITHUB_TOKEN is not set. Exiting..."
exit 1
fi

DMG="$1"

if [ ! -f "$DMG" ]
then
tput setaf 9
echo "ERROR: "
tput setaf 15
echo " file is not found: $DMG. Exiting..."
exit 1
fi

TAG="v$2"
USER=uliss
REPO="pure-data"
NAME=$(basename $DMG)

github-release upload --user $USER \
--repo $REPO \
--tag $TAG \
--name $NAME \
--file "$DMG" \
--replace


12 changes: 12 additions & 0 deletions cmake/PdPlatform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,18 @@ if(APPLE)
${PROJECT_SOURCE_DIR}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
DEPENDS app)

find_program(GPGENV_EXE NAMES gpgenv)

if(GPGENV_EXE)
add_custom_target(deploy
COMMAND
${PROJECT_SOURCE_DIR}/ceammc/distrib/mac/github_upload_release.sh
"${PROJECT_BINARY_DIR}/Pd_${PD_MACOSX_BUNDLE_SUFFIX}-macosx-${MACOSX_VERSION}.dmg"
${CEAMMC_DISTRIB_VERSION}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
DEPENDS app)
endif()
endif()

if(UNIX AND NOT APPLE)
Expand Down

0 comments on commit 61ab2b1

Please sign in to comment.