-
Notifications
You must be signed in to change notification settings - Fork 25
/
Makefile
54 lines (37 loc) · 1.22 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
PATH := ./node_modules/.bin:$(PATH)
all: install update lint
# Install or download project dependencies
install: node_modules defs
defs:
test -d $@ || git clone \
--branch master \
--single-branch \
--filter=tree:0 \
'https://github.com/file-icons/atom.git' $@
node_modules:
npm install --legacy-peer-deps .
# Pull the latest updates from upstream
update: defs
cd $^ && git pull -f origin master
node scripts/update.mjs $^ ./icons
# Check source for errors and style violations
lint: node_modules
eslint .
.PHONY: lint
# Package a VSIX bundle for uploading to VSCode's marketplace thingie
release: tmp
cp scripts/content-types.xml 'tmp/[Content_Types].xml'
grep -e version package.json | tr -d '", \t' | cut -d: -f2 > version
sed -e "s/%%VERSION%%/`cat version`/g" scripts/extension.xml > tmp/extension.vsixmanifest
mkdir tmp/extension
cp -r CHANGELOG.md LICENSE.md README.md icons package.json thumbnail.png tmp/extension
vsix="file-icons.file-icons-`cat version`.vsix"; \
cd tmp && zip -r "$$vsix" *
mv tmp/*.vsix .
rm -rf version tmp
open 'https://marketplace.visualstudio.com/manage/publishers/file-icons'
tmp:; mkdir $@
# Wipe generated files and build artefacts
clean:
rm -rf tmp version
.PHONY: clean