Skip to content

Commit

Permalink
Merge pull request #18 from Rufflewind/master
Browse files Browse the repository at this point in the history
Simplify script for checking tarball + fix validation error
  • Loading branch information
hvr committed Apr 14, 2015
2 parents c0ea6f1 + f532e18 commit 7cac42c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
11 changes: 3 additions & 8 deletions .travis.yml
@@ -1,4 +1,5 @@
# NB: don't set `language: haskell` here
language: c

# See also https://github.com/hvr/multi-ghc-travis for more information

Expand Down Expand Up @@ -98,13 +99,7 @@ script:
- cabal sdist

# check that the generated source-distribution can be built & installed
- export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
cd dist/;
if [ -f "$SRC_TGZ" ]; then
cabal install --force-reinstalls "$SRC_TGZ";
else
echo "expected '$SRC_TGZ' not found";
exit 1;
fi
- SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
(cd dist && cabal install --force-reinstalls "$SRC_TGZ")

# EOF
14 changes: 5 additions & 9 deletions README.md
Expand Up @@ -89,15 +89,11 @@ script:
- cabal check
- cabal sdist # tests that a source-distribution can be generated

# The following scriptlet checks that the resulting source distribution can be built & installed
- export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
cd dist/;
if [ -f "$SRC_TGZ" ]; then
cabal install --force-reinstalls "$SRC_TGZ";
else
echo "expected '$SRC_TGZ' not found";
exit 1;
fi
# Check that the resulting source distribution can be built & installed.
# If there are no other `.tar.gz` files in `dist`, this can be even simpler:
# `cabal install --force-reinstalls dist/*-*.tar.gz`
- SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
(cd dist && cabal install --force-reinstalls "$SRC_TGZ")

```

Expand Down

0 comments on commit 7cac42c

Please sign in to comment.