@@ -11,27 +11,28 @@ if [[ ! -f "${INPUT_FILENAME}" ]]; then
11
11
exit 1
12
12
fi
13
13
14
- # Wget the comparison file
15
- PARENT_SHA=$( git log --pretty=%P -n 1 ${CURRENT_SHA} | cut -d ' ' -f 1)
16
- JOBFILE=" https://raw.githubusercontent.com/${INPUT_REPO} /${PARENT_SHA} /${INPUT_FILENAME} "
17
- TMP=$( mktemp -d)
18
-
19
- BASENAME=$( basename ${INPUT_FILENAME} )
20
- wget ${JOBFILE} -O " ${TMP} /${BASENAME} "
21
- if [[ " $? " != " 0" ]]; then
22
- printf " Issue getting previous job file ${JOBFILE} \n"
23
- exit 1
24
- fi
25
-
26
- JOBFILE=" ${TMP} /${BASENAME} "
27
- if [[ ! -f " ${JOBFILE} " ]]; then
28
- printf " ${JOBFILE} does not exist.\n"
29
- exit 1
30
- fi
31
-
32
14
# If we are verbatim given a previous filename, use it
33
15
if [ ! -z ${INPUT_PREVIOUS_FILENAME} ]; then
34
16
JOBFILE=" ${INPUT_PREVIOUS_FILENAME} "
17
+ else
18
+
19
+ # Wget the comparison file
20
+ PARENT_SHA=$( git log --pretty=%P -n 1 ${CURRENT_SHA} | cut -d ' ' -f 1)
21
+ JOBFILE=" https://raw.githubusercontent.com/${INPUT_REPO} /${PARENT_SHA} /${INPUT_FILENAME} "
22
+ TMP=$( mktemp -d)
23
+
24
+ BASENAME=$( basename ${INPUT_FILENAME} )
25
+ wget ${JOBFILE} -O " ${TMP} /${BASENAME} "
26
+ if [[ " $? " != " 0" ]]; then
27
+ printf " Issue getting previous job file ${JOBFILE} \n"
28
+ exit 1
29
+ fi
30
+
31
+ JOBFILE=" ${TMP} /${BASENAME} "
32
+ if [[ ! -f " ${JOBFILE} " ]]; then
33
+ printf " ${JOBFILE} does not exist.\n"
34
+ exit 1
35
+ fi
35
36
fi
36
37
37
38
# Required to have slack webhook in environment
0 commit comments