Skip to content

Commit

Permalink
Use exact versions for "megarepo" deps
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Jun 17, 2020
1 parent 24ec50e commit f916ba5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hercules-ci-agent/hercules-ci-agent.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ executable hercules-ci-agent
, exceptions
, filepath
, hercules-ci-agent
, hercules-ci-api-core == 0.1.*
, hercules-ci-api-agent == 0.2.*
, hercules-ci-api-core == 0.1.1.0
, hercules-ci-api-agent == 0.2.1.0
, hostname
, http-client
, http-client-tls
Expand Down
12 changes: 10 additions & 2 deletions scripts/releaser
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,18 @@ main = do
hSetBuffering stderr LineBuffering
gitAssertEmptyStaging
-- Disabled because metadata change does not warrant a bump
-- releasePackage "hercules-ci-api-core" mempty
releasePackage "hercules-ci-api-agent" mempty
-- releasePackage "hercules-ci-api-core" (bumpExactVersion "hercules-ci-api-core")
releasePackage "hercules-ci-api-agent" (bumpExactVersion "hercules-ci-api-agent")
releasePackage "hercules-ci-agent" bumpVersionInNix

bumpExactVersion :: String -> String -> String -> IO ()
bumpExactVersion package old new = do
void $ readProcess "sh"
[ "-c"
, "sed -i $(git ls-files | grep '\\.cabal') -e 's/" <> package <> " == " <> old <> "/" <> package <> " == " <> new <> "/g'"
]
mempty

bumpVersionInNix :: String -> String -> IO ()
bumpVersionInNix old new = do
void $ readProcess "sed" (["-i", "-e", "s/agentVersion = \"" <> old <> "\"/agentVersion = \"" <> new <> "\"/", "for-upstream/common.nix"]) mempty
Expand Down

0 comments on commit f916ba5

Please sign in to comment.