Skip to content

Commit 27fcf88

Browse files
committed
[chore] apply Akshay's suggestions
1 parent 5f75037 commit 27fcf88

File tree

2 files changed

+10
-38
lines changed

2 files changed

+10
-38
lines changed

hack/bin/bombon.hs

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,11 @@ import Data.Text qualified as T
77
import Turtle
88

99
main = do
10-
release <- options "Upload boms" do
11-
optText "release" 't' "Which release tag to upload the artifacts to"
12-
13-
with (mktempdir "." "tmp") \tmpDir -> do
14-
cd tmpDir
15-
let git l = proc "git" l mempty
16-
git ["clone", "https://github.com/mangoiv/wire-server", "."]
17-
git ["checkout", release]
18-
git ["submodule", "update", "--init", "--recursive"]
19-
let bomName = "wire-server-bom-" <> release <> ".json"
20-
ExitSuccess <-
21-
proc
22-
"nix"
23-
[ "build",
24-
"-f",
25-
"nix",
26-
"wireServer.allLocalPackagesBom",
27-
"-o",
28-
bomName
29-
]
30-
mempty
31-
printf ("uploading " % s % " to release " % s % "\n") bomName ("chart/" <> release)
32-
proc
33-
"gh"
34-
[ "-R",
35-
"mangoiv/wire-server",
36-
"release",
37-
"upload",
38-
"chart/" <> release,
39-
bomName
40-
]
41-
mempty
42-
pure ()
10+
(release, repo) <- options "Upload boms" do
11+
(,)
12+
<$> optText "release" 't' "Which release tag to upload the artifacts to"
13+
<*> optText "repo" 'r' "Which repository to upload the artifacts to"
14+
let bomName = "wire-server-bom-" <> release <> ".json"
15+
ExitSuccess <- proc "nix" ["build", "-f", "nix", "wireServer.allLocalPackagesBom", "-o", bomName] mempty
16+
printf ("uploading " % s % " to release " % s % "\n") bomName ("chart/" <> release)
17+
proc "gh" ["-R", repo, "release", "upload", "chart/" <> release, bomName] mempty

nix/wire-server.nix

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -464,18 +464,15 @@ let
464464
paths = map (e: (hPkgs localModsEnableAll).${e}) wireServerPackages;
465465
};
466466

467-
allImages = pkgs.linkFarm "all-images" (images localModsEnableAll) ;
467+
allImages = pkgs.linkFarm "all-images" (images localModsEnableAll);
468468

469469
# BOM is an acronym for bill of materials
470470
allLocalPackagesBom = lib.buildBom allLocalPackages {
471471
includeBuildtimeDependencies = true;
472472
};
473-
allImagesBom = lib.buildBom allImages {
474-
includeBuildtimeDependencies = true;
475-
};
476473
in
477474
{
478-
inherit ciImage hoogleImage allImages allImagesBom allLocalPackages allLocalPackagesBom;
475+
inherit ciImage hoogleImage allImages allLocalPackages allLocalPackagesBom;
479476

480477
images = images localModsEnableAll;
481478
imagesUnoptimizedNoDocs = images localModsOnlyTests;

0 commit comments

Comments
 (0)