Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-python
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-python
Commits
716aa8b4
Commit
716aa8b4
authored
May 18, 2011
by
Noah Zoschke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
detect script improvements; Django => Python/Django; stderr on no detect
parent
9a69793d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
detect
bin/detect
+10
-4
requirements.txt
test/canary_python/requirements.txt
+0
-0
No files found.
bin/detect
View file @
716aa8b4
#!/usr/bin/env bash
#!/usr/bin/env bash
# bin/
name
<build-dir>
# bin/
detect
<build-dir>
BUILD_DIR
=
$1
BUILD_DIR
=
$1
[
-f
$BUILD_DIR
/requirements.txt
]
||
exit
1
# fail fast if no requirements.txt
# 'Django' if there is a [mysite]/settings.py file present; otherwise 'Python'
function
abort
()
{
ls
$BUILD_DIR
/
**
/settings.py &> /dev/null
&&
echo
Django
||
echo
Python
echo
$1
1>&2
\ No newline at end of file
exit
1
}
[
-f
$BUILD_DIR
/requirements.txt
]
||
abort
"fatal: Not a Python app (no requirements.txt)"
# 'Python/Django' if there is a [mysite]/settings.py file present; otherwise 'Python'
ls
$BUILD_DIR
/
**
/settings.py &> /dev/null
&&
echo
Python/Django
||
echo
Python
test/canary_python/requirements.txt
0 → 100644
View file @
716aa8b4
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