(command.CommandList children: [ (C {(set)} {(-euo)} {(pipefail)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Subshell child: (command.Pipeline children: [ (C {(grep)} {(-r)} {(KJ_DBG)} {(src/) (Lit_Other '*')}) (C {(egrep)} {(-v)} {(SQ <'/(debug(-test)?|exception)[.]'>)}) ] negated: F ) spids: [13 32] ) terminator: <Op_Semi ';'> ) ] action: [ (command.SimpleCommand words: [{(echo)} {(SQ <'*** Error: There are instances of KJ_DBG in the code.'>)}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 35] ) ] spids: [16777215 52] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(egrep)} {(-r)} {(SQ <'TODO\\(now\\)'>)} {(src/) (Lit_Other '*')}) terminator: <Op_Semi ';'> ) ] action: [ (command.SimpleCommand words: [{(echo)} {(SQ <'*** Error: There are release-blocking TODOs in the code.'>)}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 69] ) ] spids: [16777215 86] ) (C {(make)} {(clean)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} { (DQ (x) (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(status)} {(--porcelain)})] ) left_token: <Left_CommandSub '$('> spids: [100 106] ) ) } {(KW_Bang '!') (Lit_Other '=')} {(DQ (x))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.SimpleCommand words: [{(echo)} {(DQ ('Please commit changes to git before releasing.'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 119] ) ] spids: [16777215 136] ) (C {(.)} {(branch.conf)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(rev-parse)} {(--abbrev-ref)} {(HEAD)})] ) left_token: <Left_CommandSub '$('> spids: [164 172] ) } {(Lit_Other '=')} {(master)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:CHANNEL spids:[184]) op: Equal rhs: {(dev)} spids: [184] ) ] spids: [184] ) ] spids: [16777215 181] ) (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_DollarName '$IS_STABLE')} {(Lit_Other '=')} {(true)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:CHANNEL spids:[203]) op: Equal rhs: {(stable)} spids: [203] ) ] spids: [203] ) ] spids: [187 200] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:CHANNEL spids:[209]) op: Equal rhs: {(beta)} spids: [209] ) ] spids: [209] ) ] spids: [206 212] ) (C {(echo)} { (DQ ('**** Determining next build number for ') ($ VSub_DollarName '$CHANNEL') (' channel ****') ) } ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:LAST_BUILD spids:[224]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(curl)} {(-fs)} {(https) (Lit_Other ':') (//install.sandstorm.io/) ($ VSub_DollarName '$CHANNEL') } ) ] ) left_token: <Left_CommandSub '$('> spids: [225 234] ) } spids: [224] ) ] spids: [224] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithBinary op_id: Arith_Great left: (arith_expr.ArithBinary op_id: Arith_Slash left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike LAST_BUILD>) right: (arith_expr.ArithWord w:{(Lit_Digits 1000)}) ) right: (arith_expr.ArithVarRef token:<Lit_ArithVarLike BRANCH_NUMBER>) ) spids: [239 252] ) terminator: <Op_Semi ';'> ) ] action: [ (command.SimpleCommand words: [ {(echo)} { (DQ ('ERROR: ') ($ VSub_DollarName '$CHANNEL') (' has already moved past this branch!') ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.SimpleCommand words: [{(echo)} {(DQ (' I refuse to replace it with an older branch.'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 255] ) ] spids: [16777215 284] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:BASE_BUILD spids:[287]) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Star left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike BRANCH_NUMBER>) right: (arith_expr.ArithWord w:{(Lit_Digits 1000)}) ) spids: [288 297] ) } spids: [287] ) ] spids: [287] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:BUILD spids:[299]) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.TernaryOp cond: (arith_expr.ArithBinary op_id: Arith_Great left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike BASE_BUILD>) right: (arith_expr.ArithVarRef token:<Lit_ArithVarLike LAST_BUILD>) ) true_expr: (arith_expr.ArithVarRef token:<Lit_ArithVarLike BASE_BUILD>) false_expr: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithVarRef token:<Lit_ArithVarLike LAST_BUILD>) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) spids: [300 321] ) } spids: [299] ) ] spids: [299] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:BUILD_MINOR spids:[323]) op: Equal rhs: { (DQ (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Percent left: (arith_expr.ArithWord w:{($ VSub_DollarName '$BUILD')}) right: (arith_expr.ArithWord w:{(Lit_Digits 1000)}) ) spids: [325 334] ) ) } spids: [323] ) ] spids: [323] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DISPLAY_VERSION spids:[337]) op: Equal rhs: {(DQ (${ VSub_Name BRANCH_NUMBER) (.) (${ VSub_Name BUILD_MINOR))} spids: [337] ) ] spids: [337] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:TAG_NAME spids:[348]) op: Equal rhs: {(DQ (v) (${ VSub_Name DISPLAY_VERSION))} spids: [348] ) ] spids: [348] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SIGNING_KEY_ID spids:[356]) op: Equal rhs: {(160D2D577518B58D94C9800B63F227499DA8CCBD)} spids: [356] ) ] spids: [356] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:EXPECTED_CHANGELOG spids:[363]) op: Equal rhs: { (DQ ('### ') ($ VSub_DollarName '$TAG_NAME') (' (') (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(date)} {(SQ <'+%Y-%m-%d'>)})]) left_token: <Left_CommandSub '$('> spids: [368 374] ) (')') ) } spids: [363] ) ] spids: [363] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobNEqual left: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(head)} {(-n)} {(1)} {(CHANGELOG.md)})] ) left_token: <Left_CommandSub '$('> spids: [383 391] ) ) } right: {(DQ ($ VSub_DollarName '$EXPECTED_CHANGELOG')) (Lit_Other '*')} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.SimpleCommand words: [{(echo)} {(DQ ('Changelog not updated. First line should be:'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.SimpleCommand words: [{(echo)} {(DQ ($ VSub_DollarName '$EXPECTED_CHANGELOG'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 404] ) ] spids: [16777215 431] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:TARBALL spids:[446]) op: Equal rhs: {(sandstorm-) ($ VSub_DollarName '$BUILD') (.tar.xz)} spids: [446] ) ] spids: [446] ) (C {(echo)} {(DQ ('**** Building build ') ($ VSub_DollarName '$BUILD') (' ****'))}) (C {(make)} {(Lit_VarLike 'BUILD=') ($ VSub_DollarName '$BUILD')}) (C {(echo)} {(DQ ('**** Tagging this commit ****'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:GIT_REVISION spids:[484]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.SimpleCommand redirects: [ (redir.Redir op: <Redir_Less '<'> fd: 16777215 arg_word: {(bundle/git-revision)} ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [486 489] ) ) } spids: [484] ) ] spids: [484] ) (C {(git)} {(tag)} {(-u)} {($ VSub_DollarName '$SIGNING_KEY_ID')} {(DQ ($ VSub_DollarName '$TAG_NAME'))} {(DQ ($ VSub_DollarName '$GIT_REVISION'))} {(-m)} {(DQ ('Release Sandstorm ') (${ VSub_Name DISPLAY_VERSION))} ) (C {(git)} {(push)} {(origin)} {(DQ ($ VSub_DollarName '$TAG_NAME'))}) (C {(echo)} {(DQ ('**** Pushing build ') ($ VSub_DollarName '$BUILD') (' ****'))}) (C {(rm)} {(-f)} {($ VSub_DollarName '$TARBALL') (.sig)} {($ VSub_DollarName '$TARBALL') (.update-sig)} {(install.sh.sig)} ) (C {(gpg)} {(-u)} {($ VSub_DollarName '$SIGNING_KEY_ID')} {(--digest-algo)} {(SHA512)} {(--detach-sig)} {($ VSub_DollarName '$TARBALL')} ) (C {(gpg)} {(-u)} {($ VSub_DollarName '$SIGNING_KEY_ID')} {(--digest-algo)} {(SHA512)} {(--detach-sig)} {(install.sh)} ) (command.SimpleCommand words: [ {(tmp/sandstorm/update-tool)} {(sign)} {(word_part.TildeSubPart token:<Lit_TildeLike '~'>) (/.sandstorm-update-keyring)} {($ VSub_DollarName '$TARBALL')} ] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_DollarName '$TARBALL') (.update-sig)} ) ] ) (command.SimpleCommand words: [{(echo)} {($ VSub_DollarName '$BUILD')}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(tmp/) ($ VSub_DollarName '$CHANNEL')} ) ] ) (C {(gce-ss)} {(copy-files)} {($ VSub_DollarName '$TARBALL')} {(fe) (Lit_Other ':') (/var/www/dl.sandstorm.io)} ) (C {(gce-ss)} {(copy-files)} {($ VSub_DollarName '$TARBALL') (.sig)} {(fe) (Lit_Other ':') (/var/www/dl.sandstorm.io)} ) (C {(gce-ss)} {(copy-files)} {($ VSub_DollarName '$TARBALL') (.update-sig)} {(fe) (Lit_Other ':') (/var/www/dl.sandstorm.io)} ) (C {(gce-ss)} {(copy-files)} {(tmp/) ($ VSub_DollarName '$CHANNEL')} {(fe) (Lit_Other ':') (/var/www/install.sandstorm.io)} ) (C {(gce-ss)} {(copy-files)} {(install.sh)} {(fe) (Lit_Other ':') (/var/www/install.sandstorm.io)}) (C {(gce-ss)} {(copy-files)} {(install.sh.sig)} {(fe) (Lit_Other ':') (/var/www/install.sandstorm.io)} ) (C {(gce-ss)} {(ssh)} {(alpha)} {(--command)} {(SQ <'sudo service sandstorm update dev'>)}) ] )