(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:gitref) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 1> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{(HEAD)}) ) } ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:ver) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(show)} {(DQ ($ VSub_DollarName '$gitref') (':VERSION'))})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:major) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ VSub_DollarName '$ver')}) (C {(cut)} {(-f)} {(1)} {(-d)} {(.)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:minor) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ VSub_DollarName '$ver')}) (C {(cut)} {(-f)} {(2)} {(-d)} {(.)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_DollarName '$major')} {(Lit_Other '=')} {(0)} {(-a)} {($ VSub_DollarName '$minor')} {(-lt)} {(5)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:last_tag) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(git)} {(describe)} {(--tags)} {(--abbrev) (Lit_Other '=') (0)} {(DQ ($ VSub_DollarName '$gitref'))} ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nb) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(git)} {(rev-list)} {(--count)} {(DQ ($ VSub_DollarName '$gitref'))} {(DQ ('^') ($ VSub_DollarName '$last_tag'))} ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_DollarName '$nb')} {(Lit_Other '=')} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {($ VSub_DollarName '$ver')})] ) ] else_action: [ (C {(echo)} {(DQ ($ VSub_DollarName '$ver') ('+') ($ VSub_DollarName '$nb'))}) ] ) ] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:topdir) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(rev-parse)} {(--show-toplevel)})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:verchanged) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(git)} {(blame)} {(-L)} {(Lit_Comma ',') (1)} {(-sl)} {($ VSub_DollarName '$gitref')} {(--)} {(DQ ($ VSub_DollarName '$topdir') (/VERSION))} ) (C {(cut)} {(-f)} {(1)} {(-d)} {(DQ (' '))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nb) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(git)} {(rev-list)} {(--count)} {(DQ ($ VSub_DollarName '$gitref'))} {(DQ ('^') ($ VSub_DollarName '$verchanged'))} ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:pre) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ VSub_DollarName '$ver')}) (C {(cut)} {(-s)} {(-f)} {(2)} {(-d)} {(DQ (-))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_DollarName '$ver')} {(Lit_Other '=')} {(DQ (0.5.0-dev))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nb) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(expr)} {($ VSub_DollarName '$nb')} {(Lit_Other '+')} {(1)}) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) ] ) (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_DollarName '$ver')} {(Lit_Other '=')} {(DQ (0.5.0-pre))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:nb) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(expr)} {($ VSub_DollarName '$nb')} {(Lit_Other '+')} {(5578)}) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_DollarName '$pre'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_DollarName '$major')} {(Lit_Other '=')} {(0)} {(-a)} {($ VSub_DollarName '$minor')} {(-le)} {(5)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ($ VSub_DollarName '$ver') ('+') ($ VSub_DollarName '$nb'))}) ] ) ] else_action: [ (C {(echo)} {(DQ ($ VSub_DollarName '$ver') (.) ($ VSub_DollarName '$nb'))}) ] ) ] ) ] else_action: [(C {(echo)} {($ VSub_DollarName '$ver')})] ) ] ) ] )