Skip to content

Commit 5d69ac0

Browse files
committed
Add versionfile to dist/prod
1 parent d7bce21 commit 5d69ac0

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"scripts": {
1010
"build": "npm run clean:dist && ember build",
11-
"build:dist": "npm run clean:dist && ember build -prod",
11+
"build:dist": "npm run clean:dist && ember build -prod && bash scripts/update-versionfile",
1212
"start": "ember server",
1313
"test": "ember test",
1414
"postinstall": "bower install",

Diff for: deploy renamed to scripts/deploy

File renamed without changes.

Diff for: scripts/update-versionfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
PACKAGE_VERSION=$(cat package.json \
4+
| grep version \
5+
| head -1 \
6+
| awk -F: '{ print $2 }' \
7+
| sed 's/[",]//g' \
8+
| tr -d '[[:space:]]')
9+
10+
echo $PACKAGE_VERSION > dist/VERSION

0 commit comments

Comments
 (0)