Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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-nodejs
Commits
29fa148f
Commit
29fa148f
authored
Jan 09, 2012
by
David Dollar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use mime type for manifest
parent
6a5eec7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
s3
support/aws/s3
+3
-1
manifest
support/manifest
+1
-1
No files found.
support/aws/s3
View file @
29fa148f
...
@@ -117,11 +117,13 @@ s3_curl() {
...
@@ -117,11 +117,13 @@ s3_curl() {
# $2 = remote bucket.
# $2 = remote bucket.
# $3 = remote name
# $3 = remote name
# $4 = local name.
# $4 = local name.
# $5 = mime type
local
bucket remote
date
sig md5 arg inout headers
local
bucket remote
date
sig md5 arg inout headers
# header handling is kinda fugly, but it works.
# header handling is kinda fugly, but it works.
bucket
=
"
${
2
:+/
${
2
}}
/"
# slashify the bucket
bucket
=
"
${
2
:+/
${
2
}}
/"
# slashify the bucket
remote
=
"
$(
urlenc
"
${
3
}
"
)
"
# if you don't, strange things may happen.
remote
=
"
$(
urlenc
"
${
3
}
"
)
"
# if you don't, strange things may happen.
stdopts
=
"--connect-timeout 10 --fail --silent"
stdopts
=
"--connect-timeout 10 --fail --silent"
mime
=
"
${
5
}
"
[[
$CURL_S3_DEBUG
==
true
]]
&&
stdopts
=
"
${
stdopts
}
--show-error --fail"
[[
$CURL_S3_DEBUG
==
true
]]
&&
stdopts
=
"
${
stdopts
}
--show-error --fail"
case
"
${
1
}
"
in
case
"
${
1
}
"
in
GET
)
arg
=
"-o"
inout
=
"
${
4
:-
-
}
"
# stdout if no $4
GET
)
arg
=
"-o"
inout
=
"
${
4
:-
-
}
"
# stdout if no $4
...
@@ -146,7 +148,7 @@ s3_curl() {
...
@@ -146,7 +148,7 @@ s3_curl() {
*
)
die
"Unknown verb
${
1
}
. It probably would not have worked anyways."
;;
*
)
die
"Unknown verb
${
1
}
. It probably would not have worked anyways."
;;
esac
esac
date
=
"
$(
TZ
=
UTC
date
'+%a, %e %b %Y %H:%M:%S %z'
)
"
date
=
"
$(
TZ
=
UTC
date
'+%a, %e %b %Y %H:%M:%S %z'
)
"
sig
=
$(
s3_signature_string
${
1
}
"
${
date
}
"
"
${
bucket
}
"
"
${
remote
}
"
"
${
md5
}
"
""
"x-amz-acl:public-read"
)
sig
=
$(
s3_signature_string
${
1
}
"
${
date
}
"
"
${
bucket
}
"
"
${
remote
}
"
"
${
md5
}
"
"
${
mime
}
"
"x-amz-acl:public-read"
)
headers[
${#
headers
[@]
}
]=
"Authorization: AWS
${
AWS_ID
}
:
${
sig
}
"
headers[
${#
headers
[@]
}
]=
"Authorization: AWS
${
AWS_ID
}
:
${
sig
}
"
headers[
${#
headers
[@]
}
]=
"Date:
${
date
}
"
headers[
${#
headers
[@]
}
]=
"Date:
${
date
}
"
...
...
support/manifest
View file @
29fa148f
...
@@ -41,4 +41,4 @@ $basedir/aws/s3 ls $S3_BUCKET \
...
@@ -41,4 +41,4 @@ $basedir/aws/s3 ls $S3_BUCKET \
# upload manifest to s3
# upload manifest to s3
$basedir
/aws/s3 put
$S3_BUCKET
\
$basedir
/aws/s3 put
$S3_BUCKET
\
manifest.
${
manifest_type
}
manifest.
${
manifest_type
}
""
"text/plain"
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