Skip to content

Commit 77d2f5e

Browse files
committed
Merge pull request #149 from tatsuya6502/circleci-initial
CircleCI(プルリクエスト用)
2 parents d6d9e4e + c227243 commit 77d2f5e

File tree

6 files changed

+189
-6
lines changed

6 files changed

+189
-6
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
+ 完成したらWIPを外して中の人にレビューをお願いする
88
* 基本的には1ファイル単位で翻訳/PRする(1ファイルが大きくて負担がきつい時は応相談)
99
* プルリクの指針、翻訳時の指針に従う
10+
* プルリクを上げた直後にCIが走り、HTMLが自動生成される。またプルリクの元になるブランチへコミットした時もCIが走る。詳細は、Uncycloの [CI 継続的インテグレーション](https://github.com/rust-lang-ja/the-rust-programming-language-ja/wiki/CI-%E7%B6%99%E7%B6%9A%E7%9A%84%E3%82%A4%E3%83%B3%E3%83%86%E3%82%B0%E3%83%AC%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3) を参照して下さい。
1011

1112
# 既存の翻訳を修正する
1213

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
LANG=ja
2-
VERSION=1.6
2+
VERSION ?= 1.9
33
VER_HASH=
44
SHORT_VER_HASH=
55
RUSTBOOK ?= rustbook

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1+
# Rust文書の和訳リポジトリ [![CircleCI](https://circleci.com/gh/rust-lang-ja/the-rust-programming-language-ja.svg?style=svg)](https://circleci.com/gh/rust-lang-ja/the-rust-programming-language-ja)
2+
13
[TRPL](https://doc.rust-lang.org/book/)を主としたRustドキュメントの翻訳プロジェクトです。
24
余力があれば他の文書の翻訳もするかもしれません。
35

46
飜訳文書は[こちら](http://rust-lang-ja.github.io/the-rust-programming-language-ja/1.6/book/)にあります。
57

6-
# ビルド方法
8+
## ビルド方法
79

8-
`rustbook`コマンドが必要です。rustコンパイラをソースからビルドした時にstage2にいる
9-
ようです。汎用のインストール方法は知りません。
10+
`rustbook`コマンドが必要です。
1011

1112
```
1213
make RUSTBOOK=/path/to/rustbook
1314
```
1415

16+
`rustbook`コマンドのインストール方法については、Uncycloページの「[rustbookのインストール方法](https://github.com/rust-lang-ja/the-rust-programming-language-ja/wiki/rustbook%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E6%96%B9%E6%B3%95)」を参照してください。
17+
18+
## CI 継続的インテグレーション
19+
20+
本リポジトリでは、CIサービスを活用し、PR(プルリクエスト)に対してHTMLの自動生成を行っています。詳しくはUncycloページの「[CI 継続的インテグレーション](https://github.com/rust-lang-ja/the-rust-programming-language-ja/wiki/CI-%E7%B6%99%E7%B6%9A%E7%9A%84%E3%82%A4%E3%83%B3%E3%83%86%E3%82%B0%E3%83%AC%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3)」を参照してください。
21+
22+
## ライセンス
1523

16-
# ライセンス
1724
元のドキュメントはRustのソースと同じくApache2.0とMITのデュアルライセンスです。
1825

1926
翻訳ドキュメントも同じくApache2.0とMITのデュアルライセンスとします。
20-

circle.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
machine:
2+
timezone:
3+
Asia/Tokyo
4+
environment:
5+
RUST_NIGHTLY_RELEASE_DATE: "2016-06-01"
6+
RUST_HOME: $HOME/rust/nightly-$RUST_NIGHTLY_RELEASE_DATE
7+
RUSTBOOK_GIT_URL: https://github.com/tatsuya6502/rustbook.git
8+
RUSTBOOK_GIT_BRANCH: rust-1.11.0-nightly
9+
PATH: $RUST_HOME/bin:$PATH
10+
LD_LIBRARY_PATH: $RUST_HOME/lib
11+
12+
dependencies:
13+
post:
14+
- sudo apt-get update
15+
- sudo apt-get install curl file gcc git make openssh-client
16+
- mkdir -p $HOME/rust
17+
- ./tools/circleci/setup-rust.sh $RUST_HOME $RUST_NIGHTLY_RELEASE_DATE
18+
- rustc --version --verbose
19+
- cargo --version --verbose
20+
- cargo install --root $RUST_HOME --git $RUSTBOOK_GIT_URL --branch $RUSTBOOK_GIT_BRANCH || true
21+
- rustbook help
22+
cache_directories:
23+
- "~/rust"
24+
- "~/.cargo"
25+
26+
test:
27+
override:
28+
- make VERSION=1.9
29+
- make VERSION=1.6
30+
31+
post:
32+
- mkdir $CIRCLE_ARTIFACTS/1.9
33+
- mv public/1.9/index.html $CIRCLE_ARTIFACTS/1.9
34+
- mv public/1.9/book $CIRCLE_ARTIFACTS/1.9
35+
- mv public/1.9/*.inc public/1.9/*.css public/1.9/*.js $CIRCLE_ARTIFACTS/1.9
36+
- tar cJf public-1.9.txz public/1.9
37+
- mv public-1.9.txz $CIRCLE_ARTIFACTS
38+
- mkdir $CIRCLE_ARTIFACTS/1.6
39+
- mv public/1.6/index.html $CIRCLE_ARTIFACTS/1.6
40+
- mv public/1.6/book $CIRCLE_ARTIFACTS/1.6
41+
- mv public/1.6/*.inc public/1.6/*.css public/1.6/*.js $CIRCLE_ARTIFACTS/1.6
42+
- tar cJf public-1.6.txz public/1.6
43+
- mv public-1.6.txz $CIRCLE_ARTIFACTS

public/1.9/index.html

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta name="generator" content="rustdoc">
7+
<title>Rust Documentation</title>
8+
9+
<link rel="stylesheet" type="text/css" href="rust.css">
10+
11+
<link rel="shortcut icon" href="https://www.rust-lang.org/favicon.ico">
12+
13+
14+
</head>
15+
<body class="rustdoc">
16+
<!--[if lte IE 8]>
17+
<div class="warning">
18+
This old browser is unsupported and will most likely display funky
19+
things.
20+
</div>
21+
<![endif]-->
22+
23+
<div id="versioninfo">
24+
<img src="https://www.rust-lang.org/logos/rust-logo-32x32-blk.png" width="32" height="32" alt><br>
25+
<span class="white-sticker"><a href="https://www.rust-lang.org">Rust</a> 1.9</span><br>
26+
<a href="https://github.com/rust-lang/rust/commit/"
27+
class="hash white-sticker"></a>
28+
</div>
29+
30+
31+
<h1 class="title">Rust Documentation</h1>
32+
<nav id="TOC"><ul>
33+
<li><a href="#getting-started">1 Getting Started</a><ul></ul></li>
34+
<li><a href="#language-reference">2 Language Reference</a><ul></ul></li>
35+
<li><a href="#standard-library-reference">3 Standard Library Reference</a><ul></ul></li>
36+
<li><a href="#the-rustonomicon">4 The Rustonomicon</a><ul></ul></li>
37+
<li><a href="#tools">5 Tools</a><ul></ul></li>
38+
<li><a href="#faqs">6 FAQs</a><ul></ul></li>
39+
<li><a href="#the-error-index">7 The Error Index</a><ul></ul></li>
40+
<li><a href="#community-translations">8 Community Translations</a><ul></ul></li></ul></nav><p>Welcome to the Rust documentation! You can use the section headings above
41+
to jump to any particular section.</p>
42+
43+
<h1 id='getting-started' class='section-header'><a href='#getting-started'>1 Getting Started</a></h1>
44+
<p>If you haven&#39;t seen Rust at all yet, the first thing you should read is the
45+
introduction to <a href="book/index.html">The Rust Programming Language</a>. It&#39;ll give
46+
you a good idea of what Rust is like.</p>
47+
48+
<p>The book provides a lengthy explanation of Rust, its syntax, and its
49+
concepts. Upon completing the book, you&#39;ll be an intermediate Rust
50+
developer, and will have a good grasp of the fundamental ideas behind
51+
Rust.</p>
52+
53+
<p><a href="http://rustbyexample.com/">Rust By Example</a> teaches you Rust through a series of small
54+
examples.</p>
55+
56+
<h1 id='language-reference' class='section-header'><a href='#language-reference'>2 Language Reference</a></h1>
57+
<p>Rust does not have an exact specification yet, but an effort to describe as much of
58+
the language in as much detail as possible is in <a href="reference.html">the reference</a>.</p>
59+
60+
<h1 id='standard-library-reference' class='section-header'><a href='#standard-library-reference'>3 Standard Library Reference</a></h1>
61+
<p>We have <a href="std/index.html">API documentation for the entire standard
62+
library</a>. There&#39;s a list of crates on the left with more
63+
specific sections, or you can use the search bar at the top to search for
64+
something if you know its name.</p>
65+
66+
<h1 id='the-rustonomicon' class='section-header'><a href='#the-rustonomicon'>4 The Rustonomicon</a></h1>
67+
<p><a href="nomicon/index.html">The Rustonomicon</a> is an entire book dedicated to explaining
68+
how to write <code>unsafe</code> Rust code. It is for advanced Rust programmers.</p>
69+
70+
<h1 id='tools' class='section-header'><a href='#tools'>5 Tools</a></h1>
71+
<p><a href="http://doc.crates.io/index.html">Cargo</a> is the Rust package manager providing access to libraries
72+
beyond the standard one, and its website contains lots of good documentation.</p>
73+
74+
<p><a href="book/documentation.html"><code>rustdoc</code></a> is the Rust&#39;s documentation generator, a tool converting
75+
annotated source code into HTML docs.</p>
76+
77+
<h1 id='faqs' class='section-header'><a href='#faqs'>6 FAQs</a></h1>
78+
<p>There are questions that are asked quite often, so we&#39;ve made FAQs for them:</p>
79+
80+
<ul>
81+
<li><a href="complement-design-faq.html">Language Design FAQ</a></li>
82+
<li><a href="complement-lang-faq.html">Language FAQ</a></li>
83+
<li><a href="complement-project-faq.html">Project FAQ</a></li>
84+
<li><a href="https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports">How to submit a bug report</a></li>
85+
</ul>
86+
87+
<h1 id='the-error-index' class='section-header'><a href='#the-error-index'>7 The Error Index</a></h1>
88+
<p>If you encounter an error while compiling your code you may be able to look it
89+
up in the <a href="error-index.html">Rust Compiler Error Index</a>.</p>
90+
91+
<h1 id='community-translations' class='section-header'><a href='#community-translations'>8 Community Translations</a></h1>
92+
<p>Several projects have been started to translate the documentation into other
93+
languages:</p>
94+
95+
<ul>
96+
<li><a href="https://github.com/kgv/rust_book_ru">Russian</a></li>
97+
<li><a href="https://github.com/rust-kr/doc.rust-kr.org">Korean</a></li>
98+
<li><a href="https://github.com/KaiserY/rust-book-chinese">Chinese</a></li>
99+
<li><a href="https://goyox86.github.io/elpr">Spanish</a></li>
100+
<li><a href="https://panicbit.github.io/rustbook-de">German</a></li>
101+
</ul>
102+
103+
<script type="text/javascript">
104+
window.playgroundUrl = "https://play.rust-lang.org/";
105+
</script>
106+
<footer><p>
107+
Copyright &copy; 2011-2015 The Rust Project Developers. Licensed under the
108+
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>
109+
or the <a href="http://opensource.org/licenses/MIT">MIT license</a>, at your option.
110+
</p><p>
111+
This file may not be copied, modified, or distributed except according to those terms.
112+
</p></footer>
113+
<script type="text/javascript" src="playpen.js"></script>
114+
115+
116+
</body>
117+
</html>

tools/circleci/setup-rust.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh
2+
3+
set -e
4+
set -u
5+
6+
RUST_HOME=$1
7+
RUST_NIGHTLY_RELEASE_DATE=$2
8+
VERSION="nightly-$RUST_NIGHTLY_RELEASE_DATE"
9+
10+
if [ -d $RUST_HOME ]; then
11+
echo "Using cached Rust version $VERSION at $RUST_HOME"
12+
else
13+
echo "Installing Rust version $VERSION to $RUST_HOME using rustup.sh"
14+
curl -sSf https://static.rust-lang.org/rustup.sh | \
15+
sh -s -- --prefix=$RUST_HOME --channel=nightly --date=$RUST_NIGHTLY_RELEASE_DATE --disable-sudo
16+
fi

0 commit comments

Comments
 (0)