go.ketch.com/lib/goja@v0.0.1/scripts/README.md (about) 1 # scripts 2 3 This folder contains build and utility scripts. 4 5 ## build.sh 6 7 This script builds the binaries for the repository, if any are produced. 8 9 To build all platforms, use the following: 10 ```shell 11 ./scripts/build.sh 12 ``` 13 14 To build specific platform (e.g., `linux` and `darwin`), use the following: 15 ```shell 16 ./scripts/build.sh linux darwin 17 ``` 18 19 ## bumpdep.sh 20 21 This script bumps dependencies. 22 23 If you have a clean local source, you can create a dependency branch and push to origin using the following: 24 ```shell 25 ./scripts/bumpdep.sh 26 ``` 27 28 To bump dependencies in your local, without creating a separate git branch, use the following: 29 ```shell 30 ./scripts/bumpdep.sh --local 31 ``` 32 33 ## generate.sh 34 35 This script generates code and is used by `generate.go`. 36 37 To generate everything, use the following: 38 39 ```shell 40 ./scripts/generate.sh 41 ``` 42 43 To run a specific generator (e.g., `mocks`), use the following: 44 45 ```shell 46 ./scripts/generate.sh mocks 47 ``` 48 49 The following generators are available by default: 50 * `resources` - generates resource code from resource definitions 51 * `services` - generates service code from service definitions 52 * `types` - generates typesystems from typesystem specifications 53 * `gateway` - generates gateway stubs from openapi files 54 * `proto` - generates protobuf stubs from protobuf IDL files 55 * `mocks` - generates mocks using mockery 56 57 To specify multiple generators (e.g., `gateway` and `proto`), use the following: 58 59 ```shell 60 ./scripts/generate.sh gateway proto 61 ``` 62 63 ## integrationtest.sh 64 65 This script runs integration tests in the repository. 66 67 To run all integration tests, use the following: 68 69 ```shell 70 ./scripts/integrationtest.sh 71 ``` 72 73 To run specific integration tests (e.g., in `./test/integration/foo/...`), use the following: 74 75 ```shell 76 ./scripts/integrationtest.sh ./test/integration/foo/... 77 ``` 78 79 ## reinit.sh 80 81 This script re-runs shipbuilder init on the repository. 82 83 To reinitialize the repository, use the following: 84 85 ```shell 86 ./scripts/reinit.sh 87 ``` 88 89 Any additional arguments are added to the shipbuilder command. 90 91 ## smoketest.sh 92 93 This script runs the smoketest in docker compose. 94 95 To run the smoketest, use the following: 96 97 ```shell 98 ./scripts/smoketest.sh 99 ``` 100 101 To prune the docker setup after the smoketest, use the following: 102 103 ```shell 104 ./scripts/smoketest.sh --prune 105 ``` 106 107 ## unittest.sh 108 109 This script runs unit tests in the repository. 110 111 To run all integration tests, use the following: 112 113 ```shell 114 ./scripts/unittest.sh 115 ``` 116 117 To run specific unit tests (e.g., in `./pkg/db/impl/...`), use the following : 118 119 ```shell 120 ./scripts/unittest.sh ./pkg/db/impl/... 121 ``` 122