Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, April 9th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
61f13594
Commit
61f13594
authored
11 years ago
by
Ned Batchelder
Browse files
Options
Downloads
Patches
Plain Diff
Print a message if the requirements files haven't changed.
parent
cb9d2c88
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
rakefiles/helpers.rb
+3
-1
3 additions, 1 deletion
rakefiles/helpers.rb
rakefiles/prereqs.rake
+4
-3
4 additions, 3 deletions
rakefiles/prereqs.rake
with
7 additions
and
4 deletions
rakefiles/helpers.rb
+
3
−
1
View file @
61f13594
...
...
@@ -14,7 +14,7 @@ def report_dir_path(dir)
return
File
.
join
(
REPORT_DIR
,
dir
.
to_s
)
end
def
when_changed
(
*
files
)
def
when_changed
(
unchanged_message
,
*
files
)
Rake
::
Task
[
PREREQS_MD5_DIR
].
invoke
cache_file
=
File
.
join
(
PREREQS_MD5_DIR
,
files
.
join
(
'-'
).
gsub
(
/\W+/
,
'-'
))
+
'.md5'
digest
=
Digest
::
MD5
.
new
()
...
...
@@ -24,6 +24,8 @@ def when_changed(*files)
if
!
File
.
exists?
(
cache_file
)
or
digest
.
hexdigest
!=
File
.
read
(
cache_file
)
yield
File
.
write
(
cache_file
,
digest
.
hexdigest
)
elsif
!
unchanged_message
.
empty?
puts
unchanged_message
end
end
...
...
This diff is collapsed.
Click to expand it.
rakefiles/prereqs.rake
+
4
−
3
View file @
61f13594
...
...
@@ -12,21 +12,22 @@ task :install_prereqs => [:install_node_prereqs, :install_ruby_prereqs, :install
desc
"Install all node prerequisites for the lms and cms"
task
:install_node_prereqs
=>
"ws:migrate"
do
when_changed
(
'package.json'
)
do
when_changed
(
''
,
'package.json'
)
do
sh
(
'npm install'
)
end
unless
ENV
[
'NO_PREREQ_INSTALL'
]
end
desc
"Install all ruby prerequisites for the lms and cms"
task
:install_ruby_prereqs
=>
"ws:migrate"
do
when_changed
(
'Gemfile'
)
do
when_changed
(
''
,
'Gemfile'
)
do
sh
(
'bundle install'
)
end
unless
ENV
[
'NO_PREREQ_INSTALL'
]
end
desc
"Install all python prerequisites for the lms and cms"
task
:install_python_prereqs
=>
"ws:migrate"
do
when_changed
(
'requirements/**/*'
)
do
unchanged
=
'Requirements files unchanged, nothing to install'
when_changed
(
unchanged
,
'requirements/**/*'
)
do
ENV
[
'PIP_DOWNLOAD_CACHE'
]
||=
'.pip_download_cache'
sh
(
'pip install --exists-action w -r requirements/edx/base.txt'
)
sh
(
'pip install --exists-action w -r requirements/edx/post.txt'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment