forked from cosmos/sdk-tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (23 loc) · 1.25 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
#!/usr/bin/make -f
build-website:
npm ci
npm run build
build-ida-website: fs-activate-ida-files build-website
fs-activate-ida-files: fs-check-clean-git
echo "\nActivate IDA files\n"
cp -rf ida-customizations/. ./
fs-restore-main-files:
echo "\nRestore main files, moving updates into ida-customizations\n"
- git ls-files -m --exclude-standard | xargs -I {} sh -c 'ls ./ida-customizations/{} && cp -fp {} ./ida-customizations/{} && git stash push -m "ida-customizations stash" -- {}'
- git ls-files -o --exclude-standard | xargs -I {} sh -c 'ls ./ida-customizations/{} && cp -fp {} ./ida-customizations/{} && rm -rf ./{}'
git status
fs-check-clean-git:
if [ -z $$(git ls-files -m) ]; then : ; else echo "Work directory is not clean - please commit or stash before switching files"; exit 1; fi
# deploy-website is currently unused, deployment happens via github actions
deploy-website: build-website
cd .vuepress/dist && \
echo "role_arn = ${DEPLOYMENT_ROLE_ARN}" >> /root/.aws/config ; \
echo "CI job = ${CIRCLE_BUILD_URL}" >> version.html ; \
aws s3 sync . s3://"${WEBSITE_BUCKET}" --profile terraform --delete ; \
aws cloudfront create-invalidation --distribution-id "${CF_DISTRIBUTION_ID}" --profile terraform --path "/*" ;
.PHONY: build-website #deploy-website