Files
kami-parse-server/resources/npm-git.sh
Florent Vilmart 6a1510729a Bump nodejs version to 6+ (#4272)
* let travis build against 3.x

* Cleanup dependencies and bump min version to current LTS

* Makes npm-git push all branches to -preview

* restores releases

* Bumps mime to 2.0.3 (requires node 6+)

* Bumps express to latest version

* Fixes linting issue after upgrade

* Use travis-branch for partial releases
2017-11-25 15:39:31 -05:00

40 lines
953 B
Bash
Executable File

#!/bin/sh -e
# This script maintains a git branch which mirrors master but in a form that
# what will eventually be deployed to npm, allowing npm dependencies to use:
#
# "parse-server": "parseplatform/parse-server#latest"
#
# From: https://github.com/graphql/graphql-js/blob/master/resources/npm-git.sh
BUILD_DIR=latest
BRANCH="${TRAVIS_BRANCH}"
TARGET="latest"
if [ "$BRANCH" != "master" ];
then
TARGET="$BRANCH-preview"
fi
npm run build
mkdir -p $BUILD_DIR
cp package.json $BUILD_DIR/
cp README.md $BUILD_DIR/
cp LICENSE $BUILD_DIR/
cp PATENTS $BUILD_DIR/
cp CHANGELOG.md $BUILD_DIR/
cp -R lib $BUILD_DIR
cp -R bin $BUILD_DIR
cp -R public_html $BUILD_DIR
cp -R views $BUILD_DIR
cd $BUILD_DIR
git init
git config user.name "Travis CI"
git config user.email "github@fb.com"
git add .
git commit -m "Deploy $BRANCH to $TARGET branch"
git push --force --quiet "https://${GH_TOKEN}@github.com/parse-community/parse-server.git" master:$TARGET