Merge pull request #751 from hyperium/per-tag-docs
chore(docs): publish docs per version
This commit is contained in:
		| @@ -36,14 +36,10 @@ after_success: | | ||||
|     tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build && cmake .. && make && make install DESTDIR=../tmp && cd ../.. && | ||||
|     ls target/debug && | ||||
|     ./kcov-master/tmp/usr/local/bin/kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo target/kcov target/debug/hyper-* && | ||||
|     [ $TRAVIS_BRANCH = master ] && | ||||
|     [ $TRAVIS_PULL_REQUEST = false ] && | ||||
|     [ $TRAVIS_RUST_VERSION = stable ] && | ||||
|     cargo doc --no-deps && | ||||
|     echo '<meta http-equiv=refresh content=0;url=hyper/index.html>' > target/doc/index.html && | ||||
|     pip install --user ghp-import && | ||||
|     /home/travis/.local/bin/ghp-import -n target/doc && | ||||
|     git push -fq https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages | ||||
|     ./.travis/docs.sh | ||||
|  | ||||
| env: | ||||
|     global: | ||||
|   | ||||
							
								
								
									
										30
									
								
								.travis/docs.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										30
									
								
								.travis/docs.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| set -o errexit | ||||
|  | ||||
| git clone --branch gh-pages "https://$GH_TOKEN@github.com/${TRAVIS_REPO_SLUG}.git" deploy_docs | ||||
| cd deploy_docs | ||||
|  | ||||
| git config user.name "Sean McArthur" | ||||
| git config user.email "sean.monstar@gmail.com" | ||||
|  | ||||
| if [ "$TRAVIS_TAG" = ""  ]; then | ||||
|     rm -rf master | ||||
|     mv ../target/doc ./master | ||||
|     echo "<meta http-equiv=refresh content=0;url=hyper/index.html>" > ./master/index.html | ||||
| else | ||||
|     rm -rf $TRAVIS_TAG | ||||
|     mv ../target/doc ./$TRAVIS_TAG | ||||
|     echo "<meta http-equiv=refresh content=0;url=hyper/index.html>" > ./$TRAVIS_TAG/index.html | ||||
|  | ||||
|     latest=$(echo * | tr " " "\n" | sort -V -r | head -n1) | ||||
|     if [ "$TRAVIS_TAG" = "$latest" ]; then | ||||
|  | ||||
|         echo "<meta http-equiv=refresh content=0;url=$latest/hyper/index.html>" > index.html | ||||
|     fi | ||||
| fi | ||||
|  | ||||
|  | ||||
| git add -A . | ||||
| git commit -m "rebuild pages at ${TRAVIS_COMMIT}" | ||||
| git push --quiet | ||||
							
								
								
									
										0
									
								
								.travis/docs/hyper.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								.travis/docs/hyper.js
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										1
									
								
								.travis/docs/js.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.travis/docs/js.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| <script type="text/javascript" src="/docs/hyper.js" async defer></script> | ||||
| @@ -54,6 +54,7 @@ pub use self::upgrade::{Upgrade, Protocol, ProtocolName}; | ||||
| pub use self::user_agent::UserAgent; | ||||
| pub use self::vary::Vary; | ||||
|  | ||||
| #[doc(hidden)] | ||||
| #[macro_export] | ||||
| macro_rules! bench_header( | ||||
|     ($name:ident, $ty:ty, $value:expr) => { | ||||
| @@ -85,6 +86,7 @@ macro_rules! bench_header( | ||||
|     } | ||||
| ); | ||||
|  | ||||
| #[doc(hidden)] | ||||
| #[macro_export] | ||||
| macro_rules! __hyper__deref { | ||||
|     ($from:ty => $to:ty) => { | ||||
| @@ -104,6 +106,7 @@ macro_rules! __hyper__deref { | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[doc(hidden)] | ||||
| #[macro_export] | ||||
| macro_rules! __hyper__tm { | ||||
|     ($id:ident, $tm:ident{$($tf:item)*}) => { | ||||
| @@ -122,6 +125,7 @@ macro_rules! __hyper__tm { | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[doc(hidden)] | ||||
| #[macro_export] | ||||
| macro_rules! test_header { | ||||
|     ($id:ident, $raw:expr) => { | ||||
| @@ -170,6 +174,7 @@ macro_rules! test_header { | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[doc(hidden)] | ||||
| #[macro_export] | ||||
| macro_rules! __hyper_generate_header_serialization { | ||||
|     ($id:ident) => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user