Use package.yaml instead cabal file
This commit is contained in:
parent
8b1fd369fd
commit
79d04d1b37
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
.local/
|
.local/
|
||||||
.stack-work/
|
.stack-work/
|
||||||
|
*.cabal
|
||||||
*.sublime-*
|
*.sublime-*
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
FROM fpco/stack-build:lts-13.10
|
|
||||||
|
|
||||||
# Code formatter
|
|
||||||
# RUN stack --system-ghc --local-bin-path=/usr/local/bin install \
|
|
||||||
# hfmt
|
|
21
Makefile
21
Makefile
@ -1,5 +1,4 @@
|
|||||||
app_name := haskell-cron-matcher
|
app_name := haskell-cron-matcher
|
||||||
image := ${app_name}-stack
|
|
||||||
|
|
||||||
container_work_dir := /app
|
container_work_dir := /app
|
||||||
cache_dir := ${container_work_dir}/.stack-work
|
cache_dir := ${container_work_dir}/.stack-work
|
||||||
@ -15,23 +14,29 @@ stack := docker run \
|
|||||||
--volume "${PWD}:${container_work_dir}" \
|
--volume "${PWD}:${container_work_dir}" \
|
||||||
--env "STACK_ROOT=${cache_dir}" \
|
--env "STACK_ROOT=${cache_dir}" \
|
||||||
--workdir "${container_work_dir}" \
|
--workdir "${container_work_dir}" \
|
||||||
${image}
|
fpco/stack-build:lts-15.16
|
||||||
|
|
||||||
|
hfmt := docker run \
|
||||||
|
--rm \
|
||||||
|
--tty \
|
||||||
|
--init \
|
||||||
|
--user "${uid}:${gid}" \
|
||||||
|
--volume "${PWD}:${container_work_dir}" \
|
||||||
|
--workdir "${container_work_dir}" \
|
||||||
|
anwinged/hfmt:master
|
||||||
|
|
||||||
# Targets
|
# Targets
|
||||||
|
|
||||||
.PHONY: build-docker
|
|
||||||
build-docker:
|
|
||||||
docker build --tag=${image} .
|
|
||||||
${stack} stack --system-ghc --local-bin-path=./.local install hindent hfmt
|
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
|
mkdir -p .stack-work
|
||||||
${stack} stack build
|
${stack} stack build
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
|
mkdir -p .stack-work
|
||||||
${stack} stack test
|
${stack} stack test
|
||||||
|
|
||||||
.PHONY: format
|
.PHONY: format
|
||||||
format:
|
format:
|
||||||
${stack} .local/hfmt -w app/ src/ test/
|
${hfmt} -w app/ src/ test/
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
name: haskell-cron-matcher
|
|
||||||
version: 0.1.0.0
|
|
||||||
license-file: LICENSE
|
|
||||||
build-type: Simple
|
|
||||||
extra-source-files: README.md
|
|
||||||
cabal-version: >=1.10
|
|
||||||
|
|
||||||
library
|
|
||||||
hs-source-dirs: src
|
|
||||||
exposed-modules: Pattern, Field, Constraint, Helper
|
|
||||||
build-depends: base >= 4.7 && < 5
|
|
||||||
, dates == 0.2.2.2
|
|
||||||
default-language: Haskell2010
|
|
||||||
|
|
||||||
executable haskell-cron-matcher-exe
|
|
||||||
hs-source-dirs: app
|
|
||||||
main-is: Main.hs
|
|
||||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Werror
|
|
||||||
build-depends: base
|
|
||||||
, dates == 0.2.2.2
|
|
||||||
, haskell-cron-matcher
|
|
||||||
default-language: Haskell2010
|
|
||||||
|
|
||||||
test-suite haskell-cron-matcher-test
|
|
||||||
type: exitcode-stdio-1.0
|
|
||||||
hs-source-dirs: test
|
|
||||||
main-is: Spec.hs
|
|
||||||
other-modules: PatternSpec, FieldSpec, ConstraintSpec, HelperSpec
|
|
||||||
build-depends: base
|
|
||||||
, dates == 0.2.2.2
|
|
||||||
, hspec
|
|
||||||
, QuickCheck
|
|
||||||
, haskell-cron-matcher
|
|
||||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Werror
|
|
||||||
default-language: Haskell2010
|
|
||||||
|
|
||||||
source-repository head
|
|
||||||
type: git
|
|
||||||
location: https://github.com/anwinged/haskell-cron-matcher
|
|
39
package.yaml
Normal file
39
package.yaml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: haskell-cron-matcher
|
||||||
|
version: 0.1.0.0
|
||||||
|
license: MIT
|
||||||
|
license-file: LICENSE
|
||||||
|
stability: Experimental
|
||||||
|
|
||||||
|
extra-source-files:
|
||||||
|
- LICENSE
|
||||||
|
- README.md
|
||||||
|
- stack.yaml
|
||||||
|
|
||||||
|
ghc-options: -Wall
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
- base >= 4.9 && < 5
|
||||||
|
- dates
|
||||||
|
|
||||||
|
library:
|
||||||
|
source-dirs: src
|
||||||
|
exposed-modules:
|
||||||
|
- Pattern
|
||||||
|
- Field
|
||||||
|
- Constraint
|
||||||
|
- Helper
|
||||||
|
|
||||||
|
executable:
|
||||||
|
main: Main.hs
|
||||||
|
source-dirs: app
|
||||||
|
dependencies:
|
||||||
|
- haskell-cron-matcher
|
||||||
|
|
||||||
|
tests:
|
||||||
|
pure:
|
||||||
|
main: Spec.hs
|
||||||
|
source-dirs:
|
||||||
|
- test
|
||||||
|
dependencies:
|
||||||
|
- haskell-cron-matcher
|
||||||
|
- hspec
|
@ -15,7 +15,7 @@
|
|||||||
# resolver:
|
# resolver:
|
||||||
# name: custom-snapshot
|
# name: custom-snapshot
|
||||||
# location: "./custom-snapshot.yaml"
|
# location: "./custom-snapshot.yaml"
|
||||||
resolver: lts-12.26
|
resolver: lts-14.27
|
||||||
|
|
||||||
# User packages to be built.
|
# User packages to be built.
|
||||||
# Various formats can be used as shown in the example below.
|
# Various formats can be used as shown in the example below.
|
||||||
@ -41,7 +41,7 @@ packages:
|
|||||||
# Dependency packages to be pulled from upstream that are not in the resolver
|
# Dependency packages to be pulled from upstream that are not in the resolver
|
||||||
# (e.g., acme-missiles-0.3)
|
# (e.g., acme-missiles-0.3)
|
||||||
extra-deps:
|
extra-deps:
|
||||||
- dates-0.2.2.2
|
- dates-0.2.3.0
|
||||||
|
|
||||||
# Override default flag values for local packages and extra-deps
|
# Override default flag values for local packages and extra-deps
|
||||||
flags: {}
|
flags: {}
|
||||||
|
19
stack.yaml.lock
Normal file
19
stack.yaml.lock
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# This file was autogenerated by Stack.
|
||||||
|
# You should not edit this file by hand.
|
||||||
|
# For more information, please see the documentation at:
|
||||||
|
# https://docs.haskellstack.org/en/stable/lock_files
|
||||||
|
|
||||||
|
packages:
|
||||||
|
- completed:
|
||||||
|
hackage: dates-0.2.3.0@sha256:915a2fc85ea818542851ed54a85abe6a042e7d78f470a5a6db032768f6c6415a,2179
|
||||||
|
pantry-tree:
|
||||||
|
size: 443
|
||||||
|
sha256: 010c2b73848cb519ea9677eaedd03bfcd7f32735000d870e6dc763b9be15e12c
|
||||||
|
original:
|
||||||
|
hackage: dates-0.2.3.0
|
||||||
|
snapshots:
|
||||||
|
- completed:
|
||||||
|
size: 524996
|
||||||
|
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/27.yaml
|
||||||
|
sha256: 7ea31a280c56bf36ff591a7397cc384d0dff622e7f9e4225b47d8980f019a0f0
|
||||||
|
original: lts-14.27
|
Loading…
Reference in New Issue
Block a user