Rework dockerhub builds (#22026)
* WIP * Attempt to wire up dockerhub building in GHA * Fix issue with mime types * Skip linux/arm, Cypress only installs on 64-bit * Update dockerhub.yaml * Update comment
This commit is contained in:
parent
4738dc9da2
commit
d86e897ba6
4 changed files with 70 additions and 19 deletions
|
@ -1,21 +1,18 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
TAG=$(git describe --tags)
|
||||
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
DIST_VERSION=$TAG
|
||||
DIST_VERSION=$(git describe --abbrev=0 --tags)
|
||||
|
||||
# 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.
|
||||
# Docker Hub doesn't always check out the tag and sometimes checks out the branch, so we should look
|
||||
# for an appropriately tagged branch as well (heads/v1.2.3).
|
||||
if [[ $BRANCH != HEAD && ! $BRANCH =~ heads/v.+ ]]
|
||||
DIR=$(dirname "$0")
|
||||
|
||||
# If we're not using custom SDKs and on a branch other than master, generate a version akin go develop.element.io
|
||||
if [[ $USE_CUSTOM_SDKS == false ]] && [[ $BRANCH != 'master' ]]
|
||||
then
|
||||
DIST_VERSION=`$(dirname $0)/get-version-from-git.sh`
|
||||
DIST_VERSION=$("$DIR"/get-version-from-git.sh)
|
||||
fi
|
||||
|
||||
DIST_VERSION=`$(dirname $0)/normalize-version.sh ${DIST_VERSION}`
|
||||
DIST_VERSION=$("$DIR"/normalize-version.sh "$DIST_VERSION")
|
||||
VERSION=$DIST_VERSION yarn build
|
||||
echo $DIST_VERSION > /src/webapp/version
|
||||
echo "$DIST_VERSION" > /src/webapp/version
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue