Put binaries into yesod-bin (fixes #514)
This commit is contained in:
parent
6efd35ceca
commit
7cde3d4bdb
@ -7,4 +7,5 @@
|
|||||||
./yesod-auth
|
./yesod-auth
|
||||||
./yesod-sitemap
|
./yesod-sitemap
|
||||||
./yesod-test
|
./yesod-test
|
||||||
|
./yesod-bin
|
||||||
./yesod
|
./yesod
|
||||||
|
|||||||
20
yesod-bin/LICENSE
Normal file
20
yesod-bin/LICENSE
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
7
yesod-bin/Setup.lhs
Executable file
7
yesod-bin/Setup.lhs
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env runhaskell
|
||||||
|
|
||||||
|
> module Main where
|
||||||
|
> import Distribution.Simple
|
||||||
|
|
||||||
|
> main :: IO ()
|
||||||
|
> main = defaultMain
|
||||||
@ -8,13 +8,11 @@ import Options.Applicative
|
|||||||
import System.Exit (ExitCode (ExitSuccess), exitWith)
|
import System.Exit (ExitCode (ExitSuccess), exitWith)
|
||||||
import System.Process (rawSystem)
|
import System.Process (rawSystem)
|
||||||
|
|
||||||
import Yesod.Core (yesodVersion)
|
|
||||||
|
|
||||||
import AddHandler (addHandler)
|
import AddHandler (addHandler)
|
||||||
import Devel (DevelOpts (..), devel)
|
import Devel (DevelOpts (..), devel)
|
||||||
import Keter (keter)
|
import Keter (keter)
|
||||||
import Options (injectDefaults)
|
import Options (injectDefaults)
|
||||||
import qualified Paths_yesod
|
import qualified Paths_yesod_bin
|
||||||
import Scaffolding.Scaffolder
|
import Scaffolding.Scaffolder
|
||||||
|
|
||||||
import Options.Applicative.Builder.Internal (Mod, OptionFields)
|
import Options.Applicative.Builder.Internal (Mod, OptionFields)
|
||||||
@ -96,8 +94,7 @@ main = do
|
|||||||
Touch -> touch'
|
Touch -> touch'
|
||||||
Devel da s f r b _ig es p t -> devel (DevelOpts (optCabalPgm o == CabalDev) da (optVerbose o) r s f b p t) es
|
Devel da s f r b _ig es p t -> devel (DevelOpts (optCabalPgm o == CabalDev) da (optVerbose o) r s f b p t) es
|
||||||
Keter noRebuild -> keter (cabalCommand o) noRebuild
|
Keter noRebuild -> keter (cabalCommand o) noRebuild
|
||||||
Version -> do putStrLn ("yesod-core version:" ++ yesodVersion)
|
Version -> do putStrLn ("yesod-bin version: " ++ showVersion Paths_yesod_bin.version)
|
||||||
putStrLn ("yesod version:" ++ showVersion Paths_yesod.version)
|
|
||||||
AddHandler -> addHandler
|
AddHandler -> addHandler
|
||||||
Test -> do touch'
|
Test -> do touch'
|
||||||
cabal ["configure", "--enable-tests", "-flibrary-only"]
|
cabal ["configure", "--enable-tests", "-flibrary-only"]
|
||||||
103
yesod-bin/yesod-bin.cabal
Normal file
103
yesod-bin/yesod-bin.cabal
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
name: yesod-bin
|
||||||
|
version: 1.2.0
|
||||||
|
license: MIT
|
||||||
|
license-file: LICENSE
|
||||||
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
maintainer: Michael Snoyman <michael@snoyman.com>
|
||||||
|
synopsis: The yesod helper executable.
|
||||||
|
description: Provides scaffolding, devel server, and some simple code generation helpers.
|
||||||
|
category: Web, Yesod
|
||||||
|
stability: Stable
|
||||||
|
cabal-version: >= 1.6
|
||||||
|
build-type: Simple
|
||||||
|
homepage: http://www.yesodweb.com/
|
||||||
|
|
||||||
|
extra-source-files:
|
||||||
|
input/*.cg
|
||||||
|
hsfiles/mongo.hsfiles
|
||||||
|
hsfiles/mysql.hsfiles
|
||||||
|
hsfiles/postgres.hsfiles
|
||||||
|
hsfiles/postgres-fay.hsfiles
|
||||||
|
hsfiles/simple.hsfiles
|
||||||
|
hsfiles/sqlite.hsfiles
|
||||||
|
|
||||||
|
executable yesod-ghc-wrapper
|
||||||
|
main-is: ghcwrapper.hs
|
||||||
|
build-depends:
|
||||||
|
base >= 4 && < 5
|
||||||
|
, Cabal
|
||||||
|
|
||||||
|
executable yesod-ld-wrapper
|
||||||
|
main-is: ghcwrapper.hs
|
||||||
|
cpp-options: -DLDCMD
|
||||||
|
build-depends:
|
||||||
|
base >= 4 && < 5
|
||||||
|
, Cabal
|
||||||
|
executable yesod-ar-wrapper
|
||||||
|
main-is: ghcwrapper.hs
|
||||||
|
cpp-options: -DARCMD
|
||||||
|
build-depends:
|
||||||
|
base >= 4 && < 5
|
||||||
|
, Cabal
|
||||||
|
|
||||||
|
executable yesod
|
||||||
|
if os(windows)
|
||||||
|
cpp-options: -DWINDOWS
|
||||||
|
build-depends: base >= 4.3 && < 5
|
||||||
|
, ghc >= 7.0.3 && < 7.8
|
||||||
|
, ghc-paths >= 0.1
|
||||||
|
, parsec >= 2.1 && < 4
|
||||||
|
, text >= 0.11
|
||||||
|
, shakespeare-text >= 1.0 && < 1.1
|
||||||
|
, shakespeare >= 1.0.2 && < 1.1
|
||||||
|
, shakespeare-js >= 1.0.2 && < 1.2
|
||||||
|
, shakespeare-css >= 1.0.2 && < 1.1
|
||||||
|
, bytestring >= 0.9.1.4
|
||||||
|
, time >= 1.1.4
|
||||||
|
, template-haskell
|
||||||
|
, directory >= 1.0
|
||||||
|
, Cabal
|
||||||
|
, unix-compat >= 0.2 && < 0.5
|
||||||
|
, containers >= 0.2
|
||||||
|
, attoparsec >= 0.10
|
||||||
|
, http-types >= 0.7
|
||||||
|
, blaze-builder >= 0.2.1.4 && < 0.4
|
||||||
|
, filepath >= 1.1
|
||||||
|
, process
|
||||||
|
, zlib >= 0.5 && < 0.6
|
||||||
|
, tar >= 0.4 && < 0.5
|
||||||
|
, system-filepath >= 0.4 && < 0.5
|
||||||
|
, system-fileio >= 0.3 && < 0.4
|
||||||
|
, unordered-containers
|
||||||
|
, yaml >= 0.8 && < 0.9
|
||||||
|
, optparse-applicative >= 0.5
|
||||||
|
, fsnotify >= 0.0 && < 0.1
|
||||||
|
, split >= 0.2 && < 0.3
|
||||||
|
, file-embed
|
||||||
|
, conduit >= 0.5 && < 1.1
|
||||||
|
, resourcet >= 0.3 && < 0.5
|
||||||
|
, base64-bytestring
|
||||||
|
, lifted-base
|
||||||
|
, http-reverse-proxy >= 0.1.1
|
||||||
|
, network
|
||||||
|
, http-conduit
|
||||||
|
, network-conduit
|
||||||
|
, project-template >= 0.1.1
|
||||||
|
, transformers
|
||||||
|
, warp >= 1.3.7.5
|
||||||
|
, wai >= 1.4
|
||||||
|
|
||||||
|
ghc-options: -Wall -threaded
|
||||||
|
main-is: main.hs
|
||||||
|
other-modules: Scaffolding.Scaffolder
|
||||||
|
Devel
|
||||||
|
Build
|
||||||
|
GhcBuild
|
||||||
|
Keter
|
||||||
|
AddHandler
|
||||||
|
Paths_yesod_bin
|
||||||
|
Options
|
||||||
|
|
||||||
|
source-repository head
|
||||||
|
type: git
|
||||||
|
location: https://github.com/yesodweb/yesod
|
||||||
@ -7,4 +7,4 @@ then
|
|||||||
cabal install cabal-nirvana -fgenerate
|
cabal install cabal-nirvana -fgenerate
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cabal-nirvana-generate yesod yesod-static yesod-default hjsmin blaze-html yesod-test | runghc to-cabal.hs > yesod-platform.cabal
|
cabal-nirvana-generate yesod yesod-static yesod-default yesod-bin hjsmin blaze-html yesod-test | runghc to-cabal.hs > yesod-platform.cabal
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
$(function(){
|
|
||||||
$("p.noscript").hide();
|
|
||||||
});
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
body {
|
|
||||||
font-family: sans-serif;
|
|
||||||
background: #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
#wrapper {
|
|
||||||
width: 760px;
|
|
||||||
margin: 1em auto;
|
|
||||||
border: 2px solid #000;
|
|
||||||
padding: 0.5em;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
body {
|
|
||||||
font-family: sans-serif;
|
|
||||||
}
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
Michael
|
|
||||||
foobar
|
|
||||||
Foobar
|
|
||||||
mongo
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
Michael
|
|
||||||
foobar
|
|
||||||
mysql
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
Michael
|
|
||||||
foobar
|
|
||||||
p
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cat << EOF
|
|
||||||
|
|
||||||
You're using the deprecated ./test/run.sh. This file will be removed
|
|
||||||
soon in favor of ../scripts/runtests.
|
|
||||||
|
|
||||||
Running ../scripts/runtests...
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
../scripts/runtests "$@"
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
#!/bin/bash -ex
|
|
||||||
|
|
||||||
runghc -i. -idist/build/autogen main.hs init
|
|
||||||
|
|
||||||
(
|
|
||||||
cd foobar
|
|
||||||
cabal configure --disable-optimization || cabal install
|
|
||||||
cabal build
|
|
||||||
cabal clean
|
|
||||||
cabal configure -fdev --disable-optimization
|
|
||||||
cabal build
|
|
||||||
cabal clean
|
|
||||||
cabal configure -flibrary-only --disable-optimization
|
|
||||||
cabal build
|
|
||||||
cabal clean
|
|
||||||
cabal configure --enable-tests
|
|
||||||
cabal build
|
|
||||||
cabal test
|
|
||||||
)
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
# Not using this currently!
|
|
||||||
#
|
|
||||||
# Important! run with test/run.sh
|
|
||||||
|
|
||||||
rm -rf foobar && runghc main.hs init && cd foobar && cabal install && cabal install -fdevel && cd ..
|
|
||||||
<<<
|
|
||||||
Michael
|
|
||||||
foobar
|
|
||||||
|
|
||||||
Foobar
|
|
||||||
t
|
|
||||||
>>> /.*Registering foobar-0.0.0.*/
|
|
||||||
>>>= 0
|
|
||||||
|
|
||||||
rm -rf foobar && runghc main.hs init && cd foobar && cabal install && cabal install -fdevel && cd ..
|
|
||||||
<<<
|
|
||||||
Michael
|
|
||||||
foobar
|
|
||||||
|
|
||||||
Foobar
|
|
||||||
s
|
|
||||||
>>> /.*Registering foobar-0.0.0.*/
|
|
||||||
>>>= 0
|
|
||||||
|
|
||||||
rm -rf foobar && runghc main.hs init && cd foobar && cabal install && cabal install -fdevel && cd .. && rm -rf foobar
|
|
||||||
<<<
|
|
||||||
Michael
|
|
||||||
foobar
|
|
||||||
|
|
||||||
Foobar
|
|
||||||
p
|
|
||||||
>>> /.*Registering foobar-0.0.0.*/
|
|
||||||
>>>= 0
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
setup() { rm -rf foobar; }
|
|
||||||
teardown() { rm -rf foobar; ghc-pkg unregister foobar &>/dev/null; }
|
|
||||||
|
|
||||||
test_sqlite() { ../test/scaffold.sh < ../test/sqlite-input.txt ; }
|
|
||||||
test_postgresql() { ../test/scaffold.sh < ../test/postgresql-input.txt; }
|
|
||||||
test_mongodb() { ../test/scaffold.sh < ../test/mongodb-input.txt ; }
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
Michael
|
|
||||||
foobar
|
|
||||||
s
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
Michael
|
|
||||||
foobar
|
|
||||||
Foobar
|
|
||||||
t
|
|
||||||
@ -17,15 +17,6 @@ cabal-version: >= 1.6
|
|||||||
build-type: Simple
|
build-type: Simple
|
||||||
homepage: http://www.yesodweb.com/
|
homepage: http://www.yesodweb.com/
|
||||||
|
|
||||||
extra-source-files:
|
|
||||||
input/*.cg
|
|
||||||
hsfiles/mongo.hsfiles
|
|
||||||
hsfiles/mysql.hsfiles
|
|
||||||
hsfiles/postgres.hsfiles
|
|
||||||
hsfiles/postgres-fay.hsfiles
|
|
||||||
hsfiles/simple.hsfiles
|
|
||||||
hsfiles/sqlite.hsfiles
|
|
||||||
|
|
||||||
library
|
library
|
||||||
build-depends: base >= 4.3 && < 5
|
build-depends: base >= 4.3 && < 5
|
||||||
, yesod-core >= 1.2 && < 1.3
|
, yesod-core >= 1.2 && < 1.3
|
||||||
@ -56,80 +47,6 @@ library
|
|||||||
if !os(windows)
|
if !os(windows)
|
||||||
build-depends: unix
|
build-depends: unix
|
||||||
|
|
||||||
executable yesod-ghc-wrapper
|
|
||||||
main-is: ghcwrapper.hs
|
|
||||||
build-depends:
|
|
||||||
base >= 4 && < 5
|
|
||||||
, Cabal
|
|
||||||
|
|
||||||
executable yesod-ld-wrapper
|
|
||||||
main-is: ghcwrapper.hs
|
|
||||||
cpp-options: -DLDCMD
|
|
||||||
build-depends:
|
|
||||||
base >= 4 && < 5
|
|
||||||
, Cabal
|
|
||||||
executable yesod-ar-wrapper
|
|
||||||
main-is: ghcwrapper.hs
|
|
||||||
cpp-options: -DARCMD
|
|
||||||
build-depends:
|
|
||||||
base >= 4 && < 5
|
|
||||||
, Cabal
|
|
||||||
|
|
||||||
executable yesod
|
|
||||||
if os(windows)
|
|
||||||
cpp-options: -DWINDOWS
|
|
||||||
build-depends: base >= 4.3 && < 5
|
|
||||||
, ghc >= 7.0.3 && < 7.8
|
|
||||||
, ghc-paths >= 0.1
|
|
||||||
, parsec >= 2.1 && < 4
|
|
||||||
, text >= 0.11
|
|
||||||
, shakespeare-text >= 1.0 && < 1.1
|
|
||||||
, shakespeare >= 1.0.2 && < 1.1
|
|
||||||
, shakespeare-js >= 1.0.2 && < 1.2
|
|
||||||
, shakespeare-css >= 1.0.2 && < 1.1
|
|
||||||
, bytestring >= 0.9.1.4
|
|
||||||
, time >= 1.1.4
|
|
||||||
, template-haskell
|
|
||||||
, directory >= 1.0
|
|
||||||
, Cabal
|
|
||||||
, unix-compat >= 0.2 && < 0.5
|
|
||||||
, containers >= 0.2
|
|
||||||
, attoparsec >= 0.10
|
|
||||||
, http-types >= 0.7
|
|
||||||
, blaze-builder >= 0.2.1.4 && < 0.4
|
|
||||||
, filepath >= 1.1
|
|
||||||
, process
|
|
||||||
, zlib >= 0.5 && < 0.6
|
|
||||||
, tar >= 0.4 && < 0.5
|
|
||||||
, system-filepath >= 0.4 && < 0.5
|
|
||||||
, system-fileio >= 0.3 && < 0.4
|
|
||||||
, unordered-containers
|
|
||||||
, yaml >= 0.8 && < 0.9
|
|
||||||
, optparse-applicative >= 0.5
|
|
||||||
, fsnotify >= 0.0 && < 0.1
|
|
||||||
, split >= 0.2 && < 0.3
|
|
||||||
, file-embed
|
|
||||||
, conduit >= 0.5 && < 1.1
|
|
||||||
, resourcet >= 0.3 && < 0.5
|
|
||||||
, base64-bytestring
|
|
||||||
, lifted-base
|
|
||||||
, http-reverse-proxy >= 0.1.1
|
|
||||||
, network
|
|
||||||
, http-conduit
|
|
||||||
, network-conduit
|
|
||||||
, project-template >= 0.1.1
|
|
||||||
|
|
||||||
ghc-options: -Wall -threaded
|
|
||||||
main-is: main.hs
|
|
||||||
other-modules: Scaffolding.Scaffolder
|
|
||||||
Devel
|
|
||||||
Build
|
|
||||||
GhcBuild
|
|
||||||
Keter
|
|
||||||
AddHandler
|
|
||||||
Paths_yesod
|
|
||||||
Options
|
|
||||||
|
|
||||||
source-repository head
|
source-repository head
|
||||||
type: git
|
type: git
|
||||||
location: https://github.com/yesodweb/yesod
|
location: https://github.com/yesodweb/yesod
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user