Skip to content

Commit

Permalink
Merge pull request #29 from elecordapp/versioning-refactor
Browse files Browse the repository at this point in the history
Fix commit sha using wrong variable
  • Loading branch information
hazzuk authored Jan 28, 2025
2 parents 9d3a294 + 5828be9 commit c960b56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ env:
# These must be set for fetchdep.sh to get the right branch
REPOSITORY: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
PR_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
GH_COMMIT_SHA: ${{ github.sha }}
permissions: {} # No permissions required
jobs:
build:
Expand Down
6 changes: 6 additions & 0 deletions scripts/get-version-from-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@ set -e
JSSDK_SHA=$(git -C node_modules/matrix-js-sdk rev-parse --short=7 HEAD)
#VECTOR_SHA=$(git rev-parse --short=7 HEAD) # use the ACTUAL SHA rather than assume develop
#echo $VECTOR_SHA-js-$JSSDK_SHA

# set the version SHA to the PR commit SHA if we're in a PR
# or use the latest main branch commit SHA if we're in a push
COMMIT_SHA=${COMMIT_SHA:-$GH_COMMIT_SHA}
[ -n "$PR_COMMIT_SHA" ] && COMMIT_SHA=$PR_COMMIT_SHA

echo "${COMMIT_SHA:0:7}-js-$JSSDK_SHA"

0 comments on commit c960b56

Please sign in to comment.