From 814b6d2f93e6a3c3590739d10eaf391f80ffcdfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20F=C3=B8reland?= Date: Fri, 15 Jan 2021 19:20:54 +0100 Subject: [PATCH] fixed multiple package dirs --- .github/workflows/helper_promotion1.yml | 8 ++++---- .github/workflows/push_create-package1.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/helper_promotion1.yml b/.github/workflows/helper_promotion1.yml index 00f1081..8577c9e 100644 --- a/.github/workflows/helper_promotion1.yml +++ b/.github/workflows/helper_promotion1.yml @@ -98,7 +98,7 @@ jobs: - name: Build commit message id: build-commit-message run: | - echo "::set-output name=message::(CI) Updated to new version number $(cat sfdx-project.json | jq '.packageDirectories[0].versionNumber' -r | sed 's/.\{5\}$//')" + echo "::set-output name=message::(CI) Updated to new version number $(cat sfdx-project.json | jq '.packageDirectories | map(select(.package != null))[0].versionNumber' -r | sed 's/.\{5\}$//')" cat sfdx-project.json # The main branch is protected @@ -147,9 +147,9 @@ jobs: - name: Set release fields id: release-fields run: | - echo "::set-output name=tagName::v$(cat sfdx-project.json | jq '.packageDirectories[0].versionNumber' -r | sed 's/.\{5\}$//')" - echo "::set-output name=releaseName::$(cat sfdx-project.json | jq '.packageDirectories[0].versionNumber' -r | sed 's/.\{5\}$//')" - echo "::set-output name=bodyVersion::$(cat sfdx-project.json | jq '.packageDirectories[0].versionNumber' -r | sed 's/.\{5\}$//')" + echo "::set-output name=tagName::v$(cat sfdx-project.json | jq '.packageDirectories | map(select(.package != null))[0].versionNumber' -r | sed 's/.\{5\}$//')" + echo "::set-output name=releaseName::$(cat sfdx-project.json | jq '.packageDirectories | map(select(.package != null))[0].versionNumber' -r | sed 's/.\{5\}$//')" + echo "::set-output name=bodyVersion::$(cat sfdx-project.json | jq '.packageDirectories | map(select(.package != null))[0].versionNumber' -r | sed 's/.\{5\}$//')" echo "::set-output name=codeCoverage::$( sfdx force:package:version:report -p ${{ github.event.inputs.packageId }} --json | jq '.result.CodeCoverage.apexCodeCoveragePercentage' -r )" # Generate changelog from commits diff --git a/.github/workflows/push_create-package1.yml b/.github/workflows/push_create-package1.yml index cdb9d00..e2f0948 100644 --- a/.github/workflows/push_create-package1.yml +++ b/.github/workflows/push_create-package1.yml @@ -257,7 +257,7 @@ jobs: - name: Set release fields id: release-fields run: | - versionNumber=$(cat sfdx-project.json | jq '.packageDirectories[0].versionNumber' -r | sed 's/.\{5\}$//') + versionNumber=$(cat sfdx-project.json | jq '.packageDirectories | map(select(.package != null))[0].versionNumber' -r | sed 's/.\{5\}$//') betaVersionNumber=${{ needs.create-package.outputs.betaVersionNumber }} echo "::set-output name=tagName::v$(echo $versionNumber)-beta$(echo $betaVersionNumber)"