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
d647c277
Commit
d647c277
authored
Jul 18, 2017
by
Jeremy Morrell
Committed by
GitHub
Jul 18, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into changelog
parents
b801e3f0
15e68450
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
4 deletions
+13
-4
.travis.yml
.travis.yml
+5
-2
CHANGELOG.md
CHANGELOG.md
+3
-0
cache.sh
lib/cache.sh
+3
-1
run
test/run
+2
-1
No files found.
.travis.yml
View file @
d647c277
...
...
@@ -2,5 +2,8 @@ language: bash
sudo
:
required
services
:
-
docker
install
:
docker pull heroku/cedar:14
script
:
make test
env
:
-
STACK=heroku-16
-
STACK=cedar-14
install
:
docker pull "heroku/${STACK/-/:}"
script
:
make test-${STACK}
CHANGELOG.md
View file @
d647c277
...
...
@@ -2,6 +2,9 @@
## Master
-
Add
`$STACK`
to the cache signature (#445)
-
Log output now differentiates between an empty cache and a new cache signature
## v107 (2017-07-17)
-
Switch to using nodebin to download the yarn binary (#444)
...
...
lib/cache.sh
View file @
d647c277
source
$BP_DIR
/lib/binaries.sh
create_signature
()
{
echo
"
$
(
node
--version
)
;
$(
npm
--version
)
;
$(
yarn
--version
2>/dev/null
||
true
)
$PREBUILD
"
echo
"
$
{
STACK
}
;
$(
node
--version
)
;
$(
npm
--version
)
;
$(
yarn
--version
2>/dev/null
||
true
)
;
${
PREBUILD
}
"
}
save_signature
()
{
...
...
@@ -19,6 +19,8 @@ load_signature() {
get_cache_status
()
{
if
!
${
NODE_MODULES_CACHE
:-
true
}
;
then
echo
"disabled"
elif
!
test
-d
"
${
CACHE_DIR
}
/node/"
;
then
echo
"not-found"
elif
[
"
$(
create_signature
)
"
!=
"
$(
load_signature
)
"
]
;
then
echo
"new-signature"
else
...
...
test/run
View file @
d647c277
...
...
@@ -54,12 +54,13 @@ testBuildWithCache() {
cache
=
$(
mktmpdir
)
compile
"stable-node"
$cache
assertCaptured
"Skipping cache restore (n
ew-signature
"
assertCaptured
"Skipping cache restore (n
ot-found)
"
assertEquals
"1"
"
$(
ls
-1
$cache
/node/node_modules |
grep
hashish |
wc
-l
|
tr
-d
' '
)
"
assertCapturedSuccess
compile
"stable-node"
$cache
assertNotCaptured
"- node_modules (not cached - skipping)"
assertFileContains
"
${
STACK
}
"
"
${
cache
}
/node/signature"
assertCapturedSuccess
rm
-rf
"
$cache
/node/node_modules"
...
...
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