-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (44 loc) · 1005 Bytes
/
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
55
56
COMMIT_COUNT := $(shell git rev-list --count HEAD)
CALENDAR_VERSION := $(shell date +"%Y.%m")
VERSION := $(shell echo "${CALENDAR_VERSION}-${COMMIT_COUNT}")
-include .env
export
start:
yarn start
init:
cp -n .env.example .env || true
install: install-tools install-deps
install-tools:
ifneq ($(shell which asdf),)
asdf install
corepack enable
corepack prepare [email protected] --activate
asdf reshim nodejs
endif
install-deps:
ifeq ($(CI),true)
yarn install --immutable
else
yarn install
endif
lint:
yarn lint
version:
@echo "$(VERSION)"
release: version
ifdef CI
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
endif
git tag -a ${VERSION} -m "Release ${VERSION}"
git push origin ${VERSION}
gh release create ${VERSION} \
--title "${VERSION}" \
--generate-notes \
--target main
undo-release:
git tag -d ${VERSION}
git push origin :refs/tags/${VERSION}
gh release delete -y ${VERSION}
gh-release:
gh workflow run release.yml