BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
f913b566
Commit
f913b566
authored
Oct 14, 2011
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
install & update
parents
9a198054
d3784687
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
93 additions
and
49 deletions
+93
-49
Gemfile.lock
Gemfile.lock
+9
-0
index.html.haml
app/views/commits/index.html.haml
+3
-0
configure.rb
configure.rb
+0
-5
install.rb
install.rb
+32
-0
color.rb
lib/color.rb
+18
-44
update.rb
update.rb
+31
-0
No files found.
Gemfile.lock
View file @
f913b566
...
...
@@ -22,11 +22,20 @@ GIT
GIT
remote: git://github.com/mbleigh/seed-fu.git
<<<<<<< HEAD
revision: 77be06852b18fb01e272ab763ddb292da575586c
specs:
seed-fu (2.1.0)
activerecord (~> 3.1.0)
activesupport (~> 3.1.0)
=======
revision: 29fe8c61ca6cc4408115ea7475fe2647081bd348
branch: rails-3-1
specs:
seed-fu (2.0.1.rails31)
activerecord (~> 3.1.0.rc4)
activesupport (~> 3.1.0.rc4)
>>>>>>> d3784687943e0bd699d73d82a6bc6cac39689473
GEM
remote: http://rubygems.org/
...
...
app/views/commits/index.html.haml
View file @
f913b566
...
...
@@ -9,7 +9,10 @@
=
select_tag
"tag"
,
options_for_select
(
@project
.
tags
,
@branch
),
:onchange
=>
"this.form.submit();"
,
:class
=>
""
,
:prompt
=>
"Tags"
=
text_field_tag
"ssh"
,
@project
.
url_to_repo
,
:class
=>
[
"ssh_project_url"
,
"one_click_select"
]
.clear
<
<<<<<<
HEAD
-
if
params
[
:path
]
%h3
{
:style
=>
"color:#555"
}
/
#{
params
[
:path
]
}
==
=====
>
>>>>>> d3784687943e0bd699d73d82a6bc6cac39689473
%div
{
:id
=>
dom_id
(
@project
)}
=
render
"commits"
configure.rb
deleted
100644 → 0
View file @
9a198054
root_path
=
File
.
expand_path
(
File
.
dirname
(
__FILE__
))
require
File
.
join
(
root_path
,
"install"
,
"prepare"
)
env
=
ARGV
[
0
]
||
"development"
Install
.
prepare
(
env
)
install.rb
0 → 100644
View file @
f913b566
root_path
=
File
.
expand_path
(
File
.
dirname
(
__FILE__
))
require
File
.
join
(
root_path
,
"lib"
,
"color"
)
include
Color
#
# ruby ./update.rb development # or test or production (default)
#
envs
=
[
"production"
,
"test"
,
"development"
]
env
=
if
envs
.
include?
(
ARGV
[
0
])
ARGV
[
0
]
else
"production"
end
puts
green
" == Install for ENV=
#{
env
}
..."
# pull from github
`git pull origin 1x`
# bundle install
if
env
==
"production"
`bundle install --without development test`
else
`bundle install`
end
# migrate db
`bundle exec rake db:setup RAILS_ENV=
#{
env
}
`
`bundle exec rake db:seed_fu RAILS_ENV=
#{
env
}
`
puts
green
" == Done! Now you can start server"
install/prepare
.rb
→
lib/color
.rb
View file @
f913b566
module
Install
class
<<
self
def
prepare
(
env
)
puts
green
" == Starting for ENV=
#{
env
}
..."
puts
"rvm detected"
if
is_rvm?
bundler
db
(
env
)
puts
green
" == Done! Now you can start server"
end
def
bundler
command
'gem install bundler'
command
'bundle install'
end
def
db
(
env
)
command
"bundle exec rake db:setup RAILS_ENV=
#{
env
}
"
command
"bundle exec rake db:seed_fu RAILS_ENV=
#{
env
}
"
end
def
is_rvm?
`type rvm | head -1`
=~
/^rvm is/
end
def
colorize
(
text
,
color_code
)
"
\033
[
#{
color_code
}#{
text
}
\033
[0m"
end
module
Color
def
colorize
(
text
,
color_code
)
"
\033
[
#{
color_code
}#{
text
}
\033
[0m"
end
def
red
(
text
)
colorize
(
text
,
"31m"
)
end
def
red
(
text
)
colorize
(
text
,
"31m"
)
end
def
green
(
text
)
colorize
(
text
,
"32m"
)
end
def
green
(
text
)
colorize
(
text
,
"32m"
)
end
def
command
(
string
)
`
#{
string
}
`
if
$?
.
to_i
>
0
puts
red
" ==
#{
string
}
- FAIL"
puts
red
" == Error during configure"
exit
else
puts
green
" ==
#{
string
}
- OK"
end
def
command
(
string
)
`
#{
string
}
`
if
$?
.
to_i
>
0
puts
red
" ==
#{
string
}
- FAIL"
puts
red
" == Error during configure"
exit
else
puts
green
" ==
#{
string
}
- OK"
end
end
end
...
...
update.rb
0 → 100644
View file @
f913b566
root_path
=
File
.
expand_path
(
File
.
dirname
(
__FILE__
))
require
File
.
join
(
root_path
,
"lib"
,
"color"
)
include
Color
#
# ruby ./update.rb development # or test or production (default)
#
envs
=
[
"production"
,
"test"
,
"development"
]
env
=
if
envs
.
include?
(
ARGV
[
0
])
ARGV
[
0
]
else
"production"
end
puts
green
" == Update for ENV=
#{
env
}
from 1x"
# pull from github
`git pull origin 1x`
# bundle install
if
env
==
"production"
`bundle install --without development test`
else
`bundle install`
end
# migrate db
`bundle exec rake db:migrate RAILS_ENV=
#{
env
}
`
puts
green
" == Done! Now you can start/restart server"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment