Skip to content

Commit 3fba363

Browse files
committed
CI debugging
1 parent 814ce98 commit 3fba363

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

spago.cabal

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ cabal-version: 1.12
44
--
55
-- see: https://github.com/sol/hpack
66
--
7-
-- hash: 25f34ee90c40276d788a66523e0833707cf16645eadde749c8a953606886ab03
7+
-- hash: b88f8100a3b763c486e0f8eef011ce424bcca172077abeb8b10114b874428683
88

99
name: spago
10-
version: 0.16.0
10+
version: 0.17.0
1111
description: Please see the README on GitHub at <https://github.com/purescript/spago#readme>
1212
homepage: https://github.com/purescript/spago#readme
1313
bug-reports: https://github.com/purescript/spago/issues
@@ -147,6 +147,7 @@ test-suite spec
147147
other-modules:
148148
BumpVersionSpec
149149
Spago.Build.ParserSpec
150+
Spago.Command.PathSpec
150151
SpagoSpec
151152
Spec
152153
UnitSpec

src/Spago/Bower.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ generateBowerJson = do
6060
die [ path <> " is being ignored by git - change this before continuing" ]
6161

6262
logInfo "Generated a valid Bower config using the package set"
63-
pure bowerJson
63+
pure $ case OS.buildOS of
64+
OS.Windows -> Text.replace "\n" "\r\n" bowerJson
65+
_ -> bowerJson
6466

6567

6668
runBowerInstall :: (HasLogFunc env, HasBower env) => RIO env ()

src/Spago/Git.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ hasCleanWorkingTree = do
2929
logDebug $ "git status stderr: " <> display err
3030
die [ "Unable to check git status. Perhaps git is not installed or this is not a git repository?" ]
3131

32-
pure $ out == ""
32+
if out == ""
33+
then pure True
34+
else do
35+
logDebug $ "Git working tree is not clean: " <> displayShow out
36+
pure False
3337

3438

3539
getAllTags :: HasGit env => RIO env [Text]

src/Spago/Version.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ bumpVersion
9999
-> RIO env ()
100100
bumpVersion dryRun spec = do
101101
newBowerConfig <- Bower.generateBowerJson
102+
oldConfig :: Either SomeException Text <- try $ readTextFile Bower.path
102103

103104
Git.requireCleanWorkingTree
104105

@@ -112,6 +113,8 @@ bumpVersion dryRun spec = do
112113
Bower.runBowerInstall
113114
clean <- Git.hasCleanWorkingTree
114115
unless clean $ do
116+
logDebug $ displayShow oldConfig
117+
logDebug $ displayShow newBowerConfig
115118
die [ "A new " <> Bower.path <> " has been generated. Please commit this and run `bump-version` again." ]
116119

117120
let tagAction = DryAction

0 commit comments

Comments
 (0)