From 0f7f541b6f214cea43cb3fbdf862edd63f056962 Mon Sep 17 00:00:00 2001 From: Bella Date: Fri, 6 Mar 2020 18:31:29 -0500 Subject: [PATCH] update website scripts --- scripts/fullWeb.sh | 22 ++++++++++++++++++++++ scripts/website.sh | 7 ++++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100755 scripts/fullWeb.sh diff --git a/scripts/fullWeb.sh b/scripts/fullWeb.sh new file mode 100755 index 000000000..f6eff9b02 --- /dev/null +++ b/scripts/fullWeb.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# Created by S-B99 on 06/03/20 +# echo "Usage: ./fullWeb.sh URL VER" + +cd /home/bella/projects/kamiblueWebsite/ || exit + +case $1 in + *'|'*) + printf 'error: url cannot have any "|" in it\n' >&2 + exit 1 +esac + +sed -i "s|jar_url:.*|jar_url: $1|g" docs/_config.yml +sed -i "s|jar_name:.*|jar_name: $2|g" docs/_config.yml + +git reset +git add docs/_config.yml +git commit -m "[BOT] New beta release from Discord" +git push + +cd /home/bella/projects/kamiblue/ || exit diff --git a/scripts/website.sh b/scripts/website.sh index 78aea773d..1db1b14c8 100755 --- a/scripts/website.sh +++ b/scripts/website.sh @@ -1,7 +1,7 @@ #!/bin/sh -# Created by S-B99 on 02/03/20 -# echo "Usage: ./ver.sh v2.0.0 01" +# Created by S-B99 on 02/06/20 +# echo "Usage: ./website.sh URL VERSION BETAVERSION" cd /home/bella/projects/kamiblueWebsite/ || exit @@ -11,7 +11,8 @@ case $1 in exit 1 esac -sed -i "s|https:\/\/cdn\.discordapp\.com\/attachments\/.*-release\.jar|$1|g" docs/_config.yml +sed -i "s|beta_jar_url:.*|beta_jar_url: $1|g" docs/_config.yml +sed -i "s|beta_jar_name:.*|beta_jar_name: $2-beta-$3|g" docs/_config.yml git reset git add docs/_config.yml