(command.CommandList
  children: [
    (C {(Id.KW_Set set)} {(-euo)} {(pipefail)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:IFS)
          op: assign_op.Equal
          rhs: 
            {
              (single_quoted
                left: (Token id:Id.Left_SingleQuoteC val:"$'" span_id:20)
                tokens: [
                  (Token id:Id.Char_OneChar val:'\\t' span_id:21)
                  (Token id:Id.Char_OneChar val:'\\n' span_id:22)
                ]
              )
            }
          spids: [19]
        )
      ]
    )
    (command.ShFunction
      name: usage
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.HereDoc
                  op: (Token id:Id.Redir_DLess val:'<<' span_id:41)
                  fd: -1
                  here_begin: {(EOF)}
                  here_end_span_id: 80
                  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 ')
                    (command_sub
                      left_token: (Token id:Id.Left_Backtick val:'`' span_id:61)
                      command_list: (command.CommandList children:[(C {(git)} {(checkout)})])
                    )
                    (' 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')
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: error_exit
      body: 
        (command.BraceGroup
          children: [
            (C {(usage)})
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:94)
              arg_word: {(1)}
            )
          ]
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:new_version)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (braced_var_sub
                  token: (Token id:Id.VSub_Number val:1 span_id:104)
                  suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty))
                )
              )
            }
          spids: [101]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:new_tag_name)
          op: assign_op.Equal
          rhs: {(DQ (v) ($ Id.VSub_DollarName '$new_version'))}
          spids: [109]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.DBracket
              expr: 
                (bool_expr.Unary
                  op_id: Id.BoolUnary_z
                  child: {(DQ ($ Id.VSub_DollarName '$new_version'))}
                )
            )
          ]
          action: [(C {(echo)} {(DQ ('ERROR: no new version specified'))}) (C {(error_exit)})]
          spids: [119 131]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Pipeline
                  children: [
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_EqualTilde
                          left: 
                            {
                              (DQ 
                                (braced_var_sub
                                  token: (Token id:Id.VSub_Name val:new_version span_id:160)
                                  suffix_op: 
                                    (suffix_op.Slice
                                      begin: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)})
                                      length: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                                    )
                                )
                              )
                            }
                          right: 
                            {(Id.Lit_Other '^') (Id.Lit_Other '[') (0-9) (Id.Lit_Other ']') 
                              (Id.Lit_Other '+') (Id.Lit_Other '$')
                            }
                        )
                    )
                  ]
                  negated: T
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:178)
            )
          ]
          action: [
            (command.Simple
              words: [{(echo)} {(DQ ('ERROR: semantic version should not start with a letter'))}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:185)
                  fd: -1
                  arg_word: {(2)}
                )
              ]
            )
            (C {(error_exit)})
          ]
          spids: [152 180]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Pipeline
                  children: [
                    (C {(git)} {(tag)})
                    (command.Simple
                      words: [{(grep)} {(DQ ($ Id.VSub_DollarName '$new_tag_name'))}]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_Great val:'>' span_id:215)
                          fd: -1
                          arg_word: {(/dev/null)}
                        )
                      ]
                    )
                  ]
                  negated: F
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:218)
            )
          ]
          action: [
            (command.Simple
              words: [{(echo)} {(DQ ('ERROR: git tag with that version already exists'))}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:225)
                  fd: -1
                  arg_word: {(2)}
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:233)
              arg_word: {(1)}
            )
          ]
          spids: [201 220]
        )
      ]
    )
    (C {(echo)} {(DQ ('INFO: Checking that all changes are commited and pushed'))})
    (C {(git)} {(pull)})
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Pipeline
                  children: [
                    (command.Simple
                      words: [
                        {(git)}
                        {(diff-files)}
                        {(--check)}
                        {(--exit-code)}
                        {(--ignore-submodules)}
                        {(--)}
                      ]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:270)
                          fd: -1
                          arg_word: {(2)}
                        )
                      ]
                    )
                  ]
                  negated: T
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:272)
            )
          ]
          action: [
            (command.Simple
              words: [{(echo)} {(DQ ('ERROR: You have unstaged changes.'))}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:279)
                  fd: -1
                  arg_word: {(2)}
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:287)
              arg_word: {(1)}
            )
          ]
          spids: [254 274]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Pipeline
                  children: [
                    (command.Simple
                      words: [
                        {(git)}
                        {(diff-index)}
                        {(--cached)}
                        {(--exit-code)}
                        {(-r)}
                        {(--ignore-submodules)}
                        {(HEAD)}
                        {(--)}
                      ]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:317)
                          fd: -1
                          arg_word: {(2)}
                        )
                      ]
                    )
                  ]
                  negated: T
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:319)
            )
          ]
          action: [
            (command.Simple
              words: [{(echo)} {(DQ ('ERROR: Your index contains uncommitted changes.'))}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:326)
                  fd: -1
                  arg_word: {(2)}
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:334)
              arg_word: {(1)}
            )
          ]
          spids: [297 321]
        )
      ]
    )
    (C {(sed)} {(-i.bak)} 
      {
        (DQ ('s|^') (Id.Lit_Other '\\') ('(git clone.*--branch ') (Id.Lit_Other '\\') (').*') 
          (Id.Lit_Other '$') ('|') (Id.Lit_Other '\\') (1) ($ Id.VSub_DollarName '$new_tag_name') ('|')
        )
      } {(README.md)}
    )
    (command.Simple
      words: [{(echo)} {(DQ ($ Id.VSub_DollarName '$new_tag_name'))}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:374)
          fd: -1
          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 ') ($ Id.VSub_DollarName '$new_version'))})
    (C {(git)} {(tag)} {(-a)} {(DQ ($ Id.VSub_DollarName '$new_tag_name'))} {(-m)} 
      {(DQ ('Version ') (${ Id.VSub_Name new_version))}
    )
    (C {(echo)} {(DQ ('INFO: done.'))})
    (C {(echo)} {(DQ ('INFO: Now you can push this local branch to the GitHub repository.'))})
  ]
)