Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
fether
Commits
7dce51a1
Commit
7dce51a1
authored
Apr 02, 2019
by
Axel Chalon
Committed by
Thibaut Sardan
Apr 02, 2019
Browse files
Use path.join in fetch-latest-parity.js (#489)
parent
0f36f18e
Pipeline
#34809
passed with stages
in 10 minutes and 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
scripts/fetch-latest-parity.js
View file @
7dce51a1
...
...
@@ -32,11 +32,16 @@ switch (process.platform) {
const
ENDPOINT
=
`https://vanity-service.parity.io/parity-binaries?os=
${
os
}
&architecture=x86_64`
;
const
STATIC_DIRECTORY
=
'
../packages/fether-electron/static/
'
;
const
STATIC_DIRECTORY
=
path
.
join
(
'
..
'
,
'
packages
'
,
'
fether-electron
'
,
'
static
'
);
const
foundPath
=
[
path
.
join
(
STATIC_DIRECTORY
,
'
/
parity
'
),
path
.
join
(
STATIC_DIRECTORY
,
'
/
parity.exe
'
)
path
.
join
(
STATIC_DIRECTORY
,
'
parity
'
),
path
.
join
(
STATIC_DIRECTORY
,
'
parity.exe
'
)
].
find
(
existsSync
);
if
(
foundPath
)
{
...
...
@@ -124,7 +129,7 @@ function downloadParity () {
}
// Write to file and set a+x permissions
const
destinationPath
=
`
${
STATIC_DIRECTORY
}
/
${
name
}
`
;
const
destinationPath
=
path
.
join
(
STATIC_DIRECTORY
,
name
)
;
return
fsWriteFile
(
destinationPath
,
data
)
.
then
(()
=>
fsChmod
(
destinationPath
,
0o755
))
// https://nodejs.org/api/fs.html#fs_fs_chmod_path_mode_callback
.
then
(()
=>
destinationPath
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment