@cryptotaxi247 / kubo / commits / 4aa210c66

fix: make assets deterministic

Set the "modtime" to the start of the IPFS project, and the mode to 0644.

Steven Allen committed Aug 19, 2020 at 16:57 UTC 4aa210c66af1e2950b6b8b6710a6461d041876f7
3 files changed +11 -11
assets/assets.go
+1 -1
@@ -1,5 +1,5 @@
1 //go:generate git submodule update --init ./dir-index-html
2 -//go:generate go run github.com/go-bindata/go-bindata/v3/go-bindata -pkg=assets init-doc dir-index-html/dir-index.html dir-index-html/knownIcons.txt
2 +//go:generate go run github.com/go-bindata/go-bindata/v3/go-bindata -mode=0644 -modtime=1403768328 -pkg=assets init-doc dir-index-html/dir-index.html dir-index-html/knownIcons.txt
3 //go:generate gofmt -w bindata.go
4 //go:generate sh -c "sed -i \"s/.*BindataVersionHash.*/BindataVersionHash=\\\"$(git hash-object bindata.go)\\\"/\" bindata_version_hash.go"
5 //go:generate gofmt -w bindata_version_hash.go
assets/bindata.go
+9 -9
@@ -101,7 +101,7 @@ func initDocAbout() (*asset, error) {
101 return nil, err
102 }
103
104 - info := bindataFileInfo{name: "init-doc/about", size: 1681, mode: os.FileMode(420), modTime: time.Unix(1594946551, 0)}
104 + info := bindataFileInfo{name: "init-doc/about", size: 1681, mode: os.FileMode(420), modTime: time.Unix(1403768328, 0)}
105 a := &asset{bytes: bytes, info: info}
106 return a, nil
107 }
@@ -121,7 +121,7 @@ func initDocContact() (*asset, error) {
121 return nil, err
122 }
123
124 - info := bindataFileInfo{name: "init-doc/contact", size: 189, mode: os.FileMode(384), modTime: time.Unix(1568932423, 0)}
124 + info := bindataFileInfo{name: "init-doc/contact", size: 189, mode: os.FileMode(420), modTime: time.Unix(1403768328, 0)}
125 a := &asset{bytes: bytes, info: info}
126 return a, nil
127 }
@@ -141,7 +141,7 @@ func initDocHelp() (*asset, error) {
141 return nil, err
142 }
143
144 - info := bindataFileInfo{name: "init-doc/help", size: 311, mode: os.FileMode(420), modTime: time.Unix(1594946551, 0)}
144 + info := bindataFileInfo{name: "init-doc/help", size: 311, mode: os.FileMode(420), modTime: time.Unix(1403768328, 0)}
145 a := &asset{bytes: bytes, info: info}
146 return a, nil
147 }
@@ -161,7 +161,7 @@ func initDocPing() (*asset, error) {
161 return nil, err
162 }
163
164 - info := bindataFileInfo{name: "init-doc/ping", size: 4, mode: os.FileMode(384), modTime: time.Unix(1575854776, 0)}
164 + info := bindataFileInfo{name: "init-doc/ping", size: 4, mode: os.FileMode(420), modTime: time.Unix(1403768328, 0)}
165 a := &asset{bytes: bytes, info: info}
166 return a, nil
167 }
@@ -181,7 +181,7 @@ func initDocQuickStart() (*asset, error) {
181 return nil, err
182 }
183
184 - info := bindataFileInfo{name: "init-doc/quick-start", size: 1681, mode: os.FileMode(420), modTime: time.Unix(1594946551, 0)}
184 + info := bindataFileInfo{name: "init-doc/quick-start", size: 1681, mode: os.FileMode(420), modTime: time.Unix(1403768328, 0)}
185 a := &asset{bytes: bytes, info: info}
186 return a, nil
187 }
@@ -201,7 +201,7 @@ func initDocReadme() (*asset, error) {
201 return nil, err
202 }
203
204 - info := bindataFileInfo{name: "init-doc/readme", size: 1091, mode: os.FileMode(384), modTime: time.Unix(1568932423, 0)}
204 + info := bindataFileInfo{name: "init-doc/readme", size: 1091, mode: os.FileMode(420), modTime: time.Unix(1403768328, 0)}
205 a := &asset{bytes: bytes, info: info}
206 return a, nil
207 }
@@ -221,7 +221,7 @@ func initDocSecurityNotes() (*asset, error) {
221 return nil, err
222 }
223
224 - info := bindataFileInfo{name: "init-doc/security-notes", size: 1162, mode: os.FileMode(384), modTime: time.Unix(1575854776, 0)}
224 + info := bindataFileInfo{name: "init-doc/security-notes", size: 1162, mode: os.FileMode(420), modTime: time.Unix(1403768328, 0)}
225 a := &asset{bytes: bytes, info: info}
226 return a, nil
227 }
@@ -241,7 +241,7 @@ func dirIndexHtmlDirIndexHtml() (*asset, error) {
241 return nil, err
242 }
243
244 - info := bindataFileInfo{name: "dir-index-html/dir-index.html", size: 90304, mode: os.FileMode(384), modTime: time.Unix(1597808041, 0)}
244 + info := bindataFileInfo{name: "dir-index-html/dir-index.html", size: 90304, mode: os.FileMode(420), modTime: time.Unix(1403768328, 0)}
245 a := &asset{bytes: bytes, info: info}
246 return a, nil
247 }
@@ -261,7 +261,7 @@ func dirIndexHtmlKnowniconsTxt() (*asset, error) {
261 return nil, err
262 }
263
264 - info := bindataFileInfo{name: "dir-index-html/knownIcons.txt", size: 326, mode: os.FileMode(420), modTime: time.Unix(1594946551, 0)}
264 + info := bindataFileInfo{name: "dir-index-html/knownIcons.txt", size: 326, mode: os.FileMode(420), modTime: time.Unix(1403768328, 0)}
265 a := &asset{bytes: bytes, info: info}
266 return a, nil
267 }
assets/bindata_version_hash.go
+1 -1
@@ -2,5 +2,5 @@
2 package assets
3
4 const (
5 - BindataVersionHash = "f8497893ebd3e47fe8ff172d4b60b4315a0006ee"
5 + BindataVersionHash = "60ae1cfa3f31134017737125db89f905dd3eea98"
6 )