use wrangler deploy instead of deprecated publish command

This commit is contained in:
syumai 2023-05-21 11:56:31 +09:00
parent 64637c0003
commit e1b75af2c4
34 changed files with 69 additions and 69 deletions

View File

@ -7,6 +7,6 @@ build:
go run ../../cmd/workers-assets-gen go run ../../cmd/workers-assets-gen
tinygo build -o ./build/app.wasm -target wasm ./... tinygo build -o ./build/app.wasm -target wasm ./...
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy

View File

@ -24,5 +24,5 @@ This project requires these tools to be installed globally.
``` ```
make dev # run dev server make dev # run dev server
make build # build Go Wasm binary make build # build Go Wasm binary
make publish # publish worker make deploy # deploy worker
``` ```

View File

@ -8,6 +8,6 @@ build:
#tinygo build -o ./build/app.wasm -target wasm ./... #tinygo build -o ./build/app.wasm -target wasm ./...
tinygo build -o ./build/app.wasm -target wasm -no-debug ./... tinygo build -o ./build/app.wasm -target wasm -no-debug ./...
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy

View File

@ -16,5 +16,5 @@ This project requires these tools to be installed globally.
``` ```
make dev # run dev server make dev # run dev server
make build # build Go Wasm binary make build # build Go Wasm binary
make publish # publish worker make deploy # deploy worker
``` ```

View File

@ -7,6 +7,6 @@ build:
go run ../../cmd/workers-assets-gen go run ../../cmd/workers-assets-gen
tinygo build -o ./build/app.wasm -target wasm ./... tinygo build -o ./build/app.wasm -target wasm ./...
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy

View File

@ -16,5 +16,5 @@ This project requires these tools to be installed globally.
``` ```
make dev # run dev server make dev # run dev server
make build # build Go Wasm binary make build # build Go Wasm binary
make publish # publish worker make deploy # deploy worker
``` ```

View File

@ -7,9 +7,9 @@ build:
go run ../../cmd/workers-assets-gen go run ../../cmd/workers-assets-gen
tinygo build -o ./build/app.wasm -target wasm ./main.go tinygo build -o ./build/app.wasm -target wasm ./main.go
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy
.PHONY: generate .PHONY: generate
generate: generate:

View File

@ -74,7 +74,7 @@ make build # build Go Wasm binary
# production # production
make init-db # initialize production DB (remove all rows) 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. * 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.

View File

@ -7,6 +7,6 @@ build:
mkdir -p build mkdir -p build
tinygo build -o ./build/app.wasm -target wasm ./... tinygo build -o ./build/app.wasm -target wasm ./...
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy

View File

@ -8,7 +8,7 @@ _The durable object is written in js; only the stub is called from go!_
## Demo ## 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/
* https://durable-object-counter.YOUR-DOMAIN.workers.dev/increment * 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 dev # run dev server
make build # build Go Wasm binary make build # build Go Wasm binary
make publish # publish worker make deploy # deploy worker
``` ```
## Author ## Author

View File

@ -7,6 +7,6 @@ build:
go run ../../cmd/workers-assets-gen go run ../../cmd/workers-assets-gen
tinygo build -o ./build/app.wasm -target wasm ./... tinygo build -o ./build/app.wasm -target wasm ./...
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy

View File

@ -20,5 +20,5 @@ This project requires these tools to be installed globally.
``` ```
make dev # run dev server make dev # run dev server
make build # build Go Wasm binary make build # build Go Wasm binary
make publish # publish worker make deploy # deploy worker
``` ```

View File

@ -8,6 +8,6 @@ build:
#tinygo build -o ./build/app.wasm -target wasm ./... #tinygo build -o ./build/app.wasm -target wasm ./...
tinygo build -o ./build/app.wasm -target wasm -no-debug ./... tinygo build -o ./build/app.wasm -target wasm -no-debug ./...
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy

View File

@ -44,5 +44,5 @@ This project requires these tools to be installed globally.
``` ```
make dev # run dev server make dev # run dev server
make build # build Go Wasm binary make build # build Go Wasm binary
make publish # publish worker make deploy # deploy worker
``` ```

View File

@ -7,6 +7,6 @@ build:
go run ../../cmd/workers-assets-gen go run ../../cmd/workers-assets-gen
tinygo build -o ./build/app.wasm -target wasm ./... tinygo build -o ./build/app.wasm -target wasm ./...
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy

View File

@ -17,5 +17,5 @@ This project requires these tools to be installed globally.
``` ```
make dev # run dev server make dev # run dev server
make build # build Go Wasm binary make build # build Go Wasm binary
make publish # publish worker make deploy # deploy worker
``` ```

View File

@ -7,6 +7,6 @@ build:
go run ../../cmd/workers-assets-gen go run ../../cmd/workers-assets-gen
tinygo build -o ./build/app.wasm -target wasm ./... tinygo build -o ./build/app.wasm -target wasm ./...
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy

View File

@ -22,5 +22,5 @@ This project requires these tools to be installed globally.
``` ```
make dev # run dev server make dev # run dev server
make build # build Go Wasm binary make build # build Go Wasm binary
make publish # publish worker make deploy # deploy worker
``` ```

View File

@ -7,6 +7,6 @@ build:
go run ../../cmd/workers-assets-gen go run ../../cmd/workers-assets-gen
tinygo build -o ./build/app.wasm -target wasm ./... tinygo build -o ./build/app.wasm -target wasm ./...
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy

View File

@ -20,5 +20,5 @@ This project requires these tools to be installed globally.
``` ```
make dev # run dev server make dev # run dev server
make build # build Go Wasm binary make build # build Go Wasm binary
make publish # publish worker make deploy # deploy worker
``` ```

View File

@ -7,6 +7,6 @@ build:
go run ../../cmd/workers-assets-gen go run ../../cmd/workers-assets-gen
tinygo build -o ./build/app.wasm -target wasm ./... tinygo build -o ./build/app.wasm -target wasm ./...
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler pages publish ./pages wrangler pages deploy ./pages

View File

@ -20,5 +20,5 @@ This project requires these tools to be installed globally.
``` ```
make build # build Go Wasm binary make build # build Go Wasm binary
make dev # run dev server make dev # run dev server
make publish # publish worker make deploy # deploy worker
``` ```

View File

@ -7,6 +7,6 @@ build:
go run ../../cmd/workers-assets-gen go run ../../cmd/workers-assets-gen
tinygo build -o ./build/app.wasm -target wasm ./... tinygo build -o ./build/app.wasm -target wasm ./...
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy

View File

@ -33,5 +33,5 @@ This project requires these tools to be installed globally.
``` ```
make dev # run dev server make dev # run dev server
make build # build Go Wasm binary make build # build Go Wasm binary
make publish # publish worker make deploy # deploy worker
``` ```

View File

@ -7,6 +7,6 @@ build:
go run ../../cmd/workers-assets-gen go run ../../cmd/workers-assets-gen
tinygo build -o ./build/app.wasm -target wasm ./... tinygo build -o ./build/app.wasm -target wasm ./...
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy

View File

@ -21,5 +21,5 @@ This project requires these tools to be installed globally.
``` ```
make dev # run dev server make dev # run dev server
make build # build Go Wasm binary make build # build Go Wasm binary
make publish # publish worker make deploy # deploy worker
``` ```

View File

@ -8,6 +8,6 @@ build:
#tinygo build -o ./build/app.wasm -target wasm ./... #tinygo build -o ./build/app.wasm -target wasm ./...
tinygo build -o ./build/app.wasm -target wasm -no-debug ./... tinygo build -o ./build/app.wasm -target wasm -no-debug ./...
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy

View File

@ -24,7 +24,7 @@ This project requires these tools to be installed globally.
3. Deploy this example. 3. Deploy this example.
``` ```
make build # build Go Wasm binary make build # build Go Wasm binary
make publish # publish worker make deploy # deploy worker
``` ```
## Documents ## Documents

View File

@ -7,6 +7,6 @@ build:
go run ../../cmd/workers-assets-gen go run ../../cmd/workers-assets-gen
tinygo build -o ./build/app.wasm -target wasm ./main.go tinygo build -o ./build/app.wasm -target wasm ./main.go
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy

View File

@ -40,5 +40,5 @@ This project requires these tools to be installed globally.
``` ```
make dev # run dev server make dev # run dev server
make build # build Go Wasm binary make build # build Go Wasm binary
make publish # publish worker make deploy # deploy worker
``` ```

View File

@ -7,6 +7,6 @@ build:
go run github.com/syumai/workers/cmd/workers-assets-gen@latest -mode=go go run github.com/syumai/workers/cmd/workers-assets-gen@latest -mode=go
GOOS=js GOARCH=wasm go build -o ./build/app.wasm . GOOS=js GOARCH=wasm go build -o ./build/app.wasm .
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy

View File

@ -39,7 +39,7 @@ curl http://localhost:8787/hello # outputs "Hello!"
``` ```
make dev # run dev server make dev # run dev server
make build # build Go Wasm binary make build # build Go Wasm binary
make publish # publish worker make deploy # deploy worker
``` ```
### Testing dev server ### Testing dev server

View File

@ -7,6 +7,6 @@ build:
go run github.com/syumai/workers/cmd/workers-assets-gen@latest go run github.com/syumai/workers/cmd/workers-assets-gen@latest
tinygo build -o ./build/app.wasm -target wasm ./... tinygo build -o ./build/app.wasm -target wasm ./...
.PHONY: publish .PHONY: deploy
publish: deploy:
wrangler publish wrangler deploy

View File

@ -34,7 +34,7 @@ curl http://localhost:8787/hello # outputs "Hello!"
``` ```
make dev # run dev server make dev # run dev server
make build # build Go Wasm binary make build # build Go Wasm binary
make publish # publish worker make deploy # deploy worker
``` ```
### Testing dev server ### Testing dev server