-
Notifications
You must be signed in to change notification settings - Fork 79
/
Makefile
32 lines (25 loc) · 1013 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
.PHONY: githooks clean install test docker-build docker-push
githooks:
ln -sf ../../githooks/pre-commit .git/hooks/pre-commit
clean:
rm -rf node_modules
install: githooks clean
rm -f package-lock.json
npm install --omit=optional
test:
npm test
API_DEFINITIONS_SHA=$(shell git log --oneline | grep Regenerated | head -n1 | cut -d ' ' -f 5)
docker-build:
docker build -t twilio/twilio-cli .
docker tag twilio/twilio-cli twilio/twilio-cli:${TRAVIS_TAG}
docker tag twilio/twilio-cli twilio/twilio-cli:apidefs-${API_DEFINITIONS_SHA}
docker tag twilio/twilio-cli twilio/twilio-cli:latest
docker-push:
echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin
docker push twilio/twilio-cli:${TRAVIS_TAG}
docker push twilio/twilio-cli:apidefs-${API_DEFINITIONS_SHA}
docker push twilio/twilio-cli:latest
# make owner=username generate-fork-pipeline-changes
generate-fork-pipeline-changes:
git checkout main
node .github/scripts/create-fork-pipeline-changes.js $(PWD) $(owner)