Skip to content

CircleCI(プルリクエスト用) #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
+ 完成したらWIPを外して中の人にレビューをお願いする
* 基本的には1ファイル単位で翻訳/PRする(1ファイルが大きくて負担がきつい時は応相談)
* プルリクの指針、翻訳時の指針に従う
* プルリクを上げた直後に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) を参照して下さい。

# 既存の翻訳を修正する

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
LANG=ja
VERSION=1.6
VERSION ?= 1.9
VER_HASH=
SHORT_VER_HASH=
RUSTBOOK ?= rustbook
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
# 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)

[TRPL](https://doc.rust-lang.org/book/)を主としたRustドキュメントの翻訳プロジェクトです。
余力があれば他の文書の翻訳もするかもしれません。

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

# ビルド方法
## ビルド方法

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

```
make RUSTBOOK=/path/to/rustbook
```

`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)」を参照してください。

## CI 継続的インテグレーション

本リポジトリでは、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)」を参照してください。

## ライセンス

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

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

43 changes: 43 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
machine:
timezone:
Asia/Tokyo
environment:
RUST_NIGHTLY_RELEASE_DATE: "2016-06-01"
RUST_HOME: $HOME/rust/nightly-$RUST_NIGHTLY_RELEASE_DATE
RUSTBOOK_GIT_URL: https://github.com/tatsuya6502/rustbook.git
RUSTBOOK_GIT_BRANCH: rust-1.11.0-nightly
PATH: $RUST_HOME/bin:$PATH
LD_LIBRARY_PATH: $RUST_HOME/lib

dependencies:
post:
- sudo apt-get update
- sudo apt-get install curl file gcc git make openssh-client
- mkdir -p $HOME/rust
- ./tools/circleci/setup-rust.sh $RUST_HOME $RUST_NIGHTLY_RELEASE_DATE
- rustc --version --verbose
- cargo --version --verbose
- cargo install --root $RUST_HOME --git $RUSTBOOK_GIT_URL --branch $RUSTBOOK_GIT_BRANCH || true
- rustbook help
cache_directories:
- "~/rust"
- "~/.cargo"

test:
override:
- make VERSION=1.9
- make VERSION=1.6

post:
- mkdir $CIRCLE_ARTIFACTS/1.9
- mv public/1.9/index.html $CIRCLE_ARTIFACTS/1.9
- mv public/1.9/book $CIRCLE_ARTIFACTS/1.9
- mv public/1.9/*.inc public/1.9/*.css public/1.9/*.js $CIRCLE_ARTIFACTS/1.9
- tar cJf public-1.9.txz public/1.9
- mv public-1.9.txz $CIRCLE_ARTIFACTS
- mkdir $CIRCLE_ARTIFACTS/1.6
- mv public/1.6/index.html $CIRCLE_ARTIFACTS/1.6
- mv public/1.6/book $CIRCLE_ARTIFACTS/1.6
- mv public/1.6/*.inc public/1.6/*.css public/1.6/*.js $CIRCLE_ARTIFACTS/1.6
- tar cJf public-1.6.txz public/1.6
- mv public-1.6.txz $CIRCLE_ARTIFACTS
117 changes: 117 additions & 0 deletions public/1.9/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<title>Rust Documentation</title>

<link rel="stylesheet" type="text/css" href="rust.css">

<link rel="shortcut icon" href="https://www.rust-lang.org/favicon.ico">


</head>
<body class="rustdoc">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->

<div id="versioninfo">
<img src="https://www.rust-lang.org/logos/rust-logo-32x32-blk.png" width="32" height="32" alt><br>
<span class="white-sticker"><a href="https://www.rust-lang.org">Rust</a> 1.9</span><br>
<a href="https://github.com/rust-lang/rust/commit/"
class="hash white-sticker"></a>
</div>


<h1 class="title">Rust Documentation</h1>
<nav id="TOC"><ul>
<li><a href="#getting-started">1 Getting Started</a><ul></ul></li>
<li><a href="#language-reference">2 Language Reference</a><ul></ul></li>
<li><a href="#standard-library-reference">3 Standard Library Reference</a><ul></ul></li>
<li><a href="#the-rustonomicon">4 The Rustonomicon</a><ul></ul></li>
<li><a href="#tools">5 Tools</a><ul></ul></li>
<li><a href="#faqs">6 FAQs</a><ul></ul></li>
<li><a href="#the-error-index">7 The Error Index</a><ul></ul></li>
<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
to jump to any particular section.</p>

<h1 id='getting-started' class='section-header'><a href='#getting-started'>1 Getting Started</a></h1>
<p>If you haven&#39;t seen Rust at all yet, the first thing you should read is the
introduction to <a href="book/index.html">The Rust Programming Language</a>. It&#39;ll give
you a good idea of what Rust is like.</p>

<p>The book provides a lengthy explanation of Rust, its syntax, and its
concepts. Upon completing the book, you&#39;ll be an intermediate Rust
developer, and will have a good grasp of the fundamental ideas behind
Rust.</p>

<p><a href="http://rustbyexample.com/">Rust By Example</a> teaches you Rust through a series of small
examples.</p>

<h1 id='language-reference' class='section-header'><a href='#language-reference'>2 Language Reference</a></h1>
<p>Rust does not have an exact specification yet, but an effort to describe as much of
the language in as much detail as possible is in <a href="reference.html">the reference</a>.</p>

<h1 id='standard-library-reference' class='section-header'><a href='#standard-library-reference'>3 Standard Library Reference</a></h1>
<p>We have <a href="std/index.html">API documentation for the entire standard
library</a>. There&#39;s a list of crates on the left with more
specific sections, or you can use the search bar at the top to search for
something if you know its name.</p>

<h1 id='the-rustonomicon' class='section-header'><a href='#the-rustonomicon'>4 The Rustonomicon</a></h1>
<p><a href="nomicon/index.html">The Rustonomicon</a> is an entire book dedicated to explaining
how to write <code>unsafe</code> Rust code. It is for advanced Rust programmers.</p>

<h1 id='tools' class='section-header'><a href='#tools'>5 Tools</a></h1>
<p><a href="http://doc.crates.io/index.html">Cargo</a> is the Rust package manager providing access to libraries
beyond the standard one, and its website contains lots of good documentation.</p>

<p><a href="book/documentation.html"><code>rustdoc</code></a> is the Rust&#39;s documentation generator, a tool converting
annotated source code into HTML docs.</p>

<h1 id='faqs' class='section-header'><a href='#faqs'>6 FAQs</a></h1>
<p>There are questions that are asked quite often, so we&#39;ve made FAQs for them:</p>

<ul>
<li><a href="complement-design-faq.html">Language Design FAQ</a></li>
<li><a href="complement-lang-faq.html">Language FAQ</a></li>
<li><a href="complement-project-faq.html">Project FAQ</a></li>
<li><a href="https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports">How to submit a bug report</a></li>
</ul>

<h1 id='the-error-index' class='section-header'><a href='#the-error-index'>7 The Error Index</a></h1>
<p>If you encounter an error while compiling your code you may be able to look it
up in the <a href="error-index.html">Rust Compiler Error Index</a>.</p>

<h1 id='community-translations' class='section-header'><a href='#community-translations'>8 Community Translations</a></h1>
<p>Several projects have been started to translate the documentation into other
languages:</p>

<ul>
<li><a href="https://github.com/kgv/rust_book_ru">Russian</a></li>
<li><a href="https://github.com/rust-kr/doc.rust-kr.org">Korean</a></li>
<li><a href="https://github.com/KaiserY/rust-book-chinese">Chinese</a></li>
<li><a href="https://goyox86.github.io/elpr">Spanish</a></li>
<li><a href="https://panicbit.github.io/rustbook-de">German</a></li>
</ul>

<script type="text/javascript">
window.playgroundUrl = "https://play.rust-lang.org/";
</script>
<footer><p>
Copyright &copy; 2011-2015 The Rust Project Developers. Licensed under the
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>
or the <a href="http://opensource.org/licenses/MIT">MIT license</a>, at your option.
</p><p>
This file may not be copied, modified, or distributed except according to those terms.
</p></footer>
<script type="text/javascript" src="playpen.js"></script>


</body>
</html>
16 changes: 16 additions & 0 deletions tools/circleci/setup-rust.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

set -e
set -u

RUST_HOME=$1
RUST_NIGHTLY_RELEASE_DATE=$2
VERSION="nightly-$RUST_NIGHTLY_RELEASE_DATE"

if [ -d $RUST_HOME ]; then
echo "Using cached Rust version $VERSION at $RUST_HOME"
else
echo "Installing Rust version $VERSION to $RUST_HOME using rustup.sh"
curl -sSf https://static.rust-lang.org/rustup.sh | \
sh -s -- --prefix=$RUST_HOME --channel=nightly --date=$RUST_NIGHTLY_RELEASE_DATE --disable-sudo
fi