Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-nodejs
Commits
5f24b288
Commit
5f24b288
authored
Jul 19, 2017
by
Jeremy Morrell
Committed by
Jeremy Morrell
Jul 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch iojs over to using nodebin
parent
c1b8023c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
binaries.sh
lib/binaries.sh
+10
-8
run
test/run
+2
-1
No files found.
lib/binaries.sh
View file @
5f24b288
...
@@ -60,16 +60,18 @@ install_iojs() {
...
@@ -60,16 +60,18 @@ install_iojs() {
local
version
=
"
$1
"
local
version
=
"
$1
"
local dir
=
"
$2
"
local dir
=
"
$2
"
if
needs_resolution
"
$version
"
;
then
echo
"Resolving iojs version
${
version
:-
(latest stable)
}
..."
echo
"Resolving iojs version
${
version
:-
(latest stable)
}
via semver.io..."
if
!
read
number url < <
(
curl
--silent
--get
--retry
5
--retry-max-time
15
--data-urlencode
"range=
$version
"
"https://nodebin.herokai.com/v1/iojs/
$platform
/latest.txt"
)
;
then
version
=
$(
curl
--silent
--get
--retry
5
--retry-max-time
15
--data-urlencode
"range=
${
version
}
"
https://semver.herokuapp.com/iojs/resolve
)
echo
"Unable to resolve; does that version exist?"
&&
false
fi
fi
echo
"Downloading and installing iojs
$version
..."
echo
"Downloading and installing iojs
$number
..."
local
download_url
=
"https://iojs.org/dist/v
$version
/iojs-v
$version
-
$os
-
$cpu
.tar.gz"
local
code
=
$(
curl
"
$url
"
--silent
--fail
--retry
5
--retry-max-time
15
-o
/tmp/iojs.tar.gz
--write-out
"%{http_code}"
)
curl
"
$download_url
"
--silent
--fail
--retry
5
--retry-max-time
15
-o
/tmp/node.tar.gz
||
(
echo
"Unable to download iojs
$version
; does it exist?"
&&
false
)
if
[
"
$code
"
!=
"200"
]
;
then
tar
xzf /tmp/node.tar.gz
-C
/tmp
echo
"Unable to download iojs:
$code
"
&&
false
mv
/tmp/iojs-v
$version
-
$os
-
$cpu
/
*
$dir
fi
tar
xzf /tmp/iojs.tar.gz
-C
/tmp
mv
/tmp/iojs-v
$number
-
$os
-
$cpu
/
*
$dir
chmod
+x
$dir
/bin/
*
chmod
+x
$dir
/bin/
*
}
}
...
...
test/run
View file @
5f24b288
...
@@ -343,8 +343,9 @@ testInvalidNode() {
...
@@ -343,8 +343,9 @@ testInvalidNode() {
testInvalidIo
()
{
testInvalidIo
()
{
compile
"invalid-io"
compile
"invalid-io"
assertCaptured
"Resolving iojs version 2.0.99"
assertCaptured
"Downloading and installing iojs 2.0.99"
assertCaptured
"Downloading and installing iojs 2.0.99"
assertCaptured
"Unable to
download iojs 2.0.99
"
assertCaptured
"Unable to
resolve
"
assertCapturedError
assertCapturedError
}
}
...
...
Write
Preview
Markdown
is supported
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