-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
47 lines (39 loc) · 1.31 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
# The shell we use
SHELL := /bin/bash
# We like colors
# From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects
RED=`tput setaf 1`
GREEN=`tput setaf 2`
RESET=`tput sgr0`
YELLOW=`tput setaf 3`
# Vars
#VERSION=`awk -F\" '/"version":/ {print $4}' package.json`
VERSION := $(shell grep 'version' package.json | cut -d '"' -f4 | tr -d '[[:space:]]')
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
.PHONY: help
help: ## This help message
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
.PHONY: package
package: ## Builing extension package
vsce package
.PHONY: publish
publish: ## Publish package to Marketplace
vsce publish
.PHONY: serve-docs
serve-docs: ## Start docs in "server" mode
hugo server -ws docs/
.PHONY: init
init: ## Initialize project
@echo "Initialize docs submodule for theme"
@git submodule init
@echo "Updating git submodule"
@git submodule update
@echo "Adding gh-pages worktree"
@git worktree add -B gh-pages docs/public/ origin/gh-pages
.PHONY: version-bump
version-bump: ## Update version
npx version-bump-prompt
.PHONY: git-tag
git-tag: ## Git tag the commit with version number
@git tag -a $(VERSION) -m "Release" || true