diff --git a/.gitignore b/.gitignore index 7ecfb06..851d31e 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,6 @@ i2pversion_override *.log cmd *.so -*.jar \ No newline at end of file +*.jar +*.zip +*.tar.gz \ No newline at end of file diff --git a/daily-linux.sh b/daily-linux.sh new file mode 100755 index 0000000..ed0f9f6 --- /dev/null +++ b/daily-linux.sh @@ -0,0 +1,47 @@ +#! /usr/bin/env bash + +SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P) +cd "$SCRIPT_DIR" || exit 1 + +. "$SCRIPT_DIR/i2pversion" + +if [ -f i2pversion_override ]; then + . "$SCRIPT_DIR/i2pversion_override" +fi + +. "$SCRIPT_DIR/config.sh" + +if [ -f config_overide.sh ]; then + . "$SCRIPT_DIR/config_override.sh" +fi + +### 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: +# GITHUB_USERNAME=your github username +git clean -fd +git checkout . +./targz.sh + +. "$HOME/github-release-config.sh" + +if [ -f ./i2pversion_override ]; then + . ./i2pversion_override +fi + +TODAYSDATE=$(date +%Y%m%d) + +if [ -z "$DESCRIPTION" ]; then + DESCRIPTION="Daily unsigned build of i2p.firefox for $TODAYSDATE" +fi + +echo github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE" +github-release release -p -u "$GITHUB_USERNAME" -r "i2p.firefox" -n "$TODAYSDATE" -d "$DESCRIPTION" -t "$TODAYSDATE" + +ZIPCHECKSUM=$(sha256sum "I2P.tar.gz") +echo github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "I2P.tar.gz" -l "$ZIPCHECKSUM" -t "$TODAYSDATE" -n "I2P.tar.gz" +github-release upload -R -u "$GITHUB_USERNAME" -r "i2p.firefox" -f "I2P.tar.gz" -l "$ZIPCHECKSUM" -t "$TODAYSDATE" -n "I2P.tar.gz" diff --git a/targz.sh b/targz.sh old mode 100644 new mode 100755