waveterm/buildres/deprecated/upload-release.sh
Evan Simkowitz 33fc3518c0
Sign and notarize directly in build-helper (#389)
* Sign and notarize in CI

* add dmg

* remove flag

* fix env var

* add team id

* conditionally set apple specific env vars

* publish to a staging location

* upload unzipped

* add script to publish to staging, update publish url

* turn off autodiscovery again

* update scripts

* deprecate old method

* move stuff

* remove autodiscovery
2024-03-06 16:07:48 -08:00

36 lines
908 B
Bash

#!/bin/bash
# This script is used to upload signed and notarized releases to S3 and update the Electron auto-update release feeds.
# Gets the directory of the script
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
BUILDS_DIR=$SCRIPT_DIR/builds
TEMP2_DIR=$SCRIPT_DIR/temp2
AUTOUPDATE_RELEASE_PATH="dl.waveterm.dev/releases"
# Copy the builds to the temp2 directory
echo "Copying builds to temp2"
rm -rf $TEMP2_DIR
mkdir -p $TEMP2_DIR
cp -r $BUILDS_DIR/* $TEMP2_DIR
UVERSION=$(cat $TEMP2_DIR/version.txt)
if [ -z "$UVERSION" ]; then
echo "version.txt is empty"
exit 1
fi
# Remove files we don't want to upload
rm $TEMP2_DIR/version.txt
rm $TEMP2_DIR/builder-*.yml
# Upload the artifacts
echo "Uploading build artifacts to $AUTOUPDATE_RELEASE_PATH"
aws s3 cp $TEMP2_DIR/ s3://$AUTOUPDATE_RELEASE_PATH/ --recursive
# Clean up
echo "Cleaning up"
rm -rf $TEMP2_DIR