SRCDIR=src
UPSTREAM=eslint
UPSTREAMTAG=v8.41.0
-BUILDSRC=$(UPSTREAM)-$(UPSTREAMTAG)
+UPSTREAMSRC=$(UPSTREAM)-$(UPSTREAMTAG)
all: $(DEB)
@echo $(DEB)
.PHONY: download
download:
+ rm -rf $(UPSTREAM)
+ $(MAKE) $(UPSTREAM)
+
+$(UPSTREAM):
rm -rf $(UPSTREAM).tmp $(UPSTREAM)
git clone -b $(UPSTREAMTAG) --depth 1 https://github.com/eslint/eslint $(UPSTREAM).tmp
rm -rf $(UPSTREAM).tmp/.git
find $(UPSTREAM).tmp/ -type f -name '.gitignore' -delete
mv $(UPSTREAM).tmp $(UPSTREAM)
+.PHONY: vendor-upstream
+vendor-upstream:
+ rm -rf $(UPSTREAMSRC) src/lib/eslint.js
+ $(MAKE) src/lib/eslint.js
+
+src/lib/eslint.js: $(UPSTREAMSRC)/build/eslint.js
+ cp $(UPSTREAMSRC)/build/eslint.js src/lib/eslint.js
+
+$(UPSTREAMSRC)/build/eslint.js: $(UPSTREAMSRC)
# NOTE: needs npm installed, downloads packages from npm
-.PHONY: buildupstream
-buildupstream: $(BUILDSRC)
- cp $(BUILDSRC)/build/eslint.js $(SRCDIR)/lib/eslint.js
+ cd $(UPSTREAMSRC); npm install
+ cd $(UPSTREAMSRC); npm run build:webpack
-$(BUILDSRC): $(UPSTREAM) patches
- rm -rf $@
+$(UPSTREAMSRC): $(UPSTREAM) patches
+ rm -rf $@ $@.tmp
mkdir $@.tmp
rsync -ra $(UPSTREAM)/ $@.tmp
cd $@.tmp; ln -s ../patches patches
cd $@.tmp; quilt push -a
cd $@.tmp; rm -rf .pc ./patches
mv $@.tmp $@
- cd $@; npm install
- cd $@; npm run build:webpack
.PHONY: upload
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)