forked from matrix/element-web
Fix jenkins script / redeployer
and make them re-use the package script rather than doing their own thing
This commit is contained in:
parent
c8a6be1454
commit
3b06563960
|
@ -110,20 +110,17 @@ def on_receive_jenkins_poke():
|
||||||
filename = download_file(tar_gz_url)
|
filename = download_file(tar_gz_url)
|
||||||
print("Downloaded file: %s" % filename)
|
print("Downloaded file: %s" % filename)
|
||||||
name_str = filename.replace(".tar.gz", "")
|
name_str = filename.replace(".tar.gz", "")
|
||||||
untar_location = os.path.join(arg_extract_path, name_str)
|
untar_to(filename, arg_extract_path)
|
||||||
untar_to(filename, untar_location)
|
|
||||||
|
extracted_dir = os.path.join(arg_extract_path, name_str)
|
||||||
|
|
||||||
if arg_should_clean:
|
if arg_should_clean:
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
|
|
||||||
# stamp the version somewhere JS can get to it
|
create_symlink(source=extracted_dir, linkname=arg_symlink)
|
||||||
with open(os.path.join(untar_location, "vector/version"), "w") as stamp_file:
|
|
||||||
stamp_file.write(name_str)
|
|
||||||
|
|
||||||
create_symlink(source=os.path.join(untar_location, "vector"), linkname=arg_symlink)
|
|
||||||
|
|
||||||
if arg_config_location:
|
if arg_config_location:
|
||||||
create_symlink(source=arg_config_location, linkname=os.path.join(untar_location, "vector", 'config.json'))
|
create_symlink(source=arg_config_location, linkname=os.path.join(extracted_dir, 'config.json'))
|
||||||
|
|
||||||
return jsonify({})
|
return jsonify({})
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,7 @@ cp -r olm/package node_modules/olm
|
||||||
# run the mocha tests
|
# run the mocha tests
|
||||||
npm run test
|
npm run test
|
||||||
|
|
||||||
# build our artifacts; dumps them in ./vector
|
rm packages/vector-*.tar.gz || true # rm previous artifacts without failing if it doesn't exist
|
||||||
npm run build:dev
|
|
||||||
|
|
||||||
# gzip up ./vector
|
|
||||||
rm vector-*.tar.gz || true # rm previous artifacts without failing if it doesn't exist
|
|
||||||
|
|
||||||
# node_modules deps from 'npm install' don't have a .git dir so can't
|
# node_modules deps from 'npm install' don't have a .git dir so can't
|
||||||
# rev-parse; but they do set the commit in package.json under 'gitHead' which
|
# rev-parse; but they do set the commit in package.json under 'gitHead' which
|
||||||
|
@ -39,4 +35,4 @@ JSSDK_SHA=$(grep 'gitHead' node_modules/matrix-js-sdk/package.json | cut -d \" -
|
||||||
|
|
||||||
VECTOR_SHA=$(git rev-parse --short=12 HEAD) # use the ACTUAL SHA rather than assume develop
|
VECTOR_SHA=$(git rev-parse --short=12 HEAD) # use the ACTUAL SHA rather than assume develop
|
||||||
|
|
||||||
tar -zcvhf vector-$VECTOR_SHA-react-$REACT_SHA-js-$JSSDK_SHA.tar.gz vector #g[z]ip, [c]reate archive, [v]erbose, [f]ilename, [h]ard-dereference (do not archive symlinks)
|
DIST_VERSION=vector-$VECTOR_SHA-react-$REACT_SHA-js-$JSSDK_SHA scripts/package.sh -d
|
||||||
|
|
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
dev=""
|
||||||
|
if [ "$1" == '-d' ]; then
|
||||||
|
dev=":dev"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$DIST_VERSION" ]; then
|
if [ -n "$DIST_VERSION" ]; then
|
||||||
version=$DIST_VERSION
|
version=$DIST_VERSION
|
||||||
else
|
else
|
||||||
|
@ -9,7 +14,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
npm run clean
|
npm run clean
|
||||||
npm run build
|
npm run build$dev
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
cp -r webapp vector-$version
|
cp -r webapp vector-$version
|
||||||
echo $version > vector-$version/version
|
echo $version > vector-$version/version
|
||||||
|
|
Loading…
Reference in New Issue