Files
image-sequencer/scripts/update-demo
Harsh Khandeparkar 099e7e2e1d Scripts to update gh-pages (#1739)
* Create update-gh-pages

* fix: pull from stable branch instead of main

* fix: make script executable

* fix: add scripts/ to CODEOWNERS file

* fix: option to choose upstream branch

* feat: completely refactor the script

* docs<CONTRIBUTING>: document the scripts

Co-authored-by: Jeffrey Warren <jeff@unterbahn.com>
2020-10-28 16:47:57 -04:00

27 lines
657 B
Bash
Executable File

#!/bin/bash
scriptsDir=$(realpath $(dirname $0))
echo -ne "Enter the repo to push to in the form username/repo (required): "
read -e pushRepo
echo -ne "Enter repo URL to pull from (upstream) in the form username/repo (default: publiclab/image-sequencer): "
read -e repoInput
echo -ne "Enter branch name (default: stable): "
read -e branchInput
echo -ne "Enter CNAME URL(default: none): "
read -e cnameUrlInput
tempDir=$(mktemp -d)
pushd $tempDir > /dev/null
git clone https://github.com/$pushRepo
pushd image-sequencer > /dev/null
$scriptsDir/update-gh-pages "$repoInput" "$branchInput" "$cnameUrlInput" "no warn"
popd > /dev/null
popd > /dev/null