Add deployment
This commit is contained in:
+6
-2
@@ -10,9 +10,13 @@
|
|||||||
},
|
},
|
||||||
"repository": "",
|
"repository": "",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ember build",
|
|
||||||
"start": "ember server",
|
"start": "ember server",
|
||||||
"test": "ember test"
|
"test": "ember test",
|
||||||
|
"postinstall": "bower install",
|
||||||
|
"build": "ember build",
|
||||||
|
"build-prod": "ember build --environment production",
|
||||||
|
"update-version-file": "bash scripts/update-version-file.sh",
|
||||||
|
"deploy": "npm run build-prod && npm run update-version-file && bash scripts/deploy.sh"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"broccoli-asset-rev": "^2.4.5",
|
"broccoli-asset-rev": "^2.4.5",
|
||||||
|
|||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
# Get revision from local master
|
||||||
|
rev=`git rev-parse HEAD`
|
||||||
|
short_rev=${rev:0:7}
|
||||||
|
# Check out build branch
|
||||||
|
git checkout build-production
|
||||||
|
# Copy from build dir to root
|
||||||
|
cp -r dist/* .
|
||||||
|
# Add all files
|
||||||
|
git add --all
|
||||||
|
# Commit build files
|
||||||
|
git commit -m "Build production from $short_rev"
|
||||||
|
# Push to remote
|
||||||
|
git push 5apps build-production:master
|
||||||
|
# Push build branch to collab repo
|
||||||
|
git push origin build-production:build-production
|
||||||
|
# Go back to previous branch
|
||||||
|
git checkout -
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PACKAGE_VERSION=$(cat package.json \
|
||||||
|
| grep version \
|
||||||
|
| head -1 \
|
||||||
|
| awk -F: '{ print $2 }' \
|
||||||
|
| sed 's/[",]//g' \
|
||||||
|
| tr -d '[[:space:]]')
|
||||||
|
|
||||||
|
echo $PACKAGE_VERSION > dist/VERSION
|
||||||
Reference in New Issue
Block a user