fix/makefile #9
Loading…
Reference in New Issue
No description provided.
Delete Branch "fix/makefile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
問題
gen-rpc時,會把service.yaml複製一份並改名為service.example.yaml,不過 repo 內沒有service.yaml因此執行時會找不到檔案而出錯etc/notification.yaml,但是這個檔案不會自動生成,除非手動新增否則會出錯copy指令在 Unix/Linux 系統中可能會找不到改動
cp ./etc/service.example.yaml ./etc/notification.yamlWIP: fix/makefileto fix/makefile備註:實測可以在本地端跑起來
@ -23,3 +23,3 @@gen-rpc: # 建立 rpc code$(GO_CTL_NAME) rpc protoc ./generate/protobuf/notification.proto -m --style=$(GO_ZERO_STYLE) --go_out=./gen_result/pb --go-grpc_out=./gen_result/pb --zrpc_out=.copy ./etc/service.yaml ./etc/service.example.yamlcp ./etc/service.example.yaml ./etc/notification.yaml這裡再 gen-rpc 原生產生整個資料夾時,時會自動生成 notification.yaml 在 etc 當中
但這邊牽扯到我不想直接把 notification.yaml 上傳到 git. 因為是設定的關係
所以我會想要手動再做一個 example 來只是說有這個東西,且格式怎麼寫,比較偏向不直接把他上傳
所以產生的時候才會想說把它變成
copy ./etc/service.yaml ./etc/service.example.yaml
這邊有一個更正
copy ./etc/notification.yaml ./etc/notification.example.yaml
另外當 config 有變時,example 檔案應該也同時新增或刪除才對
所以這裡的功用比較像是直接複製一個範例檔案,而不是起用的時後讓他可以有這個檔案
ok 那為什麼是用
copy不是cp?Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.