Removing default from 'raco pkg create'

This commit is contained in:
Jay McCarthy 2012-11-12 07:00:35 -07:00
parent a2b1d4186b
commit f5995ec0cc
7 changed files with 19 additions and 15 deletions

View File

@ -85,9 +85,11 @@
(config-cmd set key+vals)))]
[create
"Bundle a new package"
[(#:str "plt") format ()
[(#:str #f) format ()
("Select the format of the package to be created."
"Options are: tgz, zip, plt")]
[#:bool manifest () "Creates a manifest file for a directory, rather than an archive"]
#:args (maybe-dir)
(unless (or manifest format)
(error 'planet2 "You must specify an archive format."))
(create-cmd (if manifest "MANIFEST" format) maybe-dir)])

View File

@ -208,7 +208,7 @@ this command fails atomically. It accepts the following options:
@item{@exec{create package-directory} -- Bundles a package. It accepts the following options:
@itemlist[
@item{@DFlag{format str} -- Specifies the archive format. The options are: @exec{tgz}, @exec{zip}, and @exec{plt} (default.)}
@item{@DFlag{format str} -- Specifies the archive format. The options are: @exec{tgz}, @exec{zip}, and @exec{plt}. This must be specified if @DFlag{manifest} is not present.}
@item{@DFlag{manifest} -- Creates a manifest file for a directory, rather than an archive.}
]
}

View File

@ -17,8 +17,8 @@
(shelly-begin
(initialize-indexes)
$ "raco pkg create test-pkgs/planet2-test1"
$ "raco pkg create test-pkgs/planet2-test1-not-conflict"
$ "raco pkg create --format plt test-pkgs/planet2-test1"
$ "raco pkg create --format plt test-pkgs/planet2-test1-not-conflict"
(shelly-install "only modules are considered for conflicts"
"test-pkgs/planet2-test1.plt"
$ "raco pkg install test-pkgs/planet2-test1-not-conflict.plt")

View File

@ -24,6 +24,8 @@
$ "raco pkg create --format tgz test-pkgs/does-not-exist" =exit> 1
$ "test -f test-pkgs/does-not-exist.tgz" =exit> 1)
$ "raco pkg create planet2-test1" =exit> 1
(define-syntax-rule (shelly-create pkg fmt)
(shelly-case
(format "create format ~a" fmt)

View File

@ -6,7 +6,7 @@
(with-fake-root
(shelly-case
"raco install/update uses raco setup, unless you turn it off (cmdline)"
$ "raco pkg create test-pkgs/raco-pkg"
$ "raco pkg create --format plt test-pkgs/raco-pkg"
$ "raco raco-pkg" =exit> 1
$ "raco pkg install --dont-setup test-pkgs/raco-pkg.plt"
$ "raco raco-pkg" =exit> 1))
@ -15,7 +15,7 @@
(shelly-case
"raco install/update uses raco setup, unless you turn it off (env)"
(putenv "PLT_PLANET2_DONTSETUP" "1")
$ "raco pkg create test-pkgs/raco-pkg"
$ "raco pkg create --format plt test-pkgs/raco-pkg"
$ "raco raco-pkg" =exit> 1
$ "raco pkg install --dont-setup test-pkgs/raco-pkg.plt"
$ "raco raco-pkg" =exit> 1
@ -24,7 +24,7 @@
(with-fake-root
(shelly-case
"raco install/update uses raco setup"
$ "raco pkg create test-pkgs/raco-pkg"
$ "raco pkg create --format plt test-pkgs/raco-pkg"
$ "raco raco-pkg" =exit> 1
$ "raco pkg install test-pkgs/raco-pkg.plt"
$ "raco raco-pkg" =exit> 0)))

View File

@ -27,9 +27,9 @@
(pkg-tests
(shelly-case
"create packages"
$ "raco pkg create test-pkgs/pkg-b-second"
$ "raco pkg create test-pkgs/pkg-a-first"
$ "raco pkg create test-pkgs/pkg-a-second")
$ "raco pkg create --format plt test-pkgs/pkg-b-second"
$ "raco pkg create --format plt test-pkgs/pkg-a-first"
$ "raco pkg create --format plt test-pkgs/pkg-a-second")
(with-fake-root
(shelly-case

View File

@ -27,11 +27,11 @@
(pkg-tests
(shelly-case
"create packages"
$ "raco pkg create test-pkgs/pkg-b-first"
$ "raco pkg create test-pkgs/pkg-b-second"
$ "raco pkg create test-pkgs/pkg-a-first"
$ "raco pkg create test-pkgs/pkg-a-second"
$ "raco pkg create test-pkgs/pkg-a-third")
$ "raco pkg create --format plt test-pkgs/pkg-b-first"
$ "raco pkg create --format plt test-pkgs/pkg-b-second"
$ "raco pkg create --format plt test-pkgs/pkg-a-first"
$ "raco pkg create --format plt test-pkgs/pkg-a-second"
$ "raco pkg create --format plt test-pkgs/pkg-a-third")
(with-fake-root
(shelly-case