Improve deployment
This commit is contained in:
parent
ea587b502b
commit
a121128d28
|
@ -12,9 +12,11 @@
|
||||||
"repository": "gitlab:skddc/inspektor",
|
"repository": "gitlab:skddc/inspektor",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ember build",
|
"build": "ember build",
|
||||||
|
"build-prod": "ember build --environment production && npm run update-version-file",
|
||||||
"start": "ember server",
|
"start": "ember server",
|
||||||
"test": "ember test",
|
"test": "ember test",
|
||||||
"deploy": "bash scripts/deploy.sh"
|
"deploy": "npm run build-prod && bash scripts/deploy.sh",
|
||||||
|
"update-version-file": "bash scripts/update-version-file.sh"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"broccoli-asset-rev": "^2.4.5",
|
"broccoli-asset-rev": "^2.4.5",
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
# Pull build branch to make sure it's up to date
|
|
||||||
git pull origin build-production
|
|
||||||
# Check out build branch
|
# Check out build branch
|
||||||
git checkout build-production
|
git checkout build-production
|
||||||
# Copy from build dir to root
|
# Copy from build dir to root
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue