Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be able to override the "pub build" command #26

Merged
merged 77 commits into from Jan 8, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
66e02a4
Merge pull request #1 from tomykaira/master
igrigorik May 24, 2012
9d92287
use mirrored 64 bit image + update readme
igrigorik May 24, 2012
fd6e059
simple hello world web app example
igrigorik May 24, 2012
c575865
use latest dart build
igrigorik May 31, 2012
06fe0c2
disable cache logic
igrigorik May 31, 2012
956588b
update readme with latest build date
igrigorik May 31, 2012
0c578cc
fix example to use https buildpack URL, fixes #2
igrigorik Jul 18, 2012
7fd7eda
updating to the 64 bit SDK build
devoncarew Jul 27, 2012
2e465c7
Merge pull request #3 from devoncarew/master
igrigorik Jul 27, 2012
f4f7d59
Dart now ships 64 bit Linux SDKs.
sethladd Aug 15, 2012
83ca510
Merge pull request #4 from sethladd/master
sethladd Aug 15, 2012
a09e5e5
Point to dart in dart-sdk
sethladd Aug 15, 2012
68b81d5
Merge pull request #5 from sethladd/master
sethladd Aug 15, 2012
de330a1
parseInt is now parse on int
Sep 20, 2012
c74ae71
update to dart m1 syntax
Oct 26, 2012
9bf307e
adding pub support to heroku buildpack
Nov 19, 2012
7cdbbe2
Merge pull request #6 from kohlikohl/master
igrigorik Nov 26, 2012
c885f53
add pubspec to sample and move main into bin
sethladd Nov 29, 2012
7eb6ca1
make the pub cache dir if it doesn't exist
sethladd Nov 29, 2012
9baa918
Install all pubspec.yaml dependencies
eee-c Dec 1, 2012
14f0de0
Merge pull request #9 from eee-c/all-pubspecs
igrigorik Dec 2, 2012
324ecfc
adding ARCHIVE env
adam-singer Jan 16, 2013
8439e8a
adding making pub verbose
adam-singer Jan 16, 2013
28588a0
removed --verbose
adam-singer Jan 16, 2013
8418dfe
Updated read me
adam-singer Jan 16, 2013
6f09cd7
Update test-app/bin/main.dart
ggirou Feb 3, 2013
1872546
Merge pull request #12 from ggirou/patch-1
sethladd Feb 4, 2013
6e3bbc1
Update server code with dart:io V2
nfrancois Mar 4, 2013
4837df1
Fix ident
nfrancois Mar 5, 2013
74a7c02
Merge pull request #14 from nfrancois/updateDartIO
sethladd Mar 5, 2013
70f5eaf
Run build.dart
Mar 28, 2013
7533284
Run build.dart
Mar 28, 2013
0372341
Run build.dart
Mar 28, 2013
d024e53
Updated documentation and console output
Mar 28, 2013
f3df23f
Merge pull request #15 from kothar/master
sethladd Mar 29, 2013
5e3a302
Merge pull request #10 from financeCoding/master
sethladd Jun 4, 2013
7d3e65c
Fix response.addString
nfrancois Sep 16, 2013
eeefc65
Allow for custom builds to be downloadable
selkhateeb Sep 17, 2013
8ff8d51
Merge pull request #19 from nfrancois/fixAddString
sethladd Oct 26, 2013
c41694b
Merge pull request #20 from selkhateeb/master
sethladd Oct 26, 2013
533f12f
update sample server
sethladd Oct 26, 2013
28a4798
add a SDK built by ubuntu 10.04
Oct 26, 2013
df43651
don't put the SDK in just yet
sethladd Oct 26, 2013
bc7e667
be more specific when downloading the SDK
sethladd Oct 26, 2013
d1da113
print if dart command was found
sethladd Oct 26, 2013
c073aa3
print out version from dart command
sethladd Oct 26, 2013
24e5821
unmute curl
sethladd Oct 26, 2013
c6bbf9a
unmute tar
sethladd Oct 26, 2013
a510086
what's in app?
sethladd Oct 26, 2013
54ea8e3
print before moving on
sethladd Oct 26, 2013
6f9f343
print before moving on
sethladd Oct 27, 2013
72744f2
print before moving on
sethladd Oct 27, 2013
67e4929
print before moving on
sethladd Oct 27, 2013
199ba62
display the machine type
sethladd Oct 27, 2013
a4ee8b4
reformat README
sethladd Oct 27, 2013
ed74f64
print dart version
sethladd Oct 27, 2013
6e280e2
run build.dart with --deploy
sethladd Oct 29, 2013
6aba7cb
use non-deprecated pub get
sethladd Oct 29, 2013
d340963
remove unnecessary packages
sethladd Dec 16, 2013
f7d624a
more debugging
sethladd Dec 16, 2013
f3d0660
get rid of packages_dir and put pub_cache into /app
sethladd Dec 17, 2013
97e7e29
debug
sethladd Dec 17, 2013
25e0eb5
more debug
sethladd Dec 17, 2013
4b9af9a
add comments to explain the insanity
sethladd Dec 17, 2013
8c60b78
Clean up the README
sethladd Dec 17, 2013
34a1f69
add a web app that requires pub build
sethladd Dec 22, 2013
607349e
fix links
sethladd Dec 22, 2013
101351f
more instructions in README and better path resolution for server
sethladd Dec 22, 2013
1c8fe38
Merge pull request #23 from sethladd/master
sethladd Dec 22, 2013
75fec71
Be able to override the default pub build command
Jan 3, 2014
26534df
Display properly the $DART_BUILD_CMD command
Jan 3, 2014
681b832
Add documentation DART_BUILD_CMD
Jan 3, 2014
c32f1f9
Change messages on Running pub build section
Jan 3, 2014
06eac37
break this line to 80 chars and typo
Jan 3, 2014
e191cc3
Remove useless message
Jan 6, 2014
e318a80
merge pub build override option
Jan 7, 2014
0a6b664
real merge of pub build override option
Jan 7, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Expand Up @@ -134,6 +134,16 @@ The sample app's `Procfile` looks like:
web: ./dart-sdk/bin/dart bin/basic_http_server.dart
```

### Overriding the build command

By default `pub build` is launched after the `pub get`, it can be useful to use
another command: for instance `pub build --mode=debug` or
`/app/dart-sdk/bin/dart build.dart`:

```bash
$> heroku config:set DART_BUILD_CMD="/app/dart-sdk/bin/dart build.dart"
```

Learn more about

## Example
Expand Down Expand Up @@ -162,4 +172,4 @@ The MIT License - Copyright (c) 2012 Ilya Grigorik
[deploy]: https://devcenter.heroku.com/articles/git
[envcompile]: https://devcenter.heroku.com/articles/labs-user-env-compile
[buildforubuntu]: https://code.google.com/p/dart/wiki/BuildDartSDKOnUbuntu10_04
[communitybuilds]: https://github.com/selkhateeb/heroku-vagrant-dart-build/releases
[communitybuilds]: https://github.com/selkhateeb/heroku-vagrant-dart-build/releases
11 changes: 9 additions & 2 deletions bin/compile
Expand Up @@ -64,12 +64,19 @@ for filename in `find . -name pubspec.yaml | grep -v dart-sdk | grep -v pub-cach

message "*** Running pub build"

/app/dart-sdk/bin/pub build
if [[ -z "$DART_BUILD_CMD" ]]
then
message 'Building with "pub build"'
/app/dart-sdk/bin/pub build
else
message "Building with \"$DART_BUILD_CMD\""
eval $DART_BUILD_CMD
fi

done

# I think heroku deletes all the contents of /app and replaces it with
# whatever is in $BUILD_DIR, so copy over the pub-cache. Why not put it in
# $BUILD_DIR in the first place? because we need symlinks setup correctly.
cp -R $PUB_CACHE $BUILD_DIR/pub-cache
message `ls -l $BUILD_DIR/pub-cache`