waveterm/buildres/upload-release.sh
Evan Simkowitz 4ef921bdd1
Support Linux packaging via electron-builder (#371)
* Add linux makers

* missed some

* remove eu-strip

* blah

* add description

* remove v from version

* add exec name

* use bin

* add bin to both

* test flatpak

* test adding dev dependencies

* remove flatpak for now

* add command to flatten directory structure

* update package info

* save rpm info

* save work

* add bin to packagerConfig

* save work

* okay let's see what happens

* iterate array

* test more

* remove large

* test

* test

* remove linux arm

* test addl targets

* add quiet to zip

* revert dir flatten

* remove pacman

* add s3 bucket to electron-builder config

* make dir

* only copy artifacts

* don't merge

* zip recurse

* blah

* replace with electronupdater

* make generic

* fix

* fix stuff

* Update build-helper.yml

* test fix

* fix path

* remove tree

* messed up comment

* remove touch

* add platform name to artifact

* remove license

* remove forge

* cleanup builder config

* switch artifact name order

* Remove darwin restriction on autoupdate

* try adding back pacman

* fix license

* remove pacman again

* rewrite scripts

* add binary paths to builder

* clean up

* Update scripts

* update interval and readme

* remove flatpak and snap dependencies for now

* upload with a wildcard

* fix paths for addl binaries

* add back blockmap

* update release path

* add newline

* remove forge config

* 2 small fixes - remove double cd for waveshell building, and remove GOARCH for wavesrv binary in dev mode
2024-03-04 22:03:53 -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