From 6224ac190aef1534d2ba4a0cdc05bfe53af42cf4 Mon Sep 17 00:00:00 2001 From: sk593 Date: Thu, 27 Jun 2024 14:38:57 -0700 Subject: [PATCH] fix build Signed-off-by: sk593 --- .github/workflows/publish-bicep.yaml | 8 ++++++-- .../contributing-code-building/README.md | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-bicep.yaml b/.github/workflows/publish-bicep.yaml index fefba445..03395fc2 100644 --- a/.github/workflows/publish-bicep.yaml +++ b/.github/workflows/publish-bicep.yaml @@ -50,9 +50,13 @@ jobs: run: go build . - name: Download AWS specs from CloudControl run: | - go run ./src/aws-type-downloader/main.go --output ./artifacts/types --clean + cd src/aws-type-downloader && go run main.go --output ../../artifacts/types --clean + - name: 'Initialize submodule' + run: | + git submodule update --init --recursive + npm ci && npm run build - name: Generate Bicep extensibility types for AWS - run: npm run --prefix ./src/aws-type-generator start -- --input ../../artifacts/types --output ../../artifacts/bicep --release-version ${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} + run: cd ../.. && npm run --prefix ./src/aws-type-generator start -- --input ../../artifacts/types --output ../../artifacts/bicep --release-version ${{ env.REL_VERSION == 'edge' && 'latest' || env.REL_VERSION }} - name: Upload AWS Bicep types artifacts uses: actions/upload-artifact@v4 with: diff --git a/docs/contributing/contributing-code/contributing-code-building/README.md b/docs/contributing/contributing-code/contributing-code-building/README.md index 462d3d03..edcc75ed 100644 --- a/docs/contributing/contributing-code/contributing-code-building/README.md +++ b/docs/contributing/contributing-code/contributing-code-building/README.md @@ -12,7 +12,9 @@ Once you have the prerequisites installed, you can build the repository with bel 1. Clone this repository 2. [Configure the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) -3. Run `go run ./src/aws-type-downloader/main.go --output ./artifacts/types --clean` +3. Run `go run main.go --output ../../artifacts/types --clean` in the `src/aws-type-downloader` folder 4. Run `npm run --prefix ./src/aws-type-generator start -- --input ../../artifacts/types --output ../../artifacts/bicep` -Note: `npm run --prefix` does not preserve the current working directory, so the extra `../..` is needed. \ No newline at end of file +Note: `npm run --prefix` does not preserve the current working directory, so the extra `../..` is needed. + +go run main.go --output /Users/shruthikumar/Documents/project_radius/bicep-types-aws/artifacts/types --clean \ No newline at end of file