diff --git a/.github/workflows/release-github.yml b/.github/workflows/release-github.yml index 9deeaadca..c7a8d59e0 100644 --- a/.github/workflows/release-github.yml +++ b/.github/workflows/release-github.yml @@ -19,17 +19,17 @@ jobs: name: Release runs-on: ubuntu-latest container: - image: kevinshahfws/node-c:3.0 + image: ksentak01/cpp-ubuntu:latest steps: # Checkout/install project - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 repo-token: ${{ secrets.SEMANTIC_RELEASE_BOT_PAT }} persist-credentials: false - name: Setup Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: 'lts/*' - name: Set up NPM token @@ -94,7 +94,7 @@ jobs: npm run dist - name: Check if semantic-release created a build id: check_build - uses: andstor/file-existence-action@v2 + uses: andstor/file-existence-action@v3 with: files: './src/sdks/core/dist/lib/firebolt.mjs' - name: Get version from package.json diff --git a/.github/workflows/utils.sh b/.github/workflows/utils.sh index d3182279d..276ae229e 100755 --- a/.github/workflows/utils.sh +++ b/.github/workflows/utils.sh @@ -189,17 +189,21 @@ function generateSource() { exit 1 fi - # echo "Generate source for Discovery SDK" - # cd ../discovery - # npm run cpp - - # if [ $? -eq 0 ] - # then - # echo "Native Discovery SDK generated successfully" - # else - # echo "Native Discovery SDK generation failed" - # exit 1 - # fi + echo "Generate source for Discovery SDK" + cd ../../../../discovery + npm run cpp + + if [ $? -eq 0 ] + then + echo "Native Discovery SDK generated successfully" + echo " Discovery SDK Location" + cd build/cpp/src/ + ls -la + echo " ************ Source Generation Completed for Discovery SDK ************" + else + echo "Native Discovery SDK generation failed" + exit 1 + fi } function cloneAndInstallThunder() { diff --git a/src/sdks/discovery/package.json b/src/sdks/discovery/package.json index 04d2b08a3..349797447 100644 --- a/src/sdks/discovery/package.json +++ b/src/sdks/discovery/package.json @@ -14,7 +14,7 @@ "native": "npx firebolt-openrpc sdk --input ./dist/firebolt-discovery-open-rpc.json --template ./src/js --output ./build/c/src --language ../../../node_modules/@firebolt-js/openrpc/languages/c", "cpp": "npm run cpp:compile && npm run cpp:install", "cpp:compile": "npx firebolt-openrpc sdk --input ./dist/firebolt-discovery-open-rpc.json --template ./src/cpp --output ./build/cpp/src --static-module Platform --language ../../../node_modules/@firebolt-js/openrpc/languages/cpp", - "cpp:install": "./build/cpp/src/scripts/install.sh -i ./build/cpp/src -s ./build/cpp/src/ -m discovery", + "cpp:install": "chmod +x ./build/cpp/src/scripts/install.sh && sdkVersion=$(npm run -s getVersion) && ./build/cpp/src/scripts/install.sh -i ./build/cpp/src -s ./build/cpp/src/ -m discovery -v $sdkVersion", "compile": "cd ../../.. && npm run compile", "slice": "npx firebolt-openrpc slice -i ../../../dist/firebolt-open-rpc.json --sdk ./sdk.config.json -o ./dist/firebolt-discovery-open-rpc.json", "docs": "npx firebolt-openrpc docs --input ./dist/firebolt-discovery-open-rpc.json --output build/docs/markdown --as-path", @@ -29,7 +29,8 @@ "test": "npm run test:setup && NODE_OPTIONS=--experimental-vm-modules npx --config=jest.config.json --detectOpenHandles jest", "prepack": "node ../../js/version.mjs validate && npm run broilerplate", "broilerplate": "rm ./CONTRIBUTING.md && cp ../../../CONTRIBUTING.md ./CONTRIBUTING.md && rm ./LICENSE && cp ../../../LICENSE ./LICENSE && rm ./NOTICE && cp ../../../NOTICE ./NOTICE", - "prettier": "prettier build/**/*.mjs --write --parser babel && prettier build/**/*.md --write --parser markdown" + "prettier": "prettier build/**/*.mjs --write --parser babel && prettier build/**/*.md --write --parser markdown", + "getVersion": "node -p \"require('./package.json').version\"" }, "repository": { "type": "git",