ラベル インストール の投稿を表示しています。 すべての投稿を表示
ラベル インストール の投稿を表示しています。 すべての投稿を表示

git-flow をインストール

2011年1月16日日曜日 | Published in | 0 コメント

このエントリーをはてなブックマークに追加

[前回] Cocoaの日々: MacPorts と git インストール

git-flow をインストールした。

A successful Git branching model


"A successful Git branching model" とは Vincent Driessenが紹介している git を効果的に利用したソースコード管理モデルのこと。下記のサイトで公開されている。
上記は英語だが、@oshow さんが翻訳したものを公開している。
見えないチカラ: A successful Git branching model を翻訳しました

特徴的なのはブランチの使い方で、master, develop の2つのブランチを中心に、新機能開発用の feature、バグ修正用の hotfixes など用途に合わせたブランチの種類を定義している。これらのブランチの定義ならびに運用方法を定義したのがこのモデル。


git-flow


git-flow は "A successful Git branching model" を実践するのに便利なツール集。GitHubでソースが公開されている。
nvie/gitflow - GitHub

活用例がいろいろなサイトで紹介されているが下記が分かりやすくて参考になる。
A successful Git branching model を補助する git-flow を使ってみた - Twisted Mind

インストール方法は何種類かあるが今回は MacPorts を使った。
$ sudo port install git-flow
Password:
--->  Computing dependencies for git-flow
--->  Dependencies to be installed: getopt
--->  Fetching getopt
--->  Attempting to fetch getopt-1.1.4.tar.gz from http://distfiles.macports.org/getopt
--->  Verifying checksum(s) for getopt
--->  Extracting getopt
--->  Applying patches to getopt
--->  Configuring getopt
--->  Building getopt
--->  Staging getopt into destroot
--->  Installing getopt @1.1.4_1
--->  Activating getopt @1.1.4_1
--->  Cleaning getopt
--->  Fetching git-flow
--->  Verifying checksum(s) for git-flow
--->  Extracting git-flow
--->  Configuring git-flow
--->  Building git-flow
--->  Staging git-flow into destroot
--->  Installing git-flow @0.4_0
--->  Activating git-flow @0.4_0
--->  Cleaning git-flow
$
前回のハマりがウソのように今回は一発ですんなり入った。/opt/local/bin 配下に git-flow* ファイルがインストールされる。
$ cd /opt/local/bin
[bin]$ ls git-flow*
git-flow  
git-flow-init  
git-flow-version
git-flow-feature 
git-flow-release
git-flow-hotfix  
git-flow-support

- - - -
新規にとりかかっている iPadアプリ開発でこれを試してみる。

MacPorts と git インストール

2011年1月15日土曜日 | Published in | 0 コメント

このエントリーをはてなブックマークに追加

nvie/gitflow - GitHub を試そうと思ったところ MacPorts版があるようなので、良い機会なので MacPorts を MacBook Proへインストールすることにした。

MacPorts


公式ページから Snow Leopard 用のパッケージ(1.9.2) をダウンロードしてインストールした。
The MacPorts Project -- Home


git のインストール


以前、ソースコードからインストールしたが((旧) Cocoaの日々: github を使う)これを削除して MacPorts経由でインストールする。

[参考にしたページ] clmemo@aka: MacPorts で Snow Leopard に git をインストールした

$ sudo port install git-core
Password:<パスワード入力>
Warning: xcodebuild exists but failed to execute
Warning: Xcode does not appear to be installed; most ports will likely fail to build.
--->  Computing dependencies for git-core
--->  Dependencies to be installed: curl curl-ca-bundle perl5 perl5.8 libidn gettext expat libiconv gperf ncurses ncursesw openssl zlib pkgconfig p5-error python27 bzip2 db46 gdbm readline sqlite3 rsync popt
--->  Fetching perl5.8
   :
(以下、依存パッケージのインストールが続く)

環境によっては ncources 辺りでハマるらしいが素の MacBook Pro では特に問題は起きなかった。
MacPorts でgit をインストールするのが大変なわけ | ブログが続かないわけ

代わりに Xcode に関してエラー。インストール場所が標準と異なる為のようだ。
--->  Extracting zlib
Error: Couldn't find Xcode; expected it to be at /Developer/Developer Tools/
  Xcode and iOS SDK 3.2.5/Applications/Xcode.app.
Error: 
Error: If you have not installed Xcode, install it now; see:
Error: http://guide.macports.org/chunked/installing.xcode.html
Error: 
Error: If you have installed Xcode in a nonstandard location, inform MacPorts
Error: of that location by changing the 'developer_dir' variable in
Error: /opt/local/etc/macports/macports.conf
自分の環境では SDKを /Developer Tools/Xcode and iOS SDK 3.2.5 に入れてある。MacPorts は xcode-select というコマンドの結果を使っているらしい。これを見ると存在しないフォルダになっていた(近いのだが)。
$ xcode-select -print-path
/Developer/Developer Tools/Xcode and iOS SDK 3.2.5
これを次のように切り替える。
$ sudo xcode-select -switch /Developer\ Tools/Xcode\ and\ iOS\ SDK\ 3.2.5
[/]$ xcode-select -print-path
/Developer Tools/Xcode and iOS SDK 3.2.5
後々 Xcodeのバージョンが上がればまた同じ問題は出るのだが、とりあえず今回はこのまま進む。git-core のインストールを再開する。
sudo port install git-core
--->  Computing dependencies for git-core
--->  Dependencies to be installed: curl openssl zlib pkgconfig p5-error python27
 bzip2 db46 gdbm readline sqlite3 rsync popt
--->  Extracting zlib
  :
順調に進んだかと思ったが今度は db46 というとろろでエラー。
--->  Attempting to fetch bzip2-1.0.6.tar.gz from http://distfiles.macports.org/bzip2
--->  Fetching db46
--->  Attempting to fetch patch.4.6.21.1 from http://download.oracle.com/berkeley-db/patches/db/4.6.21/
--->  Attempting to fetch patch.4.6.21.2 from http://download.oracle.com/berkeley-db/patches/db/4.6.21/
--->  Attempting to fetch patch.4.6.21.3 from http://download.oracle.com/berkeley-db/patches/db/4.6.21/
--->  Attempting to fetch patch.4.6.21.4 from http://download.oracle.com/berkeley-db/patches/db/4.6.21/
--->  Attempting to fetch db-4.6.21.tar.gz from http://download-east.oracle.com/berkeley-db/
--->  Verifying checksum(s) for db46
--->  Extracting db46
--->  Applying patches to db46
--->  Configuring db46
Error: db46 requires the Java for Mac OS X development headers.
Error: Download the Java Developer Package from: 
Error: Target org.macports.configure returned: missing Java headers
Error: Failed to install db46
 :
Java用ヘッダファイルのインストールが必要とある(なんじゃそりゃ!)。ネットで情報を探すと同じ現象にあった人の記事が見つかった。

試験管のなかのコード :: MacPorts の "db46 requires the Java..." エラー

Java for Mac OS X 10.6 を入れないと駄目らしい。ADC Member サイト内の Downloads & ADC Program Assets - Java から下記の Java for Mac OS X 10.6 (10M330) をダウンロードしてインストールする。

インストール後、git-core のインストールを再開。
$ sudo port install git-corePassword:
--->  Computing dependencies for git-core
--->  Dependencies to be installed: python27 db46 gdbm readline sqlite3 rsync popt
--->  Configuring db46
--->  Building db46
  :
 :
--->  Fetching git-core
--->  Attempting to fetch git-1.7.3.5.tar.bz2 from http://distfiles.macports.org/git-core
--->  Attempting to fetch git-manpages-1.7.3.5.tar.bz2 from http://distfiles.macports.org/git-core
--->  Attempting to fetch git-htmldocs-1.7.3.5.tar.bz2 from http://distfiles.macports.org/git-core
--->  Verifying checksum(s) for git-core
--->  Extracting git-core
--->  Applying patches to git-core
--->  Configuring git-core
--->  Building git-core
--->  Staging git-core into destroot
--->  Installing git-core @1.7.3.5_0+doc+python27
--->  Activating git-core @1.7.3.5_0+doc+python27
--->  Cleaning git-core
$
終わった。途中の対応を除いても実に 40分近くはかかった。

インストールされた git は /opt/local/bin に配置されている。
$ which git
/opt/local/bin/git
git のバージョンは 1.7.3.5。前回ソースでいれた時よりも結構バージョンが上がっている。
$ git --version
git version 1.7.3.5

- - - -
普段から MacPorts を使っていれば今回みたいに依存パッケージを一気にダウンロードするということは無いと思うので、すんなり行くのかもしれない。何はともあれ良かった。

人気の投稿(過去 30日間)