Skip to content

Commit 574af6d

Browse files
committed
Add Windows, Linux and MacOS X directories to the update script and jekyll ignores
1 parent fa10dfa commit 574af6d

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ exclude:
33
# GH pages. Serve only the pre-existing bin/ and wasm/ to keep old links to GH pages working.
44
- emscripten-asmjs
55
- emscripten-wasm32
6+
- linux-amd64
7+
- macosx-amd64
8+
- windows-amd64

update

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ function processDir (dir, listCallback) {
5353
}
5454

5555
const binaryPrefix = (dir === '/bin' || dir === '/wasm' ? 'soljson' : 'solc-' + dir.slice(1))
56+
const binaryExtension = {
57+
'/bin': '.js',
58+
'/wasm': '.js',
59+
'/emscripten-asmjs': '.js',
60+
'/emscripten-wasm32': '.js',
61+
'/windows-amd64': '.zip'
62+
}[dir] || ''
5663

5764
// ascending list (oldest version first)
5865
const parsedList = files
@@ -65,7 +72,8 @@ function processDir (dir, listCallback) {
6572
})
6673
.map(function (file) { return file.name })
6774
.map(function (file) {
68-
return file.match(new RegExp('^' + binaryPrefix + '-v([0-9.]*)(-([^+]*))?(\\+(.*))?\\.js$'))
75+
const escapedExtension = binaryExtension.replace('.', '\\.')
76+
return file.match(new RegExp('^' + binaryPrefix + '-v([0-9.]*)(-([^+]*))?(\\+(.*))?' + escapedExtension + '$'))
6977
})
7078
.filter(function (version) { return version })
7179
.map(function (pars) { return { path: pars[0], version: pars[1], prerelease: pars[3], build: pars[5] } })
@@ -153,20 +161,23 @@ function processDir (dir, listCallback) {
153161

154162
// Update 'latest' symlink (except for wasm/ where the link is hard-coded to point at the one in bin/)
155163
if (dir !== '/wasm') {
156-
updateSymlink(path.join(dir, binaryPrefix + '-latest.js'), latestReleaseFile)
164+
updateSymlink(path.join(dir, binaryPrefix + '-latest' + binaryExtension), latestReleaseFile)
157165
}
158166

159167
// Update 'nightly' symlink in bin/ (we don't have nightlies for other platforms)
160168
if (dir === '/bin') {
161-
updateSymlink(path.join(dir, binaryPrefix + '-nightly.js'), latestBuildFile)
169+
updateSymlink(path.join(dir, binaryPrefix + '-nightly' + binaryExtension), latestBuildFile)
162170
}
163171
})
164172
}
165173

166174
const DIRS = [
167175
'/bin',
168176
'/wasm',
169-
'/emscripten-asmjs'
177+
'/emscripten-asmjs',
178+
'/linux-amd64',
179+
'/macosx-amd64',
180+
'/windows-amd64'
170181
]
171182

172183
DIRS.forEach(function (dir) {

0 commit comments

Comments
 (0)