瀏覽代碼

Fail gracefully when not running in a git environment.

master
Boris Grozev 10 年之前
父節點
當前提交
be64bd883c
共有 1 個檔案被更改,包括 9 行新增0 行删除
  1. 9
    0
      bump-js-versions.sh

+ 9
- 0
bump-js-versions.sh 查看文件

@@ -1,5 +1,14 @@
1 1
 #!/bin/sh
2 2
 
3
+if ! which git > /dev/null 2>&1 ;then
4
+    echo "Cannot find git executable, not bumping js versions."
5
+    exit
6
+fi
7
+if ! git status > /dev/null 2>&1 ;then
8
+    echo "Not a git repository, not bumping js versions."
9
+    exit
10
+fi
11
+
3 12
 # This script finds all js files included from index.html which have been
4 13
 # modified and bumps their version (the value of the "v" parameter used
5 14
 # in index.html)

Loading…
取消
儲存