Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Closes GH-609 `make install` installs current, not latest

`make latest` to do the old behavior.
  • Loading branch information...
commit d7d8662bf1860c655c6cc2324e3daa13efdfdf98 1 parent 0c03b68
@isaacs isaacs authored
Showing with 17 additions and 7 deletions.
  1. +14 −6 Makefile
  2. +3 −1 scripts/install.sh
View
20 Makefile
@@ -1,6 +1,5 @@
SHELL = bash
-
docs = $(shell find doc -name '*.md' \
|sed 's|.md|.1|g' \
|sed 's|doc/|man1/|g' )
@@ -8,15 +7,24 @@ docs = $(shell find doc -name '*.md' \
doc_subfolders = $(shell find doc -type d \
|sed 's|doc/|man1/|g' )
+# This is the default make target.
+# Since 'make' typically does non-installation build stuff,
+# it seems appropriate.
submodules:
! [ -d .git ] || git submodule update --init
-install: submodules
- node cli.js install npm
+latest: submodules
+ @echo "Installing latest published npm"
+ @echo "Use 'make install' or 'make link' to install the code"
+ @echo "in this folder that you're looking at right now."
+ node cli.js install
-dev: submodules
+install: submodules
node cli.js install
+# backwards compat
+dev: install
+
link: uninstall
node cli.js link
@@ -24,7 +32,7 @@ clean: uninstall
uninstall: submodules
node cli.js cache clean
- node cli.js rm npm -r
+ node cli.js rm npm -f
man: man1
@@ -52,4 +60,4 @@ publish: link
&& git push origin master \
&& npm publish
-.PHONY: install install-dev link doc clean uninstall test man
+.PHONY: latest install dev link doc clean uninstall test man
View
4 scripts/install.sh
@@ -85,8 +85,10 @@ cd "$TMP" \
exit $ret
fi) \
&& (if ! [ "$make" = "NOMAKE" ]; then
- $make uninstall dev
+ $make clean install
else
+ $node cli.js cache clean
+ $node cli.js rm npm -f
$node cli.js install .
fi) \
&& cd "$BACK" \
Please sign in to comment.
Something went wrong with that request. Please try again.