(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: [19]
        )
      ]
      spids: [19]
    )
    (FuncDef
      name: usage
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  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: T
                  spids: [41]
                )
              ]
            )
          ]
          spids: [36]
        )
      spids: [32 35]
    )
    (FuncDef
      name: error_exit
      body: 
        (BraceGroup
          children: [(C {(usage)}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})]
          spids: [85]
        )
      spids: [81 84]
    )
    (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: [100 103]
                )
              )
            }
          spids: [98]
        )
      ]
      spids: [98]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:new_tag_name)
          op: Equal
          rhs: {(DQ (v) ($ VSub_Name '$new_version'))}
          spids: [106]
        )
      ]
      spids: [106]
    )
    (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 128]
        )
      ]
      spids: [16777215 140]
    )
    (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: [156 162]
                                )
                              )
                            }
                          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_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[182])]
            )
            (C {(error_exit)})
          ]
          spids: [16777215 177]
        )
      ]
      spids: [16777215 192]
    )
    (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: 16777215
                          arg_word: {(/dev/null)}
                          spids: [212]
                        )
                      ]
                    )
                  ]
                  negated: F
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('ERROR: git tag with that version already exists'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[222])]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 217]
        )
      ]
      spids: [16777215 234]
    )
    (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:16777215 arg_word:{(2)} spids:[267])]
                    )
                  ]
                  negated: T
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('ERROR: You have unstaged changes.'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[276])]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 271]
        )
      ]
      spids: [16777215 288]
    )
    (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:16777215 arg_word:{(2)} spids:[314])]
                    )
                  ]
                  negated: T
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('ERROR: Your index contains uncommitted changes.'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[323])]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 318]
        )
      ]
      spids: [16777215 335]
    )
    (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_id:Redir_Great fd:16777215 arg_word:{(VERSION)} spids:[371])]
    )
    (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.'))})
  ]
)