(CommandList children: [ (C {(set)} {(-euo)} {(pipefail)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:IFS) op: Equal rhs: {(SQ <Lit_EscapedChar "\\t"> <Lit_EscapedChar "\\n">)} spids: [19] ) ] spids: [19] ) (FuncDef name: usage body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("\n") ("Usage: release.sh [new version]\n") ("\n") ( "This script is only intended for use by asdf maintainers when releasing new\n" ) ("versions of asdf. Plugin developers and asdf users do not need this script.\n") ("\n") ( "This script updates the hardcoded versions in the source code and README and\n" ) ("then commits them on the current branch. It then tags that commit with the\n") ("specified version.\n") ("\n") ("If you run this script in error, or with the wrong version, you can undo the\n") ( "changes by finding the original state in the list of actions listed in the\n" ) ("reflog:\n") ("\n") (" git reflog\n") ("\n") ("Then revert to the original state by running ") (CommandSubPart command_list: (CommandList children:[(C {(git)} {(checkout)})]) left_token: <Left_Backtick "`"> spids: [61 65] ) (" with the reference\n") ("previous to the release tagging changes:\n") ("\n") (" git checkout HEAD@{21}\n") ("\n") ("Then checkout the original branch again:\n") ("\n") (" git checkout master\n") ("\n") ("You are back to the original state!\n") ("\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [41] ) ] ) ] spids: [36] ) spids: [32 35] ) (FuncDef name: error_exit body: (BraceGroup children:[(C {(usage)})(C {(exit)} {(1)})] spids:[84]) spids: [80 83] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:new_version) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [99 102] ) ) } spids: [97] ) ] spids: [97] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:new_tag_name) op: Equal rhs: {(DQ (v) ($ VSub_Name "$new_version"))} spids: [105] ) ] spids: [105] ) (If arms: [ (if_arm cond: [(DBracket expr:(BoolUnary op_id:BoolUnary_z child:{(DQ ($ VSub_Name "$new_version"))}))] action: [(C {(echo)} {(DQ ("ERROR: no new version specified"))}) (C {(error_exit)})] spids: [-1 127] ) ] spids: [-1 139] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (DBracket expr: (BoolBinary op_id: BoolBinary_EqualTilde left: { (DQ (BracedVarSub token: <VSub_Name new_version> suffix_op: (Slice begin: (ArithWord w:{(Lit_Digits 0)}) length: (ArithWord w:{(Lit_Digits 1)}) ) spids: [155 161] ) ) } right: {(Lit_Other "^") (Lit_Other "[") (0-9) (Lit_Other "]") (Lit_Other "+") (Lit_Other "$") } ) ) ] negated: True ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ("ERROR: semantic version should not start with a letter"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[181])] ) (C {(error_exit)}) ] spids: [-1 176] ) ] spids: [-1 191] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(git)} {(tag)}) (SimpleCommand words: [{(grep)} {(DQ ($ VSub_Name "$new_tag_name"))}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[211])] ) ] negated: False ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ("ERROR: git tag with that version already exists"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[221])] ) (C {(exit)} {(1)}) ] spids: [-1 216] ) ] spids: [-1 233] ) (C {(echo)} {(DQ ("INFO: Checking that all changes are commited and pushed"))}) (C {(git)} {(pull)}) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [ {(git)} {(diff-files)} {(--check)} {(--exit-code)} {(--ignore-submodules)} {(--)} ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[266])] ) ] negated: True ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ("ERROR: You have unstaged changes."))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[275])] ) (C {(exit)} {(1)}) ] spids: [-1 270] ) ] spids: [-1 287] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [ {(git)} {(diff-index)} {(--cached)} {(--exit-code)} {(-r)} {(--ignore-submodules)} {(HEAD)} {(--)} ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[313])] ) ] negated: True ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ("ERROR: Your index contains uncommitted changes."))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[322])] ) (C {(exit)} {(1)}) ] spids: [-1 317] ) ] spids: [-1 334] ) (C {(sed)} {(-i.bak)} { (DQ ("s|^") (EscapedLiteralPart token:<Lit_EscapedChar "\\(">) ("git clone.*--branch ") (EscapedLiteralPart token:<Lit_EscapedChar "\\)">) (".*") (Lit_Other "$") ("|") (EscapedLiteralPart token:<Lit_EscapedChar "\\1">) ($ VSub_Name "$new_tag_name") ("|") ) } {(README.md)} ) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name "$new_tag_name"))}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(VERSION)} spids:[369])] ) (C {(echo)} {(DQ ("INFO: Committing and tagging new version"))}) (C {(git)} {(add)} {(README.md)}) (C {(git)} {(add)} {(VERSION)}) (C {(git)} {(commit)} {(-m)} {(DQ ("Update version to ") ($ VSub_Name "$new_version"))}) (C {(git)} {(tag)} {(-a)} {(DQ ($ VSub_Name "$new_tag_name"))} {(-m)} {(DQ ("Version ") (${ VSub_Name new_version))} ) (C {(echo)} {(DQ ("INFO: done."))}) (C {(echo)} {(DQ ("INFO: Now you can push this local branch to the GitHub repository."))}) ] )