File tree Expand file tree Collapse file tree 3 files changed +27
-13
lines changed Expand file tree Collapse file tree 3 files changed +27
-13
lines changed Original file line number Diff line number Diff line change @@ -73,19 +73,7 @@ mkdir -p "$VERSION_BASE"
73
73
# SOURCE_DATE_EPOCH should not unintentionally be set
74
74
# ###############
75
75
76
- if [ -n " $SOURCE_DATE_EPOCH " ] && [ -z " $FORCE_SOURCE_DATE_EPOCH " ]; then
77
- cat << EOF
78
- ERR: Environment variable SOURCE_DATE_EPOCH is set which may break reproducibility.
79
-
80
- Aborting...
81
-
82
- Hint: You may want to:
83
- 1. Unset this variable: \` unset SOURCE_DATE_EPOCH\` before rebuilding
84
- 2. Set the 'FORCE_SOURCE_DATE_EPOCH' environment variable if you insist on
85
- using your own epoch
86
- EOF
87
- exit 1
88
- fi
76
+ check_source_date_epoch
89
77
90
78
# ###############
91
79
# Build directories should not exist
Original file line number Diff line number Diff line change 67
67
exit 1
68
68
fi
69
69
70
+ # ###############
71
+ # SOURCE_DATE_EPOCH should not unintentionally be set
72
+ # ###############
73
+
74
+ check_source_date_epoch
75
+
70
76
# ###############
71
77
# The codesignature git worktree should not be dirty
72
78
# ###############
Original file line number Diff line number Diff line change @@ -21,6 +21,26 @@ check_tools() {
21
21
done
22
22
}
23
23
24
+ # ###############
25
+ # SOURCE_DATE_EPOCH should not unintentionally be set
26
+ # ###############
27
+
28
+ check_source_date_epoch () {
29
+ if [ -n " $SOURCE_DATE_EPOCH " ] && [ -z " $FORCE_SOURCE_DATE_EPOCH " ]; then
30
+ cat << EOF
31
+ ERR: Environment variable SOURCE_DATE_EPOCH is set which may break reproducibility.
32
+
33
+ Aborting...
34
+
35
+ Hint: You may want to:
36
+ 1. Unset this variable: \` unset SOURCE_DATE_EPOCH\` before rebuilding
37
+ 2. Set the 'FORCE_SOURCE_DATE_EPOCH' environment variable if you insist on
38
+ using your own epoch
39
+ EOF
40
+ exit 1
41
+ fi
42
+ }
43
+
24
44
check_tools cat env readlink dirname basename git
25
45
26
46
# ###############
You can’t perform that action at this time.
0 commit comments