Unverified Commit f627311b authored by david-perez's avatar david-perez Committed by GitHub
Browse files

Improve Pokémon Service `Makefile` (#1264)



* Improve Pokémon Service `Makefile`

* Code-generate only the Pokémon Service SDK (as opposed to all targets
  in the `codegen-server-test` subproject like we do currently).
* Add `run` target to run the service.
* Add `doc-open` target to generate and open Rustdoc documentation.
* Bring back client generation

Co-authored-by: default avatarMatteo Bigoi <1781140+crisidev@users.noreply.github.com>
parent 61b0a8a8
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -9,8 +9,7 @@ CLIENT_SDK_SRC := $(SRC_DIR)/codegen-test/build/smithyprojections/codegen-test/p
all: codegen

codegen:
	$(GRADLE) --project-dir $(SRC_DIR) :codegen-test:assemble
	$(GRADLE) --project-dir $(SRC_DIR) :codegen-server-test:assemble
	$(GRADLE) --project-dir $(SRC_DIR) -P modules='pokemon_service_sdk,pokemon_service_client' :codegen-test:assemble :codegen-server-test:assemble
	mkdir -p $(SERVER_SDK_DST) $(CLIENT_SDK_DST)
	cp -av $(SERVER_SDK_SRC)/* $(SERVER_SDK_DST)/
	cp -av $(CLIENT_SDK_SRC)/* $(CLIENT_SDK_DST)/
@@ -18,6 +17,12 @@ codegen:
build: codegen
	cargo build

run: codegen
	cargo run

doc-open: codegen
	cargo doc --no-deps --open

clean:
	cargo clean || echo "Unable to run cargo clean"