-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
139 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- ignore: | ||
name: Functor law |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Setup, lint, build and test | ||
all: setup build test lint | ||
|
||
# Install dependencies | ||
setup: | ||
stack setup | ||
stack build --dependencies-only --test --no-run-tests | ||
stack install --copy-compiler-tool \ | ||
apply-refact \ | ||
fast-tags \ | ||
fourmolu \ | ||
hlint \ | ||
weeder | ||
|
||
# Build but do not run tests | ||
build: | ||
stack build --fast --pedantic --test --no-run-tests | ||
|
||
# Build and test | ||
test: | ||
stack build --fast --pedantic --test | ||
|
||
# Lint and format the project | ||
lint: | ||
stack exec -- fourmolu -i app src test | ||
stack exec -- hlint app src test | ||
stack exec -- weeder --require-hs-files | ||
stack lint-extra-deps | ||
|
||
# Rebuild and test on file-changes | ||
watch: | ||
stack build --fast --pedantic --test --file-watch | ||
|
||
# Build the Docker image | ||
image: | ||
docker build --tag restyled/restyler:edge . | ||
|
||
test_integration_command := "restyled" | ||
test_integration_options := "stable" | ||
|
||
# Example for using local SDK, etc: | ||
|
||
# just test-integration \ | ||
# test_integration_command='stack --stack-yaml ../sdk/stack.yaml exec --' \ | ||
# test_integration_options='--debug dev' | ||
# | ||
[doc('Run integration tests against our demo real PR')] | ||
test-integration: image | ||
AWS_PROFILE=restyled-ci {{test_integration_command}} promote \ | ||
--image restyled/restyler:edge {{test_integration_options}} | ||
|
||
# aws := "aws --profile restyled-ci" | ||
|
||
# doc_bucket := ` | ||
# {{aws}} cloudformation describe-stacks \ | ||
# --stack-name sites-docs \ | ||
# --query 'Stacks[*].Outputs[?OutputKey==`BucketName`].OutputValue' \ | ||
# --output text \ | ||
# ` | ||
|
||
# doc_distribution_id := ` | ||
# {{aws}} cloudformation describe-stacks \ | ||
# --stack-name sites-docs \ | ||
# --query 'Stacks[*].Outputs[?OutputKey==`DistributionId`].OutputValue' \ | ||
# --output text \ | ||
# ` | ||
|
||
# doc_root := `stack path --local-doc-root` | ||
# doc_s3_prefix := /restyler | ||
|
||
# docs: | ||
# [ -n "$$STACK_WORK_DIR" ] | ||
# stack build --haddock | ||
# find "$$STACK_WORK_DIR" -type f -name '*.html' -exec \ | ||
# sed -i 's|{{doc_root}}|{{doc_s3_prefix}}|g' {} + | ||
# {{aws}} s3 sync --acl public-read --delete {{doc_root}}/ \ | ||
# s3://{{doc_bucket}}{{doc_s3_prefix}}/ | ||
# {{aws}} cloudfront create-invalidation \ | ||
# --distribution-id {{doc_distribution_id}} --paths "{{doc_s3_prefix}}/*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: restyler | ||
version: 0.2.0.0 | ||
version: 0.2.1.0 | ||
license: MIT | ||
|
||
default-extensions: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters