File: build-webui.sh

package info (click to toggle)
android-cuttlefish 1.0.1-0~exp2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 7,192 kB
  • sloc: cpp: 39,149; sh: 2,523; javascript: 242; exp: 152; python: 125; makefile: 88
file content (10 lines) | stat: -rwxr-xr-x 436 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env bash
. ./setup-nodejs-env.sh
install_nodejs
package_version=$(head -1 debian/changelog | sed s/.*\(\\\(.*\\\)\).*/\\1/)
last_commit=$( (git log -1 || echo dev) | head -1 | sed s/commit\ //)
echo "export const BUILD_VERSION = \"github-$package_version-$last_commit\";" > src/operator/webui/src/environments/version.ts
(cd src/operator/webui/ && npm install && ./node_modules/.bin/ng build)
ok=$?
uninstall_nodejs
exit $ok