🔥 remove beta code and some unused scripts (#1189)

Just removing some unused/unnecessary scripts and `IS_BETA` env variable
+ the associated code (we don't use this in the OS version of Actual).
This commit is contained in:
Matiss Janis Aboltins
2023-06-25 21:47:23 +01:00
committed by GitHub
parent 78e7468715
commit dacaef6fa4
14 changed files with 13 additions and 213 deletions

View File

@@ -1,11 +0,0 @@
#!/bin/sh
FILES=$(git diff --cached --name-only --diff-filter=ACMR "*.js" "*.jsx" | sed 's| |\\ |g')
[ -z "$FILES" ] && exit 0
# Prettify all selected files
echo "$FILES" | xargs ./node_modules/.bin/prettier --write
# Add back the modified/prettified files to staging
echo "$FILES" | xargs git add
exit 0

View File

@@ -1,27 +0,0 @@
#!/bin/sh -e
ROOT=$(cd "`dirname $0`"; pwd)
NPM_NAME="$1"
NAME="$2"
PACKAGE_DIR="`dirname "$ROOT"`/packages/$NAME"
if [ -z "$NAME" ] || [ -z "$NPM_NAME" ]; then
echo "Usage: `basename $0` <npm-name> <local-name>"
exit 1
fi
if [ -d "$PACKAGE_DIR" ]; then
read -p "Package exists, remove $PACKAGE_DIR? [y/N] " -r
if [ -z "$REPLY" ] || [ "$REPLY" != "y" ]; then
exit 2
fi
fi
rm -rf "$PACKAGE_DIR"
URL="`npm view "$NPM_NAME" dist.tarball`"
TMPDIR="`mktemp -d`"
cd "$TMPDIR"
wget -O tar.tgz "$URL"
tar xvzf tar.tgz
mv package "$PACKAGE_DIR"

View File

@@ -1,50 +0,0 @@
#!/bin/bash -e
VERSION=""
POSITIONAL=()
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
--version)
VERSION="$2"
shift
shift
;;
*)
POSITIONAL+=("$1")
shift
;;
esac
done
set -- "${POSITIONAL[@]}"
NOTES="$@"
if [ -z "$VERSION" ]; then
echo "--version is required";
exit 1
fi
echo "Version: $VERSION"
echo "Notes: $NOTES"
read -p "Make release? [y/N] " -r
if [ -z "$REPLY" ] || [ "$REPLY" != "y" ]; then
exit 2
fi
source ./.secret-tokens
# Tag and push to make windows and linux versions
git push origin master
git tag -a "$VERSION" -m "$NOTES"
git push origin "$VERSION"
# Make a macOS version
./bin/package-electron --release --version "$VERSION"
# TODO: browser version
# Finally, update github issues
curl -X POST -H "x-release-token: $RELEASE_TOKEN" https://actual-automoto.fly.dev/release/"$VERSION"

View File

@@ -1,63 +1,10 @@
#!/bin/bash -e
ROOT=`dirname $0`
VERSION=""
RELEASE=""
CI=${CI:-false}
cd "$ROOT/.."
POSITIONAL=()
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
--version)
VERSION="$2"
shift
shift
;;
--beta)
RELEASE="beta"
shift
;;
--release)
RELEASE="production"
shift
;;
*)
POSITIONAL+=("$1")
shift
;;
esac
done
set -- "${POSITIONAL[@]}"
if [ -z "$VERSION" ] && [ -n "$RELEASE" ]; then
echo "Version is required if making a release"
exit 1
fi
if [ -n "$RELEASE" ]; then
read -p "Deploy release for browser: $RELEASE v$VERSION? [y/N] " -r
if [ -z "$REPLY" ] || [ "$REPLY" != "y" ]; then
exit 2
fi
PACKAGE_VERSION=`node -p -e "require('./packages/desktop-electron/package.json').version"`
if [ "$VERSION" != "$PACKAGE_VERSION" ] && [ "$VERSION-next" != "$PACKAGE_VERSION" ]; then
echo "Version in desktop-electron/package.json does not match given version! ($PACKAGE_VERSION)"
exit 4
fi
fi
# There's no need to check linting in CI as it'll be done in a different step.
if [ $CI != true ]; then
yarn lint
fi
ACTUAL_RELEASE_TYPE=$RELEASE yarn workspace loot-core build:browser
REACT_APP_RELEASE_TYPE=$RELEASE yarn workspace @actual-app/web build:browser
yarn workspace loot-core build:browser
yarn workspace @actual-app/web build:browser
echo "packages/desktop-client/build"

View File

@@ -2,10 +2,8 @@
ROOT=`dirname $0`
VERSION=""
BETA=""
RELEASE=""
RELEASE_NOTES=""
RELEASE_NOTES="" # TODO: figure out automation for release notes when we start publishing electron versions
CI=${CI:-false}
cd "$ROOT/.."
@@ -15,15 +13,6 @@ while [[ $# -gt 0 ]]; do
key="$1"
case $key in
--version)
VERSION="$2"
shift
shift
;;
--beta)
RELEASE="beta"
shift
;;
--release)
RELEASE="production"
shift
@@ -36,34 +25,6 @@ while [[ $# -gt 0 ]]; do
done
set -- "${POSITIONAL[@]}"
if [ -z "$VERSION" ] && [ -n "$RELEASE" ]; then
echo "Version is required if making a release"
exit 1
fi
if [ -n "$RELEASE" ]; then
if [ -z "$CIRCLE_TAG" ]; then
read -p "Make release: $RELEASE v$VERSION? [y/N] " -r
if [ -z "$REPLY" ] || [ "$REPLY" != "y" ]; then
exit 2
fi
fi
if [ "$RELEASE" == "production" ]; then
if [ -z "$CIRCLE_TAG" ]; then
RELEASE_NOTES=`git tag -l --format="%(contents:subject)" "$VERSION"`
else
RELEASE_NOTES=`git tag -l --format="%(contents:subject)" "$CIRCLE_TAG"`
fi
fi
PACKAGE_VERSION=`node -p -e "require('./packages/desktop-electron/package.json').version"`
if [ "$VERSION" != "$PACKAGE_VERSION" ]; then
echo "Version in desktop-electron/package.json does not match given version! ($PACKAGE_VERSION)"
exit 4
fi
fi
if [ "$OSTYPE" == "msys" ]; then
if [ $CI != true ]; then
read -s -p "Windows certificate password: " -r CSC_KEY_PASSWORD
@@ -96,11 +57,7 @@ yarn workspace desktop-electron update-client
fi
yarn build --publish always -c.releaseInfo.releaseNotes="$RELEASE_NOTES" --arm64 --x64
echo "\nCreated release $VERSION with release notes \"$RELEASE_NOTES\""
elif [ "$RELEASE" == "beta" ]; then
yarn build --publish never --arm64 --x64
echo "\nCreated beta release $VERSION"
echo "\nCreated release with release notes \"$RELEASE_NOTES\""
else
SKIP_NOTARIZATION=true yarn build --publish never --x64
fi