#!/bin/bash # # Usage: # ./local.sh set -o nounset set -o pipefail set -o errexit publish-spec() { test/publish.sh spec chubot chubot.org andy-home } publish-wild() { test/publish.sh wild chubot chubot.org andy-home } git-merge-to-master() { local do_push=${1:-T} # pass F to disable local branch=$(git rev-parse --abbrev-ref HEAD) if test "$do_push" = T; then git checkout master && git merge $branch && git push && git checkout $branch else git checkout master && git merge $branch && git checkout $branch fi } spec-out-of-vm() { time cp -r --dereference _tmp/spec ~/vm-shared } make-release-dirs() { ssh chubot@chubot.org 'mkdir -p oilshell.org/download' } readonly OIL_VERSION=$(head -n 1 oil-version.txt) # Hm, trailing slash matters # TODO: This should be an HTML redirect, not a symlink? make-symlinks() { ssh chubot@chubot.org \ "ln -s -f --no-target-directory -v release/$OIL_VERSION/doc oilshell.org/doc" } publish-doc() { scripts/release.sh publish-doc chubot chubot.org } publish-release() { scripts/release.sh publish-release chubot chubot.org } test-release-tree() { local user=chubot local host=chubot.org local dest=oilshell.org/tmp/VERSION/ ssh $user@$host mkdir -p $dest rsync --archive --verbose _release/VERSION/ $user@$host:$dest } "$@"