mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-24 17:44:21 +03:00
Check for main branch in new-release script (#476)
This commit is contained in:
parent
f944f0beb3
commit
9d060d7428
@ -15,7 +15,7 @@ import qualified Data.Text.IO as T.IO
|
||||
import System.Environment (getArgs)
|
||||
import System.Exit (ExitCode (..))
|
||||
import qualified Text.Regex.TDFA as TR
|
||||
import Turtle (empty, shell)
|
||||
import Turtle (empty, shell, shellStrict)
|
||||
|
||||
main = do
|
||||
args <- getArgs
|
||||
@ -25,6 +25,9 @@ main = do
|
||||
|
||||
makeNewRelease :: String -> IO ()
|
||||
makeNewRelease newVersion = do
|
||||
(ExitSuccess, branchName) <- shellStrict "git rev-parse --abbrev-ref HEAD" empty
|
||||
when (T.strip branchName /= "main") $ error "You must run this script from the main branch!"
|
||||
|
||||
oldPackageYamlContents <- T.unpack <$> T.IO.readFile "package.yaml"
|
||||
|
||||
(newPackageYamlContents, oldVersion) <- updatePackageYaml oldPackageYamlContents newVersion
|
||||
|
Loading…
Reference in New Issue
Block a user