mirror of
https://github.com/frappe/books.git
synced 2024-11-08 14:50:56 +00:00
8a1392e533
- add code mirror dependencies to silence warning - bump node version to allow execa
44 lines
910 B
Bash
Executable File
44 lines
910 B
Bash
Executable File
# #! /bin/zsh
|
|
|
|
set -e
|
|
|
|
# Check node and yarn versions
|
|
YARN_VERSION=$(yarn --version)
|
|
if [ "$YARN_VERSION" != "1.22.18" ]; then
|
|
echo "Incorrect yarn version: $YARN_VERSION"
|
|
exit 1
|
|
fi
|
|
|
|
# Source secrets
|
|
source .env.publish
|
|
|
|
# Create folder for the publish build
|
|
cd ../
|
|
rm -rf build_publish
|
|
mkdir build_publish
|
|
cd build_publish
|
|
|
|
# Clone and cd into books
|
|
git clone https://github.com/frappe/books --depth 1
|
|
cd books
|
|
|
|
# Copy creds to log_creds.txt
|
|
echo $ERR_LOG_KEY > log_creds.txt
|
|
echo $ERR_LOG_SECRET >> log_creds.txt
|
|
echo $ERR_LOG_URL >> log_creds.txt
|
|
echo $TELEMETRY_URL >> log_creds.txt
|
|
|
|
|
|
# Install Dependencies
|
|
yarn install
|
|
|
|
# Set .env and build
|
|
export GH_TOKEN=$GH_TOKEN &&
|
|
export CSC_IDENTITY_AUTO_DISCOVERY=true &&
|
|
export APPLE_ID=$APPLE_ID &&
|
|
export APPLE_TEAM_ID=$APPLE_TEAM_ID &&
|
|
export APPLE_APP_SPECIFIC_PASSWORD=$APPLE_APP_SPECIFIC_PASSWORD &&
|
|
yarn build --mac --publish=always
|
|
|
|
cd ../books
|