mirror of https://github.com/rancher/api-ui.git
Merge pull request #36 from rancher/version-number
Add versions file to build
This commit is contained in:
commit
ae51cb31c8
|
|
@ -63,6 +63,7 @@ cp -R node_modules/bootstrap/dist/** ${DIST}
|
||||||
|
|
||||||
# Patch bootstrap.css to remove source mapping URL comment
|
# Patch bootstrap.css to remove source mapping URL comment
|
||||||
sed -i.bak -e "s@/\*# sourceMappingURL=bootstrap\.css\.map.*@@g" ${DIST}/css/bootstrap.css
|
sed -i.bak -e "s@/\*# sourceMappingURL=bootstrap\.css\.map.*@@g" ${DIST}/css/bootstrap.css
|
||||||
|
rm -f ${DIST}/css/bootstrap.css.bak
|
||||||
|
|
||||||
# Generate css
|
# Generate css
|
||||||
cat ./node_modules/bootstrap/dist/css/bootstrap.css \
|
cat ./node_modules/bootstrap/dist/css/bootstrap.css \
|
||||||
|
|
@ -86,6 +87,12 @@ tar -cvzf ./dist/${VERSION}.tar.gz -C ${DIST} .
|
||||||
# Copy index.html for testing
|
# Copy index.html for testing
|
||||||
sed -e "s/VERSION/"${VERSION}"/g" ./index.html.tmpl > ./dist/index.html
|
sed -e "s/VERSION/"${VERSION}"/g" ./index.html.tmpl > ./dist/index.html
|
||||||
|
|
||||||
|
# Generate versions file
|
||||||
|
COMMIT=$(git rev-parse --short HEAD)
|
||||||
|
sed -e "s/VERSION/"${VERSION}"/g" ./version.json.tmpl > ${DIST}/version.json
|
||||||
|
sed -i.bak -e "s/COMMIT/"${COMMIT}"/g" ${DIST}/version.json
|
||||||
|
rm -f ${DIST}/version.json.bak
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "All done"
|
echo "All done"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": "VERSION",
|
||||||
|
"commit": "COMMIT"
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue