StartUp » 履歴 » バージョン 2

バージョン 1 (aoki yuji, 2015/12/30 13:09) → バージョン 2/4 (aoki yuji, 2015/12/30 13:21)

h1. StartUp

h2. GitBucket上での操作

gitBucketにアクセスし、ログインする(アカウント作成は宮崎さんに依頼する。Redmineと同じアカウントとパスが使えます)

<pre>https://git.fukurous.org/gitbucket/</pre>

好きなプロジェクトのURLを開きます。
ここではひとまずウィスキー検定用のプロジェクトを例にして説明を続けます。

<pre>https://git.fukurous.org/gitbucket/g0947424/WhiskyExamination</pre>

「HTTP clone URL」からクローン用URLをコピーします。

<pre>https://git.fukurous.org/gitbucket/git/g0947424/WhiskyExamination.git</pre>

h2. ローカルでの準備

ローカル端末のホームディレクトリ上で.gitconfigファイルを作成し、以下の内容を記載します。

<pre>$ touch .gitconfig</pre>
<pre>
[http]
sslverify = false
</pre>

時端末に開発用ディレクトリを切る
オススメは~/fukurouとか

<pre>$ mkdir ~/fukurou</pre>

開発用ディレクトリに移動して、下記コマンドで資材をクローンする

<pre>
$ cd ~/fukurou
$ git clone 'https://git.fukurous.org/gitbucket/git/g0947424/WhiskyExamination.git'
$ git clone 'https://git.fukurous.org/gitbucket/git/g0947424/WhiskyExamination.git'
Cloning into 'WhiskyExamination'...
remote: Counting objects: 103, done
remote: Finding sources: 100% (103/103)
remote: Getting sizes: 100% (18/18)
remote: Total 103 (delta 57), reused 103 (delta 57)
Receiving objects: 100% (103/103), 53.11 KiB, done.
Resolving deltas: 100% (57/57), done.
</pre>

====================================================
ここまでが共通的なクローン作成手順です。WEProjectはサーバにソースをデプロイする用のシェルが入っているので、その設定をします。

h2. deploy.shの編集

<pre>$ open ~/fukurou/WhiskyExamination/deploy.sh</pre>

14行目以降のユーザ設定に自分のユーザネームを入力する(★のところ)

<pre>
#---------------
# User settings
#---------------
USER_NAME="★"
</pre>

h2. deploy.shの動作確認

クローン直後はタイムスタンプが変わるので全資材がデプロイされます。

<pre>
~/fukurou/WhiskyExamination $ ./deploy.sh
building file list ... done
Question.php
QuestionDB.php
Questioner.php
Questioner_stub.php
index.php
common/.DS_Store
common/common.css
common/common.js
common/jquery-2.1.4.min.js
screens/addQuestion.php
screens/entrance.php
screens/questionMaintenance.php
screens/questionsList.php
screens/singleQuestion.php

sent 3426 bytes received 1612 bytes 347.45 bytes/sec
total size is 143599 speedup is 28.50
~/fukurou/WhiskyExamination $
</pre>

h2. ウェブページを開いて動作確認する

以下のURLにアクセスして動作確認します。
動作正常であればgitにコミットします。

<pre>http://www.fukurous.org/projects/hackathon20150504/WhiskyExamination/</pre>

h2. gitにコミットする