(CommandList
  children: [
    (C {(set)} {(-euo)} {(pipefail)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:IFS)
          op: Equal
          rhs: 
            {
              (SingleQuotedPart
                left: <Left_DollarSingleQuote "$'">
                tokens: [<Char_OneChar '\\t'> <Char_OneChar '\\n'>]
                spids: [20 23]
              )
            }
          spids: [19]
        )
      ]
      spids: [19]
    )
    (FuncDef
      name: usage
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 78
                  stdin_parts: [
                    ('\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')
                  ]
                )
              ]
            )
          ]
          spids: [36]
        )
      spids: [32 35]
    )
    (FuncDef
      name: error_exit
      body: 
        (BraceGroup
          children: [(C {(usage)}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})]
          spids: [86]
        )
      spids: [82 85]
    )
    (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:{(EmptyPart)})
                  spids: [101 104]
                )
              )
            }
          spids: [99]
        )
      ]
      spids: [99]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:new_tag_name)
          op: Equal
          rhs: {(DQ (v) ($ VSub_Name '$new_version'))}
          spids: [107]
        )
      ]
      spids: [107]
    )
    (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: [16777215 129]
        )
      ]
      spids: [16777215 141]
    )
    (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: [157 163]
                                )
                              )
                            }
                          right: 
                            {(Lit_Other '^') (Lit_Other '[') (0-9) (Lit_Other ']') (Lit_Other '+') 
                              (Lit_Other '$')
                            }
                        )
                    )
                  ]
                  negated: T
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('ERROR: semantic version should not start with a letter'))}]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (C {(error_exit)})
          ]
          spids: [16777215 178]
        )
      ]
      spids: [16777215 193]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (Pipeline
                  children: [
                    (C {(git)} {(tag)})
                    (SimpleCommand
                      words: [{(grep)} {(DQ ($ VSub_Name '$new_tag_name'))}]
                      redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})]
                    )
                  ]
                  negated: F
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('ERROR: git tag with that version already exists'))}]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 218]
        )
      ]
      spids: [16777215 235]
    )
    (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:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                    )
                  ]
                  negated: T
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('ERROR: You have unstaged changes.'))}]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 272]
        )
      ]
      spids: [16777215 289]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (Pipeline
                  children: [
                    (SimpleCommand
                      words: [
                        {(git)}
                        {(diff-index)}
                        {(--cached)}
                        {(--exit-code)}
                        {(-r)}
                        {(--ignore-submodules)}
                        {(HEAD)}
                        {(--)}
                      ]
                      redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                    )
                  ]
                  negated: T
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('ERROR: Your index contains uncommitted changes.'))}]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 319]
        )
      ]
      spids: [16777215 336]
    )
    (C {(sed)} {(-i.bak)} 
      {
        (DQ ('s|^') (Lit_Other '\\') ('(git clone.*--branch ') (Lit_Other '\\') (').*') (Lit_Other '$') 
          ('|') (Lit_Other '\\') (1) ($ VSub_Name '$new_tag_name') ('|')
        )
      } {(README.md)}
    )
    (SimpleCommand
      words: [{(echo)} {(DQ ($ VSub_Name '$new_tag_name'))}]
      redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(VERSION)})]
    )
    (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.'))})
  ]
)