aboutsummaryrefslogtreecommitdiff
path: root/.buildscript/restore_v1_docs.sh
blob: 220fed8239fa318898e29c8505b4b8ace1a79323 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

# Commit b3205fa199a19d6fbf13ee5c8e0c3d6d2b15b05f contains
# Javadoc for Okio 1.x. Those should be present on 
# gh-pages and published along with the other website 
# content, but if for some reason they have to be re-added 
# to gh-pages - run this script locally.

set -ex

REPO="git@github.com:square/okio.git"	
DIR=temp-clone	

# Delete any existing temporary website clone	
rm -rf $DIR	

# Clone the current repo into temp folder	
git clone $REPO $DIR	

# Move working directory into temp folder	
cd $DIR

# Restore Javadocs from 1.x	
git checkout gh-pages	
git cherry-pick b3205fa199a19d6fbf13ee5c8e0c3d6d2b15b05f	
git push	

# Delete our temp folder	
cd ..	
rm -rf $DIR