mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
fix release script (#4275)
* fix release script only upload from the linux machine and escape arguments to `publish`, otherwise they get interpreted by bazel. CHANGELOG_BEGIN CHANGELOG_END * Update release/src/Main.hs Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org> * Update release/src/Main.hs Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org> * bracket -> bracket_ Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
This commit is contained in:
parent
a1f8aeba88
commit
eacacbf44e
@ -116,12 +116,14 @@ main = do
|
||||
-- We can't put an .npmrc file in the root of the directory because other bazel npm
|
||||
-- code picks it up and looks for the token which is not yet set before the release
|
||||
-- phase.
|
||||
-- Only upload from the linux machine.
|
||||
when (osName == "linux") $ do
|
||||
$logDebug "Uploading npm packages"
|
||||
liftIO $ bracket
|
||||
liftIO $ bracket_
|
||||
(writeFile npmrcPath "//registry.npmjs.org/:_authToken=${NPM_TOKEN}")
|
||||
(\() -> Dir.removeFile npmrcPath)
|
||||
(\() -> forM_ npmPackages
|
||||
$ \rule -> liftIO $ callCommand $ "bazel run " <> rule <> ":npm_package.publish --access public")
|
||||
(Dir.removeFile npmrcPath)
|
||||
(forM_ npmPackages
|
||||
$ \rule -> liftIO $ callCommand $ "bazel run " <> rule <> ":npm_package.publish -- --access public")
|
||||
|
||||
-- set variables for next steps in Azure pipelines
|
||||
liftIO . putStrLn $ "##vso[task.setvariable variable=has_released;isOutput=true]true"
|
||||
|
@ -26,6 +26,8 @@ module Util (
|
||||
resolvePomData,
|
||||
loggedProcess_,
|
||||
isDeployJar,
|
||||
|
||||
osName
|
||||
) where
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user