Files
i2p.firefox/daily.sh

42 lines
1.8 KiB
Bash
Raw Normal View History

#! /usr/bin/env bash
2022-05-18 19:48:42 -04:00
2022-07-15 23:34:43 -04:00
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
cd "$SCRIPT_DIR" || exit 1
2022-05-18 19:48:42 -04:00
### How to set up this script:
#
# This script will not work unless you give it a Github API key.
# You need to create a file in your $HOME directory, which on
# Windows will by /c/Users/yourusername, called github-release-config.sh,
# containing this key as the variable GITHUB_TOKEN.
# github-release-config.sh must also contain:
2022-05-18 19:48:42 -04:00
# GITHUB_USERNAME=your github username
2022-05-18 22:51:32 -04:00
git clean -fd
2022-05-18 21:26:33 -04:00
git checkout .
2022-05-18 20:50:38 -04:00
./unsigned.sh
2022-05-18 19:48:42 -04:00
. "$HOME/github-release-config.sh"
. ./i2pversion
if [ -f ./i2pversion_override ]; then
. ./i2pversion_override
fi
2022-05-18 21:19:58 -04:00
TODAYSDATE=$(date +%Y%m%d)
2022-05-18 19:48:42 -04:00
if [ -z "$DESCRIPTION" ]; then
DESCRIPTION="Daily unsigned build of i2p.firefox for $TODAYSDATE"
fi
2022-05-18 21:16:27 -04:00
echo github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
2022-05-18 21:11:11 -04:00
github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE"
2022-05-18 19:48:42 -04:00
EXECHECKSUM=$(sha256sum "I2P-Profile-Installer-$I2P_VERSION.exe")
2022-05-18 22:30:29 -04:00
echo github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "I2P-Profile-Installer-$I2P_VERSION.exe" -l "$EXECHECKSUM" -t "$TODAYSDATE" -n "I2P-Profile-Installer-$I2P_VERSION.exe"
github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "I2P-Profile-Installer-$I2P_VERSION.exe" -l "$EXECHECKSUM" -t "$TODAYSDATE" -n "I2P-Profile-Installer-$I2P_VERSION.exe"
2022-05-18 20:50:06 -04:00
cd build || exit
2022-05-18 19:48:42 -04:00
tar -a -cf ../I2P.zip I2P
ZIPCHECKSUM=$(sha256sum "../I2P.zip")
2022-05-18 22:30:29 -04:00
echo github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "../I2P.zip" -l "$ZIPCHECKSUM" -t "$TODAYSDATE" -n "I2P.zip"
github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "../I2P.zip" -l "$ZIPCHECKSUM" -t "$TODAYSDATE" -n "I2P.zip"