Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: pkg/appengine/tool/utils.sh

Issue 804973002: Add appengine/gcloud/mustache dependencies. (Closed) Base URL: git@github.com:dart-lang/pub-dartlang-dart.git@master
Patch Set: Added AUTHORS/LICENSE/PATENTS files Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/appengine/tool/run_tests.sh ('k') | pkg/gcloud/.gitignore » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/appengine/tool/utils.sh
diff --git a/pkg/appengine/tool/utils.sh b/pkg/appengine/tool/utils.sh
new file mode 100644
index 0000000000000000000000000000000000000000..92057db67e153ec31c895ca5b9b319e0a81ba6e4
--- /dev/null
+++ b/pkg/appengine/tool/utils.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+function start_phase {
+ echo "==============================================="
+ echo "= Phase: $1"
+ echo "==============================================="
+}
+
+function error {
+ echo "==============================================="
+ echo "= Error: $1"
+ echo "==============================================="
+}
+
+function die {
+ echo "$1"
+ exit 1
+}
+
+function check_env_variable {
+ NAME="$1"
+ env | grep "$NAME" &> /dev/null
+ if [ $? -ne 0 ]; then
+ die "Couldn't find environment variable '$NAME'!"
+ fi
+}
+
+function analyze_files {
+ echo "Analyzing files '$1'."
+
+ "$DART_SDK/bin/dartanalyzer" --fatal-warnings "$@"
+ if [ $? -ne 0 ]; then
+ error "Analyzer failed on file '$1'."
+ return 1
+ fi
+ return 0
+}
+
+function test_file {
+ echo "Testing file '$1'."
+ "$DART_SDK/bin/dart" --checked "$1"
+ if [ $? -ne 0 ]; then
+ cd ..
+ error "Running tests in '$1' failed."
+ return 1
+ fi
+ cd ..
+ return 0
+}
+
« no previous file with comments | « pkg/appengine/tool/run_tests.sh ('k') | pkg/gcloud/.gitignore » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698