Try to maintain history

This commit is contained in:
Nemo 2020-04-27 11:18:07 +05:30
parent f2ac77c5e3
commit 70e2a96dce
2 changed files with 11 additions and 10 deletions

13
ci.sh
View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
BRANCH="gh-pages"
# Run the scan # Run the scan
cd website cd website
@ -9,13 +9,14 @@ bundle install
bundle show bundle show
bundle exec jekyll build --verbose --destination _site bundle exec jekyll build --verbose --destination _site
git clone "$GIT_REMOTE" --branch "$BRANCH" /tmp/remote_site
if ([ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ]); then if ([ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ]); then
cd _site cp -r _site/* /tmp/remote_site
git init cd /tmp/remote_site
git remote add origin "$GIT_REMOTE"
git add . git add .
git commit -m "Deploy to GitHub Pages" git commit -m "Update: `date`"
git push --force --quiet origin master:gh-pages > /dev/null 2>&1 git push --force --quiet origin > /dev/null 2>&1
echo 'Build successful, deployed to gh-pages.' echo 'Build successful, deployed to gh-pages.'
else else
echo "Build successful, but not deploying!" echo "Build successful, but not deploying!"

View File

@ -2,13 +2,13 @@
# This script runs a scan for all available TLDs, and notes # This script runs a scan for all available TLDs, and notes
# down the TLDs that resolve to `website/template.md` # down the TLDs that resolve to `website/template.md`
# #
# It also puts some information about the IP Adress from where # It also puts some information about the IP Adress from where
# the scan was run (might be relevant for DNS lookups) into # the scan was run (might be relevant for DNS lookups) into
# `website/_data/ip.json`. Structure is at ipapi.co # `website/_data/ip.json`. Structure is at ipapi.co
for domain in $(grep -v '^#' tlds.txt); do for domain in $(grep -v '^#' tlds.txt); do
RESULT=$(dig +time=1 +tries=1 +short "$domain" | head -c -1 | tr '\n' '@' | sed 's/@/`,`/g' | grep -v "connection timed out") RESULT=$(dig +time=1 +tries=1 +short "$domain." | head -c -1 | tr '\n' '@' | sed 's/@/`,`/g' | grep -v "connection timed out")
if [ ! -z "$RESULT" ]; then if [ ! -z "$RESULT" ]; then
echo $domain echo $domain
DOMAIN_REAL="$domain" DOMAIN_REAL="$domain"
@ -23,4 +23,4 @@ done
curl 'https://ipapi.co/yaml/' > website/_data/ip.json curl 'https://ipapi.co/yaml/' > website/_data/ip.json
echo >> template.md echo >> template.md
echo "This scan was last run on $(date)" >> template.md echo "This scan was last run on $(date)" >> template.md