Skip to content

Commit

Permalink
drop MASON_CXX_VERSION from OS X and iOS publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemorris committed Sep 22, 2015
1 parent 044fb77 commit 4f3378d
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions mason.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,6 @@ if [ ${MASON_PLATFORM} = 'osx' ]; then
export MASON_HOST_ARG="--host=x86_64-apple-darwin"
export MASON_PLATFORM_VERSION=`xcrun --sdk macosx --show-sdk-version`

MASON_CXX=${CXX:-`c++ -v 2>&1`}
if [[ ${CXX} ]]; then
MASON_CXX_DUMPVERSION=`${CXX} -dumpversion`
else
MASON_CXX_DUMPVERSION=`c++ -dumpversion`
fi

if [[ ${MASON_CXX} =~ "clang" ]]; then
export MASON_CXX_VERSION='clang++-'${MASON_CXX_DUMPVERSION}
elif [[ ${MASON_CXX} =~ "g++" || ${MASON_CXX} =~ "gcc" ]]; then
export MASON_CXX_VERSION='g++-'${MASON_CXX_DUMPVERSION}
fi

if [[ ${MASON_PLATFORM_VERSION##*.} -ge 11 ]]; then
export MASON_DYNLIB_SUFFIX="tbd"
else
Expand Down Expand Up @@ -99,22 +86,22 @@ elif [ ${MASON_PLATFORM} = 'ios' ]; then
export MASON_ISIM_CFLAGS="${MIN_SDK_VERSION_FLAG} -isysroot ${MASON_SDK_PATH} -arch i386 -arch x86_64"

elif [ ${MASON_PLATFORM} = 'linux' ]; then

export MASON_DYNLIB_SUFFIX="so"

MASON_CXX=${CXX:-`c++ -v 2>&1`}

if [[ ${CXX} ]]; then
MASON_CXX_DUMPVERSION=`${CXX} -dumpversion`
else
MASON_CXX_DUMPVERSION=`c++ -dumpversion`
fi

if [[ ${MASON_CXX} =~ "clang" ]]; then
export MASON_CXX_VERSION='clang++-'${MASON_CXX_DUMPVERSION}
export MASON_CXX_VERSION='-clang-'${MASON_CXX_DUMPVERSION}
elif [[ ${MASON_CXX} =~ "g++" || ${MASON_CXX} =~ "gcc" ]]; then
export MASON_CXX_VERSION='g++-'${MASON_CXX_DUMPVERSION}
export MASON_CXX_VERSION='-gcc-'${MASON_CXX_DUMPVERSION}
fi

export MASON_DYNLIB_SUFFIX="so"

# Assume current system is the target platform
if [ -z ${MASON_PLATFORM_VERSION} ] ; then
export MASON_PLATFORM_VERSION=`uname -m`
Expand Down Expand Up @@ -271,7 +258,7 @@ fi
MASON_PREFIX=${MASON_ROOT}/${MASON_PLATFORM_ID}/${MASON_NAME}/${MASON_VERSION}
MASON_BINARIES_PREFIX=${MASON_PLATFORM_ID}/${MASON_NAME}/${MASON_VERSION}
if [[ ${MASON_CXX_PACKAGE} == true ]]; then
MASON_BINARIES=${MASON_BINARIES_PREFIX}-${MASON_CXX_VERSION}.tar.gz
MASON_BINARIES=${MASON_BINARIES_PREFIX}${MASON_CXX_VERSION}.tar.gz
else
MASON_BINARIES=${MASON_BINARIES_PREFIX}.tar.gz
fi
Expand Down Expand Up @@ -627,8 +614,7 @@ function mason_publish {
local MD5="$(openssl md5 -binary < "${MASON_BINARIES_PATH}" | base64)"
local SIGNATURE="$(printf "PUT\n$MD5\n$CONTENT_TYPE\n$DATE\nx-amz-acl:public-read\n/${MASON_BUCKET}/${MASON_BINARIES}" | openssl sha1 -binary -hmac "$AWS_SECRET_ACCESS_KEY" | base64)"

echo ${MASON_BINARIES_PATH}
curl -S -T ${MASON_BINARIES_PATH} https://${MASON_BUCKET}.s3.amazonaws.com/${MASON_BINARIES} \
curl -S -T "${MASON_BINARIES_PATH}" https://${MASON_BUCKET}.s3.amazonaws.com/${MASON_BINARIES} \
-H "Date: $DATE" \
-H "Authorization: AWS $AWS_ACCESS_KEY_ID:$SIGNATURE" \
-H "Content-Type: $CONTENT_TYPE" \
Expand Down

0 comments on commit 4f3378d

Please sign in to comment.