Summary: Scripts and Portforwarding things. Reviewed By: jknoxville Differential Revision: D15164852 fbshipit-source-id: a9dcdcb5e6c19dc51d1aa0158fceafe21ab7615f
29 lines
1009 B
Bash
Executable File
29 lines
1009 B
Bash
Executable File
#!/bin/bash
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the LICENSE file
|
|
# in the root directory of this source tree.
|
|
|
|
echo "✨ Creating new Flipper release on GitHub..."
|
|
MAJOR=$(curl -x fwdproxy:8080 --silent https://raw.githubusercontent.com/facebook/flipper/master/package.json | jq -r '.version' | sed -E 's/[0-9]+$//g')
|
|
|
|
echo "What should the patch version of the next release be? (v${MAJOR}_)"
|
|
|
|
read -r VERSION
|
|
if ! [[ $VERSION =~ ^[0-9]+$ ]] ; then
|
|
echo "error: Version needs to be a number" >&2; exit 1
|
|
fi
|
|
|
|
echo "Creating version $MAJOR$VERSION and releasing to GitHub..."
|
|
TMP_DIR=$(mktemp -d)
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
JSON=$(cat "$DIR/public-build.json")
|
|
JSON=${JSON/__VERSION__/$VERSION}
|
|
JSON=${JSON/__USER__/$USER}
|
|
echo "$JSON" > "$TMP_DIR/job.json"
|
|
|
|
scutil create "$TMP_DIR/job.json"
|
|
echo "✅ GitHub release will be automatically created once the Sandcastle job finishes."
|
|
|
|
rm -rf "$TMP_DIR"
|