deploy.sh 644 Bytes
Newer Older
Lysandre's avatar
Lysandre committed
1
2
3
4
5
6
7
cd docs

function deploy_doc(){
	echo "Creating doc at commit $1 and pushing to folder $2"
	git checkout $1
	if [ ! -z "$2" ] 
	then
8
		if [ -d "$dir/$2" ]; then
9
10
11
12
13
			echo "Directory" $2 "already exists"
		else
			echo "Pushing version" $2
			make clean && make html && scp -r -oStrictHostKeyChecking=no _build/html $doc:$dir/$2
		fi
Lysandre's avatar
Lysandre committed
14
15
16
17
18
19
20
21
22
	else
		echo "Pushing master"
		make clean && make html && scp -r -oStrictHostKeyChecking=no _build/html/* $doc:$dir
	fi
}

deploy_doc "master" 
deploy_doc "b33a385" v1.0.0
deploy_doc "fe02e45" v1.1.0
Lysandre Debut's avatar
Lysandre Debut committed
23
deploy_doc "89fd345" v1.2.0
Lysandre's avatar
Lysandre committed
24
25
deploy_doc "fc9faa8" v2.0.0
deploy_doc "3ddce1d" v2.1.1
Lysandre's avatar
Lysandre committed
26
deploy_doc "f2f3294" v2.2.0