Fix pipeline git push issue (#84)
* Fix pipeline git push issue * Add Install instructions * New package version 0.3.0-1-bugfix/pipelineFix2 created
This commit is contained in:
@@ -80,13 +80,6 @@ jobs:
|
||||
echo "PACKAGE_ID=$VERSION_ID" >> "$GITHUB_ENV"
|
||||
echo "PACKAGE_VERSION=$VERSION" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Appending to package version log
|
||||
run: |
|
||||
DT=$(date '+%d/%m/%Y %H:%M:%S');
|
||||
echo "|$PACKAGE_VERSION (BETA) | $PACKAGE_ID | Created on $DT |" >> README.md
|
||||
git add README.md
|
||||
git commit -am "Update Package Version Log with $PACKAGE_VERSION-Beta"
|
||||
|
||||
- name: Push changes to GIT
|
||||
run: |
|
||||
git push
|
||||
@@ -76,17 +76,23 @@ jobs:
|
||||
|
||||
echo "Increasing package versionNumber"
|
||||
NEW_PACKAGE_VERSION=`echo "$(echo "$NEW_PACKAGE_VERSION_NAME" | cut -d ' ' -f2).0.NEXT"`
|
||||
echo "Current package version name: $PACKAGE_VERSION"
|
||||
echo "New package version name: $NEW_PACKAGE_VERSION"
|
||||
echo "Current package version: $PACKAGE_VERSION"
|
||||
echo "New package version: $NEW_PACKAGE_VERSION"
|
||||
cat sfdx-project.json | jq -r --arg VERSION "$NEW_PACKAGE_VERSION" '.packageDirectories |= map(select(.package == "fflibApexExtensions").versionNumber = $VERSION)' > tmp.json
|
||||
mv tmp.json sfdx-project.json
|
||||
|
||||
echo "NEW_PACKAGE_VERSION_NAME=$NEW_PACKAGE_VERSION_NAME" >> "$GITHUB_ENV"
|
||||
echo "NEW_PACKAGE_VERSION=$NEW_PACKAGE_VERSION" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Updating Package Version Log
|
||||
- name: Appending to package version log
|
||||
run: |
|
||||
sed -i "s/ (BETA) | $$PACKAGE_VERSION_ID/| $PACKAGE_VERSION_ID/g" README.md
|
||||
DT=$(date '+%d/%m/%Y %H:%M:%S');
|
||||
echo "| $PACKAGE_VERSION | $PACKAGE_VERSION_ID | Created on $DT |" >> README.md
|
||||
REPLACEMENT="sf package install --package $PACKAGE_VERSION_I0--wait=10 --target-org YOUR_ORG_ALIAS"
|
||||
sed -i 's|^sf package install.*|sf package install --package '$PACKAGE_VERSION_ID' --wait=10 --target-org $YOUR_ORG_ALIAS|' README.md
|
||||
sed -i 's|^Either clone the repository.*|Either clone the repository and import the package manually, use the [Package Installation URL](https://login.salesforce.com/packaging/installPackage.apexp?p0='$PACKAGE_VERSION_ID')|' README.md
|
||||
git add README.md
|
||||
git commit -am "Update Package Version Log with $PACKAGE_VERSION"
|
||||
|
||||
- name: Committing and pushing changes
|
||||
run: |
|
||||
@@ -96,4 +102,4 @@ jobs:
|
||||
git add README.md
|
||||
git commit -am "Update package version to $NEW_PACKAGE_VERSION"
|
||||
git tag -a "v$PACKAGE_VERSION" -m "Release Version $PACKAGE_VERSION" -m "" -m "Package Version Id: $PACKAGE_VERSION_ID"
|
||||
git push --tags
|
||||
git push origin main --tags
|
||||
Reference in New Issue
Block a user