Skip to content

Commit dde66eb

Browse files
committed
initial commit
0 parents  commit dde66eb

File tree

8 files changed

+167
-0
lines changed

8 files changed

+167
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*~
2+
\#*
3+
.\#*
4+
.DS_Store
5+
compiled/
6+
/doc/

.travis.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
language: c
2+
3+
# Based on: https://github.com/greghendershott/travis-racket
4+
5+
env:
6+
global:
7+
# Supply a global RACKET_DIR environment variable. This is where
8+
# Racket will be installed. A good idea is to use ~/racket because
9+
# that doesn't require sudo to install.
10+
- RACKET_DIR=~/racket
11+
matrix:
12+
# Supply at least one RACKET_VERSION environment variable. This is
13+
# used by the install-racket.sh script (run at before_install,
14+
# below) to select the version of Racket to download and install.
15+
#
16+
# Supply more than one RACKET_VERSION (as in the example below) to
17+
# create a Travis-CI build matrix to test against multiple Racket
18+
# versions.
19+
- RACKET_VERSION=6.12
20+
- RACKET_VERSION=7.0
21+
- RACKET_VERSION=7.1
22+
- RACKET_VERSION=7.2
23+
- RACKET_VERSION=HEAD
24+
25+
matrix:
26+
allow_failures:
27+
# - env: RACKET_VERSION=HEAD
28+
fast_finish: true
29+
30+
before_install:
31+
- git clone https://github.com/greghendershott/travis-racket.git ~/travis-racket
32+
- cat ~/travis-racket/install-racket.sh | bash # pipe to bash not sh!
33+
- export PATH="${RACKET_DIR}/bin:${PATH}" #install-racket.sh can't set for us
34+
35+
install:
36+
- raco pkg install --auto --name cli-command
37+
38+
before_script:
39+
40+
# Here supply steps such as raco make, raco test, etc. You can run
41+
# `raco pkg install --deps search-auto` to install any required
42+
# packages without it getting stuck on a confirmation prompt.
43+
script:
44+
- raco test -x -p cli-command
45+
46+
after_success:
47+
- raco setup --check-pkg-deps --pkgs cli-command
48+
- raco pkg install --auto cover cover-coveralls
49+
- raco cover -b -f coveralls -d $TRAVIS_BUILD_DIR/coverage .

LICENSE-APACHE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2020 spdegabrielle
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

LICENSE-MIT

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
cli-command
2+
3+
MIT License
4+
5+
Copyright (c) 2020 spdegabrielle
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
SOFTWARE.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cli-command
2+
===========
3+
README text here.

hello.rkt

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#lang racket/base
2+
3+
(module+ test
4+
(require rackunit))
5+
6+
;; Notice
7+
;; To create an executable
8+
;; $ raco exe -o hello hello.rkt
9+
;;
10+
;; see https://docs.racket-lang.org/raco/exe.html
11+
;;
12+
;; To share stand-alone executables:
13+
;; $ raco distribute <directory> executable ...
14+
;;
15+
;; e.g
16+
;; $ raco distribute greetings hello.exe
17+
;;
18+
;; creates a directory "greetings" (if the directory doesn’t exist already),
19+
;; and it copies the executables "hello.exe" and "goodbye.exe" into "greetings".
20+
;;
21+
;; see https://docs.racket-lang.org/raco/exe-dist.html
22+
;;
23+
;; For your convenience, we have included LICENSE-MIT and LICENSE-APACHE files.
24+
;; If you would prefer to use a different license, replace those files with the
25+
;; desired license.
26+
;;
27+
;; Some users like to add a `private/` directory, place auxiliary files there,
28+
;; and require them in `main.rkt`.
29+
;;
30+
;; See the current version of the racket style guide here:
31+
;; http://docs.racket-lang.org/style/index.html
32+
33+
;; Code here
34+
(require racket/cmdline)
35+
(define who (box "world"))
36+
(command-line
37+
#:program "my-program"
38+
#:once-each
39+
[("-n" "--name") name "Who to say hello to" (set-box! who name)]
40+
#:args ()
41+
(printf "hello ~a~n" (unbox who)))
42+
43+
44+
(module+ test
45+
;; Any code in this `test` submodule runs when this file is run using DrRacket
46+
;; or with `raco test`. The code here does not run when this file is
47+
;; required by another module.
48+
(check-equal? (unbox who) "world"))
49+
50+
(module+ main
51+
;; (Optional) main submodule. Put code here if you need it to be executed when
52+
;; this file is run using DrRacket or the `racket` executable. The code here
53+
;; does not run when this file is required by another module. Documentation:
54+
;; http://docs.racket-lang.org/guide/Module_Syntax.html#%28part._main-and-test%29
55+
(define who (box "world")))

info.rkt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#lang info
2+
(define collection "cli-command")
3+
(define deps '("base"))
4+
(define build-deps '("scribble-lib" "racket-doc" "rackunit-lib"))
5+
(define scribblings '(("scribblings/cli-command.scrbl" ())))
6+
(define pkg-desc "Description Here")
7+
(define version "0.0")
8+
(define pkg-authors '(spdegabrielle))

scribblings/cli-command.scrbl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#lang scribble/manual
2+
@require[@for-label[cli-command
3+
racket/base]]
4+
5+
@title{cli-command}
6+
@author{spdegabrielle}
7+
8+
@defmodule[cli-command]
9+
10+
Package Description Here

0 commit comments

Comments
 (0)