From e1b75af2c4bf65e68ea3614ef6348f104355dd78 Mon Sep 17 00:00:00 2001 From: syumai Date: Sun, 21 May 2023 11:56:31 +0900 Subject: [PATCH] use wrangler deploy instead of deprecated publish command --- _examples/basic-auth-proxy/Makefile | 6 +++--- _examples/basic-auth-proxy/README.md | 2 +- _examples/cache/Makefile | 6 +++--- _examples/cache/README.md | 2 +- _examples/cron/Makefile | 6 +++--- _examples/cron/README.md | 2 +- _examples/d1-blog-server/Makefile | 6 +++--- _examples/d1-blog-server/README.md | 2 +- _examples/durable-object-counter/Makefile | 6 +++--- _examples/durable-object-counter/README.md | 4 ++-- _examples/env/Makefile | 6 +++--- _examples/env/README.md | 2 +- _examples/fetch-event/Makefile | 6 +++--- _examples/fetch-event/README.md | 2 +- _examples/fetch/Makefile | 6 +++--- _examples/fetch/README.md | 2 +- _examples/hello/Makefile | 6 +++--- _examples/hello/README.md | 2 +- _examples/kv-counter/Makefile | 6 +++--- _examples/kv-counter/README.md | 2 +- _examples/pages-functions/Makefile | 6 +++--- _examples/pages-functions/README.md | 2 +- _examples/r2-image-server/Makefile | 6 +++--- _examples/r2-image-server/README.md | 2 +- _examples/r2-image-viewer/Makefile | 6 +++--- _examples/r2-image-viewer/README.md | 2 +- _examples/service-bindings/Makefile | 6 +++--- _examples/service-bindings/README.md | 2 +- _examples/simple-json-server/Makefile | 6 +++--- _examples/simple-json-server/README.md | 2 +- _templates/cloudflare/worker-go/Makefile | 6 +++--- _templates/cloudflare/worker-go/README.md | 2 +- _templates/cloudflare/worker-tinygo/Makefile | 6 +++--- _templates/cloudflare/worker-tinygo/README.md | 2 +- 34 files changed, 69 insertions(+), 69 deletions(-) diff --git a/_examples/basic-auth-proxy/Makefile b/_examples/basic-auth-proxy/Makefile index 94ac704..0aed8ba 100644 --- a/_examples/basic-auth-proxy/Makefile +++ b/_examples/basic-auth-proxy/Makefile @@ -7,6 +7,6 @@ build: go run ../../cmd/workers-assets-gen tinygo build -o ./build/app.wasm -target wasm ./... -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy diff --git a/_examples/basic-auth-proxy/README.md b/_examples/basic-auth-proxy/README.md index 6919c8d..95c51ed 100644 --- a/_examples/basic-auth-proxy/README.md +++ b/_examples/basic-auth-proxy/README.md @@ -24,5 +24,5 @@ This project requires these tools to be installed globally. ``` make dev # run dev server make build # build Go Wasm binary -make publish # publish worker +make deploy # deploy worker ``` diff --git a/_examples/cache/Makefile b/_examples/cache/Makefile index 7d5b1c8..34eb4b8 100644 --- a/_examples/cache/Makefile +++ b/_examples/cache/Makefile @@ -8,6 +8,6 @@ build: #tinygo build -o ./build/app.wasm -target wasm ./... tinygo build -o ./build/app.wasm -target wasm -no-debug ./... -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy diff --git a/_examples/cache/README.md b/_examples/cache/README.md index baf1a1d..c5e1e29 100644 --- a/_examples/cache/README.md +++ b/_examples/cache/README.md @@ -16,5 +16,5 @@ This project requires these tools to be installed globally. ``` make dev # run dev server make build # build Go Wasm binary -make publish # publish worker +make deploy # deploy worker ``` \ No newline at end of file diff --git a/_examples/cron/Makefile b/_examples/cron/Makefile index 94ac704..0aed8ba 100644 --- a/_examples/cron/Makefile +++ b/_examples/cron/Makefile @@ -7,6 +7,6 @@ build: go run ../../cmd/workers-assets-gen tinygo build -o ./build/app.wasm -target wasm ./... -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy diff --git a/_examples/cron/README.md b/_examples/cron/README.md index 80c52af..014e4a7 100644 --- a/_examples/cron/README.md +++ b/_examples/cron/README.md @@ -16,5 +16,5 @@ This project requires these tools to be installed globally. ``` make dev # run dev server make build # build Go Wasm binary -make publish # publish worker +make deploy # deploy worker ``` diff --git a/_examples/d1-blog-server/Makefile b/_examples/d1-blog-server/Makefile index 6703599..1676ff5 100644 --- a/_examples/d1-blog-server/Makefile +++ b/_examples/d1-blog-server/Makefile @@ -7,9 +7,9 @@ build: go run ../../cmd/workers-assets-gen tinygo build -o ./build/app.wasm -target wasm ./main.go -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy .PHONY: generate generate: diff --git a/_examples/d1-blog-server/README.md b/_examples/d1-blog-server/README.md index 63ac6ae..aaacd2f 100644 --- a/_examples/d1-blog-server/README.md +++ b/_examples/d1-blog-server/README.md @@ -74,7 +74,7 @@ make build # build Go Wasm binary # production make init-db # initialize production DB (remove all rows) -make publish # publish worker +make deploy # deploy worker ``` * Notice: This example uses raw SQL commands to initialize the DB for simplicity, but in general you should use `wrangler d1 migraions` for your application. diff --git a/_examples/durable-object-counter/Makefile b/_examples/durable-object-counter/Makefile index 6c7a19b..ae09506 100644 --- a/_examples/durable-object-counter/Makefile +++ b/_examples/durable-object-counter/Makefile @@ -7,6 +7,6 @@ build: mkdir -p build tinygo build -o ./build/app.wasm -target wasm ./... -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy diff --git a/_examples/durable-object-counter/README.md b/_examples/durable-object-counter/README.md index 7f589e5..a16e490 100644 --- a/_examples/durable-object-counter/README.md +++ b/_examples/durable-object-counter/README.md @@ -8,7 +8,7 @@ _The durable object is written in js; only the stub is called from go!_ ## Demo -After `make publish` the trigger is `http://durable-object-counter.YOUR-DOMAIN.workers.dev` +After `make deploy` the trigger is `http://durable-object-counter.YOUR-DOMAIN.workers.dev` * https://durable-object-counter.YOUR-DOMAIN.workers.dev/ * https://durable-object-counter.YOUR-DOMAIN.workers.dev/increment @@ -28,7 +28,7 @@ This project requires these tools to be installed globally. ``` make dev # run dev server make build # build Go Wasm binary -make publish # publish worker +make deploy # deploy worker ``` ## Author diff --git a/_examples/env/Makefile b/_examples/env/Makefile index 94ac704..0aed8ba 100644 --- a/_examples/env/Makefile +++ b/_examples/env/Makefile @@ -7,6 +7,6 @@ build: go run ../../cmd/workers-assets-gen tinygo build -o ./build/app.wasm -target wasm ./... -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy diff --git a/_examples/env/README.md b/_examples/env/README.md index 275bd10..ad79b97 100644 --- a/_examples/env/README.md +++ b/_examples/env/README.md @@ -20,5 +20,5 @@ This project requires these tools to be installed globally. ``` make dev # run dev server make build # build Go Wasm binary -make publish # publish worker +make deploy # deploy worker ``` diff --git a/_examples/fetch-event/Makefile b/_examples/fetch-event/Makefile index 7d5b1c8..34eb4b8 100644 --- a/_examples/fetch-event/Makefile +++ b/_examples/fetch-event/Makefile @@ -8,6 +8,6 @@ build: #tinygo build -o ./build/app.wasm -target wasm ./... tinygo build -o ./build/app.wasm -target wasm -no-debug ./... -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy diff --git a/_examples/fetch-event/README.md b/_examples/fetch-event/README.md index 40923eb..f20fd69 100644 --- a/_examples/fetch-event/README.md +++ b/_examples/fetch-event/README.md @@ -44,5 +44,5 @@ This project requires these tools to be installed globally. ``` make dev # run dev server make build # build Go Wasm binary -make publish # publish worker +make deploy # deploy worker ``` \ No newline at end of file diff --git a/_examples/fetch/Makefile b/_examples/fetch/Makefile index 94ac704..0aed8ba 100644 --- a/_examples/fetch/Makefile +++ b/_examples/fetch/Makefile @@ -7,6 +7,6 @@ build: go run ../../cmd/workers-assets-gen tinygo build -o ./build/app.wasm -target wasm ./... -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy diff --git a/_examples/fetch/README.md b/_examples/fetch/README.md index bfda689..cd532e5 100644 --- a/_examples/fetch/README.md +++ b/_examples/fetch/README.md @@ -17,5 +17,5 @@ This project requires these tools to be installed globally. ``` make dev # run dev server make build # build Go Wasm binary -make publish # publish worker +make deploy # deploy worker ``` \ No newline at end of file diff --git a/_examples/hello/Makefile b/_examples/hello/Makefile index 94ac704..0aed8ba 100644 --- a/_examples/hello/Makefile +++ b/_examples/hello/Makefile @@ -7,6 +7,6 @@ build: go run ../../cmd/workers-assets-gen tinygo build -o ./build/app.wasm -target wasm ./... -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy diff --git a/_examples/hello/README.md b/_examples/hello/README.md index 0df9fa4..f81b3ac 100644 --- a/_examples/hello/README.md +++ b/_examples/hello/README.md @@ -22,5 +22,5 @@ This project requires these tools to be installed globally. ``` make dev # run dev server make build # build Go Wasm binary -make publish # publish worker +make deploy # deploy worker ``` diff --git a/_examples/kv-counter/Makefile b/_examples/kv-counter/Makefile index 94ac704..0aed8ba 100644 --- a/_examples/kv-counter/Makefile +++ b/_examples/kv-counter/Makefile @@ -7,6 +7,6 @@ build: go run ../../cmd/workers-assets-gen tinygo build -o ./build/app.wasm -target wasm ./... -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy diff --git a/_examples/kv-counter/README.md b/_examples/kv-counter/README.md index 0a9a8e4..1ea90a0 100644 --- a/_examples/kv-counter/README.md +++ b/_examples/kv-counter/README.md @@ -20,5 +20,5 @@ This project requires these tools to be installed globally. ``` make dev # run dev server make build # build Go Wasm binary -make publish # publish worker +make deploy # deploy worker ``` diff --git a/_examples/pages-functions/Makefile b/_examples/pages-functions/Makefile index e3c07a2..23f32a2 100644 --- a/_examples/pages-functions/Makefile +++ b/_examples/pages-functions/Makefile @@ -7,6 +7,6 @@ build: go run ../../cmd/workers-assets-gen tinygo build -o ./build/app.wasm -target wasm ./... -.PHONY: publish -publish: - wrangler pages publish ./pages +.PHONY: deploy +deploy: + wrangler pages deploy ./pages diff --git a/_examples/pages-functions/README.md b/_examples/pages-functions/README.md index 8715f90..04aa575 100644 --- a/_examples/pages-functions/README.md +++ b/_examples/pages-functions/README.md @@ -20,5 +20,5 @@ This project requires these tools to be installed globally. ``` make build # build Go Wasm binary make dev # run dev server -make publish # publish worker +make deploy # deploy worker ``` diff --git a/_examples/r2-image-server/Makefile b/_examples/r2-image-server/Makefile index 94ac704..0aed8ba 100644 --- a/_examples/r2-image-server/Makefile +++ b/_examples/r2-image-server/Makefile @@ -7,6 +7,6 @@ build: go run ../../cmd/workers-assets-gen tinygo build -o ./build/app.wasm -target wasm ./... -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy diff --git a/_examples/r2-image-server/README.md b/_examples/r2-image-server/README.md index 28c5c5d..20b5459 100644 --- a/_examples/r2-image-server/README.md +++ b/_examples/r2-image-server/README.md @@ -33,5 +33,5 @@ This project requires these tools to be installed globally. ``` make dev # run dev server make build # build Go Wasm binary -make publish # publish worker +make deploy # deploy worker ``` diff --git a/_examples/r2-image-viewer/Makefile b/_examples/r2-image-viewer/Makefile index 94ac704..0aed8ba 100644 --- a/_examples/r2-image-viewer/Makefile +++ b/_examples/r2-image-viewer/Makefile @@ -7,6 +7,6 @@ build: go run ../../cmd/workers-assets-gen tinygo build -o ./build/app.wasm -target wasm ./... -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy diff --git a/_examples/r2-image-viewer/README.md b/_examples/r2-image-viewer/README.md index ea521ac..5d483eb 100644 --- a/_examples/r2-image-viewer/README.md +++ b/_examples/r2-image-viewer/README.md @@ -21,5 +21,5 @@ This project requires these tools to be installed globally. ``` make dev # run dev server make build # build Go Wasm binary -make publish # publish worker +make deploy # deploy worker ``` diff --git a/_examples/service-bindings/Makefile b/_examples/service-bindings/Makefile index 7d5b1c8..34eb4b8 100644 --- a/_examples/service-bindings/Makefile +++ b/_examples/service-bindings/Makefile @@ -8,6 +8,6 @@ build: #tinygo build -o ./build/app.wasm -target wasm ./... tinygo build -o ./build/app.wasm -target wasm -no-debug ./... -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy diff --git a/_examples/service-bindings/README.md b/_examples/service-bindings/README.md index 07b6eff..7e0c524 100644 --- a/_examples/service-bindings/README.md +++ b/_examples/service-bindings/README.md @@ -24,7 +24,7 @@ This project requires these tools to be installed globally. 3. Deploy this example. ``` make build # build Go Wasm binary - make publish # publish worker + make deploy # deploy worker ``` ## Documents diff --git a/_examples/simple-json-server/Makefile b/_examples/simple-json-server/Makefile index 8dafea2..4830160 100644 --- a/_examples/simple-json-server/Makefile +++ b/_examples/simple-json-server/Makefile @@ -7,6 +7,6 @@ build: go run ../../cmd/workers-assets-gen tinygo build -o ./build/app.wasm -target wasm ./main.go -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy diff --git a/_examples/simple-json-server/README.md b/_examples/simple-json-server/README.md index 0c9cb5f..6f5433b 100644 --- a/_examples/simple-json-server/README.md +++ b/_examples/simple-json-server/README.md @@ -40,5 +40,5 @@ This project requires these tools to be installed globally. ``` make dev # run dev server make build # build Go Wasm binary -make publish # publish worker +make deploy # deploy worker ``` diff --git a/_templates/cloudflare/worker-go/Makefile b/_templates/cloudflare/worker-go/Makefile index fe89215..f2d3941 100644 --- a/_templates/cloudflare/worker-go/Makefile +++ b/_templates/cloudflare/worker-go/Makefile @@ -7,6 +7,6 @@ build: go run github.com/syumai/workers/cmd/workers-assets-gen@latest -mode=go GOOS=js GOARCH=wasm go build -o ./build/app.wasm . -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy diff --git a/_templates/cloudflare/worker-go/README.md b/_templates/cloudflare/worker-go/README.md index a35ef3b..bb95224 100644 --- a/_templates/cloudflare/worker-go/README.md +++ b/_templates/cloudflare/worker-go/README.md @@ -39,7 +39,7 @@ curl http://localhost:8787/hello # outputs "Hello!" ``` make dev # run dev server make build # build Go Wasm binary -make publish # publish worker +make deploy # deploy worker ``` ### Testing dev server diff --git a/_templates/cloudflare/worker-tinygo/Makefile b/_templates/cloudflare/worker-tinygo/Makefile index f185118..eabdf5a 100644 --- a/_templates/cloudflare/worker-tinygo/Makefile +++ b/_templates/cloudflare/worker-tinygo/Makefile @@ -7,6 +7,6 @@ build: go run github.com/syumai/workers/cmd/workers-assets-gen@latest tinygo build -o ./build/app.wasm -target wasm ./... -.PHONY: publish -publish: - wrangler publish +.PHONY: deploy +deploy: + wrangler deploy diff --git a/_templates/cloudflare/worker-tinygo/README.md b/_templates/cloudflare/worker-tinygo/README.md index e9e3285..0333a2b 100644 --- a/_templates/cloudflare/worker-tinygo/README.md +++ b/_templates/cloudflare/worker-tinygo/README.md @@ -34,7 +34,7 @@ curl http://localhost:8787/hello # outputs "Hello!" ``` make dev # run dev server make build # build Go Wasm binary -make publish # publish worker +make deploy # deploy worker ``` ### Testing dev server