Skip to content

Commit 85a9d90

Browse files
committed
Touch-up repo, bumping it to latest stackage LTS
1 parent e54293e commit 85a9d90

18 files changed

+392
-189
lines changed

.env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PROJECT_DIR=/home/phburns/repos/flipstone/rollbar-haskell

.github/workflows/haskell.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Redcard CI
2+
3+
on:
4+
push:
5+
6+
defaults:
7+
run:
8+
shell: bash
9+
10+
jobs:
11+
build:
12+
runs-on: [self-hosted, linux, x64]
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Cache
18+
uses: actions/cache@v3
19+
env:
20+
cache-version: v1
21+
with:
22+
key: ${{ env.cache-version }}-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}
23+
restore-keys: |
24+
${{ env.cache-version }}-
25+
path: |
26+
./stack-root
27+
28+
- name: Build
29+
run: |
30+
set -e
31+
mkdir -p ./stack-root
32+
mv compose.override.github.yml compose.override.yml
33+
echo "PROJECT_DIR=$PWD" >> .env
34+
./scripts/build

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ cabal-dev
88
.cabal-sandbox/
99
cabal.sandbox.config
1010
.stack-work
11+
compose.override.yml

.vim/haskell-language-server-wrapper

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
exec docker-compose \
4+
run --rm -T \
5+
dev haskell-language-server-wrapper "$@"

Setup.hs

-2
This file was deleted.

compose.override.github.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
services:
2+
dev:
3+
tty: false
4+
volumes:
5+
- ./stack-root:/stack-root

compose.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
services:
2+
dev:
3+
image: ghcr.io/flipstone/haskell-tools:debian-unstable-ghc-9.4.5-2023-07-18-1d8bf61
4+
environment:
5+
STACK_ROOT: /stack-root
6+
IN_DEV_CONTAINER: 'true'
7+
# Pass through the CI variable from GitHub (or set it to `true` locally
8+
# for debugging CI builds)
9+
CI:
10+
volumes:
11+
- .:${PROJECT_DIR}
12+
- flipstone_stack_root:/stack-root
13+
working_dir: ${PROJECT_DIR}
14+
tty: true
15+
16+
volumes:
17+
flipstone_stack_root:
18+
external: true

package.yaml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: rollbar
2+
version: 2.0.0
3+
synopsis: error tracking through rollbar.com
4+
homepage: https://github.com/flipstone/rollbar-haskell
5+
license: MIT
6+
author: Flipstone Technology Partners
7+
maintainer: [email protected]
8+
copyright: Daggerboard Inc. makers of docmunch.com, Azara Solutions Inc.
9+
category: Logging
10+
11+
default-extensions:
12+
- OverloadedStrings
13+
ghc-options:
14+
- -Wall
15+
- -Werror
16+
- -Wcpp-undef
17+
- -Widentities
18+
- -Wincomplete-record-updates
19+
- -Wincomplete-uni-patterns
20+
- -Wpartial-fields
21+
- -Wredundant-constraints
22+
- -fno-warn-orphans
23+
dependencies:
24+
- base >=4.6 && < 5
25+
- text >=1.2 && < 2.1
26+
- aeson >=1.2 && < 2.2
27+
- vector >=0.12 && < 0.14
28+
- network >=2.6 && < 3.2
29+
- basic-prelude >=0.7 && < 0.8
30+
- monad-control >=1.0.2 && < 1.0.4
31+
- resourcet >=1.1 && < 1.3
32+
- http-conduit >=2.2 && < 2.4
33+
- lifted-base == 0.2.3.*
34+
- network-bsd == 2.8.*
35+
36+
library:
37+
source-dirs: src
38+
exposed-modules:
39+
- Rollbar
40+
- Rollbar.MonadLogger

rollbar.cabal

+38-33
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,41 @@
1-
name: rollbar
2-
version: 1.1.2
3-
synopsis: error tracking through rollbar.com
4-
-- description:
5-
homepage: https://github.com/azara/rollbar-haskell
6-
license: MIT
7-
author: Daggerboard Inc. Greg Weber, Azara Solutions Inc. Jeff Taggart
8-
maintainer: Azara <[email protected]>, Jeff Taggart <[email protected]>, Steven MacCoun <[email protected]>
9-
copyright: Daggerboard Inc. makers of docmunch.com, Azara Solutions Inc.
10-
category: Logging
11-
build-type: Simple
12-
cabal-version: >=1.8
1+
cabal-version: 1.12
132

14-
library
15-
ghc-options: -Wall
16-
17-
exposed-modules: Rollbar, Rollbar.MonadLogger
18-
-- other-modules:
19-
build-depends:
20-
base >=4.6 && < 5
21-
, text
22-
, aeson
23-
, vector
24-
, network
25-
, basic-prelude
26-
, monad-control
27-
, resourcet
28-
, http-conduit
29-
, lifted-base
30-
, network-bsd
3+
-- This file has been generated from package.yaml by hpack version 0.35.2.
4+
--
5+
-- see: https://github.com/sol/hpack
316

32-
hs-source-dirs: src
7+
name: rollbar
8+
version: 2.0.0
9+
synopsis: error tracking through rollbar.com
10+
category: Logging
11+
homepage: https://github.com/flipstone/rollbar-haskell
12+
author: Flipstone Technology Partners
13+
maintainer: [email protected]
14+
copyright: Daggerboard Inc. makers of docmunch.com, Azara Solutions Inc.
15+
license: MIT
16+
build-type: Simple
3317

34-
source-repository head
35-
type: git
36-
location: git://github.com/azara/rollbar-haskell.git
18+
library
19+
exposed-modules:
20+
Rollbar
21+
Rollbar.MonadLogger
22+
other-modules:
23+
Paths_rollbar
24+
hs-source-dirs:
25+
src
26+
default-extensions:
27+
OverloadedStrings
28+
ghc-options: -Wall -Werror -Wcpp-undef -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints -fno-warn-orphans
29+
build-depends:
30+
aeson >=1.2 && <2.2
31+
, base >=4.6 && <5
32+
, basic-prelude ==0.7.*
33+
, http-conduit >=2.2 && <2.4
34+
, lifted-base ==0.2.3.*
35+
, monad-control >=1.0.2 && <1.0.4
36+
, network >=2.6 && <3.2
37+
, network-bsd ==2.8.*
38+
, resourcet >=1.1 && <1.3
39+
, text >=1.2 && <2.1
40+
, vector >=0.12 && <0.14
41+
default-language: Haskell2010

scripts/bootstrap

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
if $(docker volume inspect flipstone_stack_root >/dev/null 2>/dev/null); then
6+
echo "Skipping creation of flipstone_stack_root docker volume. It already exists"
7+
else
8+
echo "Creating flipstone_stack_root docker volume"
9+
docker volume create flipstone_stack_root
10+
fi
11+
12+
if [ -f .env ]; then
13+
echo "Skipping creation of .env because it already exists. Remove it if you want to this script to recreate it"
14+
else
15+
echo "PROJECT_DIR=$PWD" >> .env
16+
fi

scripts/build

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
./scripts/format-repo
6+
./scripts/build-executables

scripts/build-executables

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
source scripts/lib/run-in-container.sh
6+
7+
STACK_OPTIONS=""
8+
9+
if [ "$CI" ]; then
10+
:
11+
else
12+
STACK_OPTIONS="--fast"
13+
fi
14+
15+
stack build \
16+
--test \
17+
$STACK_OPTIONS \
18+
"$@"

scripts/format-repo

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
source scripts/lib/run-in-container.sh
6+
7+
if [ "$CI" ]; then
8+
MODE=check
9+
else
10+
MODE=inplace
11+
fi
12+
13+
git ls-files -z '*.hs' | xargs -0 fourmolu --mode $MODE

scripts/lib/run-in-container.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
if [ "$IN_DEV_CONTAINER" ]; then
2+
# Already in container, nothing to do
3+
:
4+
else
5+
EXTRA_ARGS=()
6+
7+
if [ "$RUN_AS_SERVICE" ]; then
8+
EXTRA_ARGS+=(--service-ports)
9+
EXTRA_ARGS+=(--use-aliases)
10+
fi
11+
12+
# Script was run from outside the container, re-exec inside the container
13+
# with the same arguments
14+
docker-compose build
15+
exec docker-compose run --rm "${EXTRA_ARGS[@]}" dev $0 "$@"
16+
fi

0 commit comments

Comments
 (0)