"Fossies" - the Fresh Open Source Software Archive

Member "ponyc-0.33.2/.ci-scripts/x86-64-apple-darwin-release.bash" (3 Feb 2020, 1292 Bytes) of package /linux/misc/ponyc-0.33.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 
    3 set -e
    4 
    5 API_KEY=$1
    6 if [[ ${API_KEY} == "" ]]
    7 then
    8   echo "API_KEY needs to be supplied as first script argument."
    9   exit 1
   10 fi
   11 
   12 
   13 # Compiler target parameters
   14 ARCH=x86-64
   15 PIC=true
   16 
   17 # Triple construction
   18 VENDOR=apple
   19 OS=darwin
   20 TRIPLE=${ARCH}-${VENDOR}-${OS}
   21 
   22 # Build parameters
   23 MAKE_PARALLELISM=8
   24 BUILD_PREFIX=$(mktemp -d)
   25 DESTINATION=${BUILD_PREFIX}/lib/pony
   26 
   27 # Asset information
   28 PACKAGE_DIR=$(mktemp -d)
   29 PACKAGE=ponyc-${TRIPLE}
   30 
   31 # Cloudsmith configuration
   32 CLOUDSMITH_VERSION=$(cat VERSION)
   33 ASSET_OWNER=ponylang
   34 ASSET_REPO=releases
   35 ASSET_PATH=${ASSET_OWNER}/${ASSET_REPO}
   36 ASSET_FILE=${PACKAGE_DIR}/${PACKAGE}.tar.gz
   37 ASSET_SUMMARY="Pony compiler"
   38 ASSET_DESCRIPTION="https://github.com/ponylang/ponyc"
   39 
   40 # Build pony installation
   41 echo "Building ponyc installation..."
   42 make install prefix=${BUILD_PREFIX} default_pic=${PIC} arch=${ARCH} \
   43   -j${MAKE_PARALLELISM} -f Makefile-lib-llvm symlink=no
   44 
   45 # Package it all up
   46 echo "Creating .tar.gz of ponyc installation..."
   47 pushd ${DESTINATION} || exit 1
   48 tar -cvzf ${ASSET_FILE} *
   49 popd || exit 1
   50 
   51 # Ship it off to cloudsmith
   52 echo "Uploading package to cloudsmith..."
   53 cloudsmith push raw --version "${CLOUDSMITH_VERSION}" --api-key ${API_KEY} \
   54   --summary "${ASSET_SUMMARY}" --description "${ASSET_DESCRIPTION}" \
   55   ${ASSET_PATH} ${ASSET_FILE}