Skip to content

Commit fd627aa

Browse files
authored
Merge pull request #34 from Granjow/remove-nodejs-before-update
Clean up lib and include directories before copying Node.js
2 parents 1a8aec7 + 32eef3e commit fd627aa

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

node/binary.sls

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,26 @@ Extract binary package:
1515
- source: /usr/local/src/{{ pkgname }}.tar.gz
1616
- archive_format: tar
1717
- if_missing: /usr/local/src/{{ pkgname }}
18+
- require:
19+
- file: Get binary package
20+
21+
Remove existing include directory:
22+
file.absent:
23+
- name: /usr/local/include/node
24+
- unless: cmp /usr/local/bin/node /usr/local/src/{{ pkgname }}/bin/node
25+
- require:
26+
- archive: Extract binary package
27+
28+
Remove existing npm:
29+
file.absent:
30+
- name: /usr/local/lib/node_modules/npm
31+
- onchanges:
32+
- file: Remove existing include directory
1833

1934
Copy lib:
2035
cmd.run:
2136
- cwd: /usr/local/src/{{ pkgname }}/
2237
- name: cp -r bin/ include/ lib/ share/ /usr/local/
23-
- unless: cmp /usr/local/bin/node /usr/local/src/{{ pkgname }}/bin/node
38+
- unless:
39+
- cmp /usr/local/bin/node /usr/local/src/{{ pkgname }}/bin/node
40+
- npm --version

0 commit comments

Comments
 (0)