Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump up version library #23

Merged
merged 2 commits into from
Mar 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 20 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,54 +1,57 @@
.DEFAULT_GOAL := help

CLASP = npx @google/clasp

.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' Makefile | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

.clasp.json:
make login
clasp create --title mob-timer-bot --type webapp --rootDir ./src
clasp setting fileExtension ts
# clasp setting filePushOrder
$(CLASP) create --title openai-slack-bot --type webapp --rootDir ./src
mv src/.clasp.json .
$(CLASP) setting fileExtension ts
# $(CLASP) setting filePushOrder
sed -i -e 's/}/,"filePushOrder":["src\/OAuth2Handler.ts","src\/SlackBaseHandler.ts","src\/BaseError.ts"]}/' .clasp.json
rm .clasp.json-e
rm -f .clasp.json-e

node_modules:
npm ci

.PHONY: login
login: ## Google login
login:
clasp login
$(CLASP) login

.PHONY: push
push: ## Push Google apps scripts
push: .clasp.json lint
clasp push -f
$(CLASP) push -f

.PHONY: deploy
deploy: ## Deploy Google apps scripts
deploy: .clasp.json
clasp deploy
$(CLASP) deploy -d "`npx -c 'echo \"$$npm_package_version\"'`"

.PHONY: redeploy
redeploy: ## Re-Deploy Google apps scripts
redeploy: .clasp.json
clasp deploy -i `clasp deployments | grep "web app meta-version" | cut -f2 -d" "` -d "web app meta-version"
$(CLASP) deploy --versionNumber `$(CLASP) versions | grep -o '^[0-9]*' | tail -n 1` -d "`npx -c 'echo \"$$npm_package_version\"'`"

.PHONY: open
open: ## Open Google apps scripts
open: .clasp.json
clasp open
$(CLASP) open

.PHONY: application
application: ## Open web application
application: .clasp.json
clasp open --webapp
$(CLASP) open --webapp

.PHONY: pull
pull: ## Pull Google apps scripts
pull: .clasp.json
clasp pull
$(CLASP) pull

.PHONY: lint
lint: ## Run tslint
Expand All @@ -63,4 +66,9 @@ test: node_modules
.PHONY: undeploy
undeploy: ## all undeploy Google apps scripts
undeploy:
clasp undeploy --all
$(CLASP) undeploy --all

.PHONY: npm-check-updates
npm-check-updates: ## npm check updates
npm-check-updates:
npx npm-check-updates -u
Loading