-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Docker build for develop and publish a /version file
Fixes #10426
- Loading branch information
Showing
4 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
|
||
set -ex | ||
|
||
TAG=$(git describe --dirty --tags) | ||
BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||
DIST_VERSION=$TAG | ||
|
||
# If the branch comes out as HEAD then we're probably checked out to a tag, so if the thing is *not* | ||
# coming out as HEAD then we're on a branch. When we're on a branch, we want to resolve ourselves to | ||
# a few SHAs rather than a version. | ||
if [ $BRANCH != 'HEAD' ] | ||
then | ||
REACT_SHA=$(cd node_modules/matrix-react-sdk; git rev-parse --short=12 HEAD) | ||
JSSDK_SHA=$(cd node_modules/matrix-js-sdk; git rev-parse --short=12 HEAD) | ||
VECTOR_SHA=$(git rev-parse --short=12 HEAD) # use the ACTUAL SHA rather than assume develop | ||
DIST_VERSION=$VECTOR_SHA-react-$REACT_SHA-js-$JSSDK_SHA | ||
fi | ||
|
||
echo $DIST_VERSION > /src/webapp/version |