(CommandList children: [ (C {(set)} {(-eu)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SCRIPT_DIR) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (AndOr children: [ (C {(cd)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(dirname)} { (DQ (BracedVarSub token: <VSub_Name BASH_SOURCE> bracket_op: (ArrayIndex expr: (ArithWord w:{(Lit_Digits 0)}) ) spids: [80 85] ) ) } ) ] ) left_token: <Left_CommandSub "$("> spids: [76 87] ) ) } ) (C {(pwd)}) ] op_id: Op_DAmp ) ] ) left_token: <Left_CommandSub "$("> spids: [72 93] ) } spids: [71] ) ] spids: [71] ) (C {(source)} { (CommandSubPart command_list: (CommandList children:[(C {(dirname)} {(${ VSub_Name SCRIPT_DIR)})]) left_token: <Left_CommandSub "$("> spids: [97 103] ) (/release/common.sh) } ) (C {(Lit_Other ":")} { (BracedVarSub token: <VSub_Name GIT_REPOSITORY_URL> suffix_op: (StringUnary op_id: VTest_ColonEquals arg_word: {("https:") (Lit_Slash /) (Lit_Slash /) (github.com) (Lit_Slash /) (bazelbuild) (Lit_Slash /) (bazel) } ) spids: [109 120] ) } ) (C {(Lit_Other ":")} { (BracedVarSub token: <VSub_Name GCS_BASE_URL> suffix_op: (StringUnary op_id: VTest_ColonEquals arg_word: {("https:") (Lit_Slash /) (Lit_Slash /) (storage.googleapis.com)} ) spids: [125 132] ) } ) (C {(Lit_Other ":")} { (BracedVarSub token: <VSub_Name GCS_BUCKET> suffix_op: (StringUnary op_id:VTest_ColonEquals arg_word:{(bucket-o-bazel)}) spids: [136 140] ) } ) (C {(Lit_Other ":")} { (BracedVarSub token: <VSub_Name GCS_APT_BUCKET> suffix_op: (StringUnary op_id:VTest_ColonEquals arg_word:{(bazel-apt)}) spids: [144 148] ) } ) (C {(Lit_Other ":")} { (BracedVarSub token: <VSub_Name EMAIL_TEMPLATE_RC> suffix_op: (StringUnary op_id: VTest_ColonEquals arg_word: {(${ VSub_Name SCRIPT_DIR) (Lit_Slash /) (rc_email.txt)} ) spids: [153 161] ) } ) (C {(Lit_Other ":")} { (BracedVarSub token: <VSub_Name EMAIL_TEMPLATE_RELEASE> suffix_op: (StringUnary op_id: VTest_ColonEquals arg_word: {(${ VSub_Name SCRIPT_DIR) (Lit_Slash /) (release_email.txt)} ) spids: [165 173] ) } ) (C {(Lit_Other ":")} { (BracedVarSub token: <VSub_Name RELEASE_CANDIDATE_URL> suffix_op: (StringUnary op_id: VTest_ColonEquals arg_word: { (DQ (${ VSub_Name GCS_BASE_URL) (/) (${ VSub_Name GCS_BUCKET) ("/%release_name%/rc%rc%/index.html") ) } ) spids: [178 191] ) } ) (C {(Lit_Other ":")} { (BracedVarSub token: <VSub_Name RELEASE_URL> suffix_op: (StringUnary op_id: VTest_Equals arg_word: {(DQ (${ VSub_Name GIT_REPOSITORY_URL) ("/releases/tag/%release_name%"))} ) spids: [195 204] ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PLATFORM) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(uname)} {(-s)}) (C {(tr)} {(SQ <A-Z>)} {(SQ <a-z>)})] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [209 225] ) ) } spids: [207] ) ] spids: [207] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(${ VSub_Name PLATFORM)} right: {(DQ (darwin))} ) ) terminator: <Op_Semi ";"> ) ] action: [ (FuncDef name: checksum body: (BraceGroup children: [ (Subshell child: (AndOr children: [ (C {(cd)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {(DQ ($ VSub_Number "$1"))})] ) left_token: <Left_CommandSub "$("> spids: [261 267] ) ) } ) (C {(shasum)} {(-a)} {(256)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(basename)} {(DQ ($ VSub_Number "$1"))})] ) left_token: <Left_CommandSub "$("> spids: [279 285] ) ) } ) ] op_id: Op_DAmp ) spids: [257 287] ) ] spids: [254] ) spids: [248 253] ) ] spids: [-1 245] ) ] else_action: [ (FuncDef name: checksum body: (BraceGroup children: [ (Subshell child: (AndOr children: [ (C {(cd)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {(DQ ($ VSub_Number "$1"))})] ) left_token: <Left_CommandSub "$("> spids: [308 314] ) ) } ) (C {(sha256sum)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(basename)} {(DQ ($ VSub_Number "$1"))})] ) left_token: <Left_CommandSub "$("> spids: [322 328] ) ) } ) ] op_id: Op_DAmp ) spids: [304 330] ) ] spids: [301] ) spids: [295 300] ) ] spids: [292 335] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GIT_ROOT) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(git)} {(rev-parse)} {(--show-toplevel)})] ) left_token: <Left_CommandSub "$("> spids: [340 346] ) ) } spids: [338] ) ] spids: [338] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BUILD_SCRIPT_PATH) op: Equal rhs: {(DQ (${ VSub_Name GIT_ROOT) (/compile.sh))} spids: [349] ) ] spids: [349] ) (FuncDef name: get_full_release_name body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:rc) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(get_release_candidate)})]) left_token: <Left_CommandSub "$("> spids: [373 375] ) } spids: [372] ) ] spids: [370] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(get_release_name)})]) left_token: <Left_CommandSub "$("> spids: [381 383] ) } spids: [380] ) ] spids: [378] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} {(DQ (${ VSub_Name rc))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [(C {(echo)} {(DQ (${ VSub_Name name) (rc) (${ VSub_Name rc))})] spids: [-1 401] ) ] else_action: [(C {(echo)} {(DQ (${ VSub_Name name))})] spids: [417 429] ) ] spids: [367] ) spids: [361 366] ) (FuncDef name: setup_android_repositories body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(Lit_Other "[")} {(KW_Bang "!")} {(-f)} {(WORKSPACE.bak)} {(Lit_Other "]")} ) (C {(Lit_Other "[")} {(-n)} { (DQ (BracedVarSub token: <VSub_Name ANDROID_SDK_PATH> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )}) spids: [462 465] ) ) } {(Lit_Other "]")} ) ] op_id: Op_DAmp ) terminator: <Op_Semi ";"> ) ] action: [ (C {(cp)} {(WORKSPACE)} {(WORKSPACE.bak)}) (C {(trap)} {(SQ <"[ -f WORKSPACE.bak ] && rm WORKSPACE && mv WORKSPACE.bak WORKSPACE">)} {(EXIT)} ) (SimpleCommand words: [{(echo)}] redirects: [(Redir op_id:Redir_DGreat fd:-1 arg_word:{(WORKSPACE)} spids:[502])] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {(WORKSPACE)} spids: [508] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("android_sdk_repository(\n") (" name = ") (Right_DoubleQuote "\"") (androidsdk) (Right_DoubleQuote "\"") (",\n") (" path = ") (Right_DoubleQuote "\"") (${ VSub_Name ANDROID_SDK_PATH) (Right_DoubleQuote "\"") (",\n") (" build_tools_version = ") (Right_DoubleQuote "\"") (BracedVarSub token: <VSub_Name ANDROID_SDK_BUILD_TOOLS_VERSION> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(22.0.1)}) spids: [529 533] ) (Right_DoubleQuote "\"") (",\n") (" api_level = ") (BracedVarSub token: <VSub_Name ANDROID_SDK_API_LEVEL> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(21)}) spids: [537 541] ) (",\n") (")\n") ("\n") ("bind(\n") (" name = ") (Right_DoubleQuote "\"") (android_sdk_for_testing) (Right_DoubleQuote "\"") (",\n") (" actual = ") (Right_DoubleQuote "\"") ("@androidsdk//:files") (Right_DoubleQuote "\"") (",\n") (")\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [511] ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} { (DQ (BracedVarSub token: <VSub_Name ANDROID_NDK_PATH> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )}) spids: [565 568] ) ) } {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {(WORKSPACE)} spids: [579] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("android_ndk_repository(\n") (" name = ") (Right_DoubleQuote "\"") (androidndk) (Right_DoubleQuote "\"") (",\n") (" path = ") (Right_DoubleQuote "\"") (${ VSub_Name ANDROID_NDK_PATH) (Right_DoubleQuote "\"") (",\n") (" api_level = ") (BracedVarSub token: <VSub_Name ANDROID_NDK_API_LEVEL> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(21)} ) spids: [599 603] ) (",\n") (")\n") ("\n") ("bind(\n") (" name = ") (Right_DoubleQuote "\"") (android_ndk_for_testing) (Right_DoubleQuote "\"") (",\n") (" actual = ") (Right_DoubleQuote "\"") ("@androidndk//:files") (Right_DoubleQuote "\"") (",\n") (")\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [582] ) ] ) ] spids: [-1 574] ) ] spids: [-1 620] ) ] spids: [-1 471] ) ] spids: [-1 623] ) ] spids: [440] ) spids: [434 439] ) (FuncDef name: bazel_build body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:release_label) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_full_release_name)})]) left_token: <Left_CommandSub "$("> spids: [653 655] ) ) } spids: [651] ) ] spids: [649] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:embed_label_opts) op: Equal rhs: {(SQ )} spids: [661] ) ] spids: [659] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} {(DQ (${ VSub_Name release_label))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (C {(export)} {(Lit_VarLike "EMBED_LABEL=") (DQ (${ VSub_Name release_label))}) ] spids: [-1 680] ) ] spids: [-1 693] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_EqualTilde left: { (DQ (BracedVarSub token: <VSub_Name JAVA_VERSION> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )}) spids: [702 705] ) ) } right: {(Lit_Other "^") ("(") (1) (EscapedLiteralPart token: <Lit_EscapedChar "\\."> ) (")") (Lit_Other "?") (7) (Lit_Other "$") } ) ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:JAVA_VERSION) op: Equal rhs: {(1.7)} spids: [725] ) ] spids: [725] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:release_label) op: Equal rhs: {(DQ (${ VSub_Name release_label) (-jdk7))} spids: [729] ) ] spids: [729] ) ] spids: [-1 722] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:JAVA_VERSION) op: Equal rhs: {(1.8)} spids: [741] ) ] spids: [741] ) ] spids: [738 745] ) (C {(setup_android_repositories)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:retCode) op:Equal rhs:{(0)} spids:[752])] spids: [752] ) (AndOr children: [ (C {(${ VSub_Name BUILD_SCRIPT_PATH)} { (BracedVarSub token: <VSub_Name BAZEL_COMPILE_TARGET> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(all)}) spids: [760 764] ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:retCode) op: Equal rhs: {($ VSub_QMark "$?")} spids: [768] ) ] spids: [768] ) ] op_id: Op_DPipe ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child: (ArithBinary op_id: Arith_DAmp left: (ArithBinary op_id: Arith_NEqual left: (ArithWord w:{($ VSub_Name "$retCode")}) right: (ArithWord w:{(Lit_Digits 0)}) ) right: (ArithBinary op_id: Arith_NEqual left: (ArithWord w:{($ VSub_Name "$retCode")}) right: (ArithWord w:{(Lit_Digits 3)}) ) ) ) terminator: <Op_Semi ";"> ) ] action: [(C {(exit)} {($ VSub_Name "$retCode")})] spids: [-1 799] ) ] spids: [-1 807] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:ARGS) op:Equal rhs:{(SQ )} spids:[817])] spids: [815] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_Name "$PLATFORM")} right: {(DQ (darwin))} ) ) (Pipeline children: [ (SimpleCommand words: [{(xcodebuild)} {(-showsdks)}] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [842] ) ] ) (C {(grep)} {(-q)} {(SQ <"\\-sdk iphonesimulator">)}) ] negated: False ) ] op_id: Op_DAmp ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ARGS) op: Equal rhs: {(DQ ("--define IPHONE_SDK=1"))} spids: [860] ) ] spids: [860] ) ] spids: [-1 857] ) ] spids: [-1 866] ) (AndOr children: [ (C {(./output/bazel)} {(--bazelrc) (Lit_Other "=") (BracedVarSub token: <VSub_Name BAZELRC> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(Lit_Slash /) (dev) (Lit_Slash /) (null)} ) spids: [873 880] ) } {(--nomaster_bazelrc)} {(build)} {(--embed_label) (Lit_Other "=") (${ VSub_Name release_label)} {(--stamp)} {(--workspace_status_command) (Lit_Other "=") (scripts/ci/build_status_command.sh)} {(--define)} {(Lit_VarLike "JAVA_VERSION=") (${ VSub_Name JAVA_VERSION)} {(${ VSub_Name ARGS)} {(//site) (Lit_Other ":") (jekyll-tree)} {(//scripts/packages)} ) (C {(exit)} {($ VSub_QMark "$?")}) ] op_id: Op_DPipe ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} { (DQ (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )}) spids: [942 945] ) ) } {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (C {(mkdir)} {(-p)} {($ VSub_Number "$1") (/packages)}) (C {(cp)} {(output/bazel)} {($ VSub_Number "$1") (/bazel)}) (C {(cp)} {(bazel-bin/scripts/packages/install.sh)} {($ VSub_Number "$1") (/bazel-) (${ VSub_Name release_label) (-installer.sh)} ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$PLATFORM"))} {(Lit_Other "=")} {(DQ (linux))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (C {(cp)} {(bazel-bin/scripts/packages/bazel-debian.deb)} {($ VSub_Number "$1") (/bazel_) (${ VSub_Name release_label) (.deb)} ) (C {(cp)} {(-f)} {(bazel-genfiles/scripts/packages/bazel.dsc)} {($ VSub_Number "$1") (/bazel.dsc)} ) (C {(cp)} {(-f)} {(bazel-genfiles/scripts/packages/bazel.tar.gz)} {($ VSub_Number "$1") (/bazel.tar.gz)} ) ] spids: [-1 1003] ) ] spids: [-1 1038] ) (C {(cp)} {(bazel-genfiles/site/jekyll-tree.tar)} {($ VSub_Number "$1") (/www.bazel.build.tar)} ) (C {(cp)} {(bazel-genfiles/scripts/packages/README.md)} {($ VSub_Number "$1") (/README.md)} ) ] spids: [-1 951] ) ] spids: [-1 1057] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithWord w:{($ VSub_Name "$retCode")})) terminator: <Op_Semi ";"> ) ] action: [(C {(export)} {(Lit_VarLike "BUILD_UNSTABLE=") (1)})] spids: [-1 1071] ) ] spids: [-1 1080] ) ] spids: [646] ) spids: [640 645] ) (FuncDef name: generate_from_template body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:value) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [1108] ) ] spids: [1106] ) (C {(shift)}) (While cond: [ (Sentence child: (DParen child: (ArithBinary op_id: Arith_GreatEqual left: (ArithWord w:{($ VSub_Pound "$#")}) right: (ArithWord w:{(Lit_Digits 2)}) ) ) terminator: <Op_Semi ";"> ) ] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:value) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name value> suffix_op: (PatSub pat: {($ VSub_Number "$1")} replace: {($ VSub_Number "$2")} do_all: True do_prefix: False do_suffix: False ) spids: [1136 1143] ) ) } spids: [1134] ) ] spids: [1134] ) (C {(shift)} {(2)}) ] spids: [1131 1152] ) ) (C {(echo)} {(DQ (${ VSub_Name value))}) ] spids: [1103] ) spids: [1097 1102] ) (FuncDef name: generate_email body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:release_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(get_release_name)})]) left_token: <Left_CommandSub "$("> spids: [1190 1192] ) } spids: [1189] ) ] spids: [1187] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:rc) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(get_release_candidate)})]) left_token: <Left_CommandSub "$("> spids: [1198 1200] ) } spids: [1197] ) ] spids: [1195] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:args) op: Equal rhs: { (ArrayLiteralPart words: [ {(DQ ("%release_name%"))} {(DQ (${ VSub_Name release_name))} {(DQ ("%rc%"))} {(DQ (${ VSub_Name rc))} {(DQ ("%relnotes%"))} { (DQ ("# ") (CommandSubPart command_list: (CommandList children:[(C {(git_commit_msg)})]) left_token: <Left_CommandSub "$("> spids: [1237 1239] ) ) } ] ) } spids: [1205] ) ] spids: [1203] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} {(DQ (${ VSub_Name rc))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:args) op: PlusEqual rhs: { (ArrayLiteralPart words: [ {(DQ ("%url%"))} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(generate_from_template)} {(DQ (${ VSub_Name RELEASE_CANDIDATE_URL))} {(DQ (BracedVarSub token:<VSub_Name args> bracket_op:(WholeArray op_id:Lit_At) spids:[12841289]))} ) ] ) left_token: <Left_CommandSub "$("> spids: [1274 1291] ) ) } ] ) } spids: [1264] ) ] spids: [1264] ) (C {(generate_from_template)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(cat)} {(${ VSub_Name EMAIL_TEMPLATE_RC)})] ) left_token: <Left_CommandSub "$("> spids: [1301 1307] ) ) } {(DQ (BracedVarSub token:<VSub_Name args> bracket_op:(WholeArray op_id:Lit_At) spids:[13111316]))} ) ] spids: [-1 1261] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} {(DQ (${ VSub_Name release_name))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:args) op: PlusEqual rhs: { (ArrayLiteralPart words: [ {(DQ ("%url%"))} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(generate_from_template)} {(DQ (${ VSub_Name RELEASE_URL))} {(DQ (BracedVarSub token:<VSub_Name args> bracket_op:(WholeArray op_id:Lit_At) spids:[13581363]))} ) ] ) left_token: <Left_CommandSub "$("> spids: [1348 1365] ) ) } ] ) } spids: [1338] ) ] spids: [1338] ) (C {(generate_from_template)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(cat)} {(${ VSub_Name EMAIL_TEMPLATE_RELEASE)})] ) left_token: <Left_CommandSub "$("> spids: [1375 1381] ) ) } {(DQ (BracedVarSub token:<VSub_Name args> bracket_op:(WholeArray op_id:Lit_At) spids:[13851390]))} ) ] spids: [1320 1335] ) ] spids: [-1 1394] ) ] spids: [1184] ) spids: [1178 1183] ) (FuncDef name: release_to_github body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ (${ VSub_Name GIT_REPOSITORY_URL))} spids: [1434] ) ] spids: [1432] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:release_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(get_release_name)})]) left_token: <Left_CommandSub "$("> spids: [1445 1447] ) } spids: [1444] ) ] spids: [1442] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:rc) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(get_release_candidate)})]) left_token: <Left_CommandSub "$("> spids: [1453 1455] ) } spids: [1452] ) ] spids: [1450] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:release_tool) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name GITHUB_RELEASE> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: { (CommandSubPart command_list: (CommandList children: [ (AndOr children: [ (SimpleCommand words: [{(which)} {(github-release)}] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [1470] ) ] ) (C {(true)}) ] op_id: Op_DPipe ) ] ) left_token: <Left_CommandSub "$("> spids: [1465 1476] ) } ) spids: [1462 1477] ) ) } spids: [1460] ) ] spids: [1458] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:gpl_warning) op: Equal rhs: { (DQ ("\n") ("\n") ( "_Notice_: Bazel installers contain binaries licensed under the GPLv2 with\n" ) ("Classpath exception. Those installers should always be redistributed along with\n") ("the source code.\n") ("\n") ("_Security_: All our binaries are signed with our\n") ("[public key](https://bazel.build/bazel-release.pub.gpg) 48457EE0.\n") ) } spids: [1483] ) ] spids: [1481] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-x)} {(DQ (${ VSub_Name release_tool))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ("Please set GITHUB_RELEASE to the path to the github-release binary.")) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[1523])] ) (SimpleCommand words: [ {(echo)} { (DQ ( "This probably means you haven't installed https://github.com/c4milo/github-release " ) ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[1533])] ) (SimpleCommand words: [{(echo)} {(DQ ("on this machine."))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[1543])] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [-1 1514] ) ] spids: [-1 1552] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:github_repo) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name "$url"))}) (C {(sed)} {(-E)} {(SQ <"s|https?://github.com/([^/]*/[^/]*).*$|\\1|">)} ) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [1559 1575] ) ) } spids: [1557] ) ] spids: [1555] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(Lit_Other "[")} {(-n)} {(DQ (${ VSub_Name release_name))} {(Lit_Other "]")} ) (C {(Lit_Other "[")} {(-z)} {(DQ (${ VSub_Name rc))} {(Lit_Other "]")}) ] op_id: Op_DAmp ) terminator: <Op_Semi ";"> ) ] action: [ (C {(mkdir)} {(-p)} {(DQ (${ VSub_Name tmpdir) (/to-github))}) (C {(cp)} {(DQ (${ VSub_At "@"))} {(DQ (${ VSub_Name tmpdir) (/to-github))}) (C {(DQ (${ VSub_Name GITHUB_RELEASE))} {(DQ (${ VSub_Name github_repo))} {(DQ (${ VSub_Name release_name))} {(DQ )} { (DQ ("# ") (CommandSubPart command_list: (CommandList children:[(C {(git_commit_msg)})]) left_token: <Left_CommandSub "$("> spids: [1662 1664] ) (" ") (${ VSub_Name gpl_warning) ) } {(DQ (${ VSub_Name tmpdir) (/to-github/)) (SQ <"*">)} ) ] spids: [-1 1608] ) ] spids: [-1 1682] ) ] spids: [1429] ) spids: [1423 1428] ) (FuncDef name: create_index_md body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:file) op: Equal rhs: {($ VSub_Number "$1") (/__temp.md)} spids: [1705] ) ] spids: [1703] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-f)} {($ VSub_Number "$1") (/README.md)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [(C {(cat)} {($ VSub_Number "$1") (/README.md)})] spids: [-1 1722] ) ] spids: [-1 1731] ) (C {(echo)}) (C {(echo)} {(DQ ("## Index of files"))}) (C {(echo)}) (C {(echo)} {(DQ ("_Security_: All our binaries are signed with our"))}) (C {(echo)} {(DQ ("[public key](https://bazel.build/bazel-release.pub.gpg) 48457EE0."))}) (C {(echo)}) (ForEach iter_name: f iter_words: [{($ VSub_Number "$1") (/) (Lit_Other "*") (.sha256)}] do_arg_iter: False body: (DoGroup children: [ (Sentence child: (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:filename) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(basename)} {($ VSub_Name "$f")} {(.sha256)})] ) left_token: <Left_CommandSub "$("> spids: [1793 1799] ) } spids: [1792] ) ] spids: [1790] ) terminator: <Op_Semi ";"> ) (C {(echo)} { (DQ (" - [") (${ VSub_Name filename) ("](") (${ VSub_Name filename) (") [[SHA-256](") (${ VSub_Name filename) (".sha256)] [[SIG](") (${ VSub_Name filename) (".sig)]") ) } ) ] spids: [1784 1826] ) spids: [1777 1782] ) ] spids: [1696] ) spids: [1690 1695] ) (FuncDef name: create_index_html body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:hoedown) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name HOEDOWN> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: { (CommandSubPart command_list: (CommandList children: [ (AndOr children: [ (SimpleCommand words: [{(which)} {(hoedown)}] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [1861] ) ] ) (C {(true)}) ] op_id: Op_DPipe ) ] ) left_token: <Left_CommandSub "$("> spids: [1856 1867] ) } ) spids: [1853 1868] ) ) } spids: [1851] ) ] spids: [1849] ) (Pipeline children: [ (C {(create_index_md)} {(DQ (${ VSub_At "@"))}) (C {(sed)} {(-E)} {(SQ <"s/^(Baseline.*)$/\\1\\\n"> </>)}) (C {(sed)} {(SQ <"s/^ + / - /">)}) (C {(sed)} {(SQ <"s/_/\\\\_/g">)}) (C {(DQ (${ VSub_Name hoedown))}) ] negated: False ) ] spids: [1846] ) spids: [1840 1845] ) (FuncDef name: get_gsutil body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:gs) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name GSUTIL> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: { (CommandSubPart command_list: (CommandList children: [ (AndOr children: [ (SimpleCommand words: [{(which)} {(gsutil)}] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [1947] ) ] ) (C {(true)}) ] op_id: Op_DPipe ) ] ) left_token: <Left_CommandSub "$("> spids: [1942 1953] ) (" -m") } ) spids: [1939 1955] ) ) } spids: [1937] ) ] spids: [1935] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-x)} {(DQ (${ VSub_Name gs))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ("Please set GSUTIL to the path the gsutil binary."))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[1985])] ) (SimpleCommand words: [ {(echo)} {(DQ ("gsutil (https://cloud.google.com/storage/docs/gsutil/) is the"))} ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[1995])] ) (SimpleCommand words: [{(echo)} {(DQ ("command-line interface to google cloud."))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[2005])] ) (C {(exit)} {(1)}) ] spids: [-1 1976] ) ] spids: [-1 2014] ) (C {(echo)} {(DQ (${ VSub_Name gs))}) ] spids: [1932] ) spids: [1926 1931] ) (FuncDef name: release_to_gcs body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:gs) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_gsutil)})]) left_token: <Left_CommandSub "$("> spids: [2059 2061] ) ) } spids: [2057] ) ] spids: [2055] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:release_name) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_release_name)})]) left_token: <Left_CommandSub "$("> spids: [2069 2071] ) ) } spids: [2067] ) ] spids: [2065] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:rc) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_release_candidate)})]) left_token: <Left_CommandSub "$("> spids: [2079 2081] ) ) } spids: [2077] ) ] spids: [2075] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-z)} { (DQ (BracedVarSub token: <VSub_Name GCS_BUCKET> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )}) spids: [2092 2095] ) ) } {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ( "Please set GCS_BUCKET to the name of your Google Cloud Storage bucket." ) ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[2110])] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [-1 2101] ) ] spids: [-1 2119] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(Lit_Other "[")} {(-n)} {(DQ (${ VSub_Name release_name))} {(Lit_Other "]")} ) (C {(Lit_Other "[")} {(-n)} {(DQ (${ VSub_Name rc))} {(Lit_Other "]")}) ] op_id: Op_DAmp ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:dir) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(mktemp)} {(-d)} { (BracedVarSub token: <VSub_Name TMPDIR> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(Lit_Slash /) (tmp)} ) spids: [2167 2172] ) (/tmp.XXXXXXXX) } ) ] ) left_token: <Left_CommandSub "$("> spids: [2162 2174] ) ) } spids: [2160] ) ] spids: [2158] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:prev_dir) op: Equal rhs: {(DQ ($ VSub_Name "$PWD"))} spids: [2180] ) ] spids: [2178] ) (C {(trap)} { (DQ ("{ cd ") (${ VSub_Name prev_dir) ("; rm -fr ") (${ VSub_Name dir) ("; }")) } {(EXIT)} ) (C {(mkdir)} {(-p)} { (DQ (${ VSub_Name dir) (/) (${ VSub_Name release_name) (/rc) (${ VSub_Name rc)) } ) (C {(cp)} {(DQ (${ VSub_At "@"))} { (DQ (${ VSub_Name dir) (/) (${ VSub_Name release_name) (/rc) (${ VSub_Name rc)) } ) (SimpleCommand words: [ {(create_index_html)} { (DQ (${ VSub_Name dir) (/) (${ VSub_Name release_name) (/rc) (${ VSub_Name rc)) } ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: { (DQ (${ VSub_Name dir) (/) (${ VSub_Name release_name) (/rc) (${ VSub_Name rc) ) (/index.html) } spids: [2267] ) ] ) (C {(cd)} {(${ VSub_Name dir)}) (C {(DQ (${ VSub_Name gs))} {(cp)} {(-a)} {(public-read)} {(-r)} {(.)} {(DQ ("gs://") (${ VSub_Name GCS_BUCKET))} ) (C {(cd)} {(DQ (${ VSub_Name prev_dir))}) (C {(rm)} {(-fr)} {(DQ (${ VSub_Name dir))}) (C {(trap)} {(-)} {(EXIT)}) ] spids: [-1 2151] ) ] spids: [-1 2342] ) ] spids: [2052] ) spids: [2046 2051] ) (FuncDef name: ensure_gpg_secret_key_imported body: (BraceGroup children: [ (AndOr children: [ (Subshell child: (Pipeline children: [ (C {(gpg)} {(--list-secret-keys)}) (SimpleCommand words: [{(grep)} {(DQ (${ VSub_Name APT_GPG_KEY_ID))}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/dev/null)} spids: [2371] ) ] ) ] negated: False ) spids: [2356 2374] ) (C {(gpg)} {(--allow-secret-key-import)} {(--import)} {(DQ (${ VSub_Name APT_GPG_KEY_PATH))} ) ] op_id: Op_DPipe ) ] spids: [2353] ) spids: [2347 2352] ) (FuncDef name: create_apt_repository body: (BraceGroup children: [ (C {(mkdir)} {(conf)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(conf/distributions)} spids: [2411] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("Origin: Bazel Authors\n") ("Label: Bazel\n") ("Codename: stable\n") ("Architectures: amd64 source\n") ("Components: jdk1.7 jdk1.8\n") ("Description: Bazel APT Repository\n") ("DebOverride: override.stable\n") ("DscOverride: override.stable\n") ("SignWith: ") (${ VSub_Name APT_GPG_KEY_ID) ("\n") ("\n") ("Origin: Bazel Authors\n") ("Label: Bazel\n") ("Codename: testing\n") ("Architectures: amd64 source\n") ("Components: jdk1.7 jdk1.8\n") ("Description: Bazel APT Repository\n") ("DebOverride: override.testing\n") ("DscOverride: override.testing\n") ("SignWith: ") (${ VSub_Name APT_GPG_KEY_ID) ("\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [2415] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(conf/options)} spids: [2449] ) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("verbose\n") ("ask-passphrase\n") ("basedir .\n"))} do_expansion: True here_end: EOF was_filled: True spids: [2453] ) ] ) (C {(touch)} {(conf/override.stable)}) (C {(touch)} {(conf/override.testing)}) (C {(ensure_gpg_secret_key_imported)}) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:distribution) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [2478] ) ] spids: [2476] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:deb_pkg_name_jdk8) op: Equal rhs: {(DQ ($ VSub_Number "$2"))} spids: [2486] ) ] spids: [2484] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:deb_pkg_name_jdk7) op: Equal rhs: {(DQ ($ VSub_Number "$3"))} spids: [2494] ) ] spids: [2492] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:deb_dsc_name) op: Equal rhs: {(DQ ($ VSub_Number "$4"))} spids: [2502] ) ] spids: [2500] ) (C {(debsign)} {(-k)} {(${ VSub_Name APT_GPG_KEY_ID)} {(DQ (${ VSub_Name deb_dsc_name))}) (C {(reprepro)} {(-C)} {(jdk1.8)} {(includedeb)} {(DQ (${ VSub_Name distribution))} {(DQ (${ VSub_Name deb_pkg_name_jdk8))} ) (C {(reprepro)} {(-C)} {(jdk1.8)} {(includedsc)} {(DQ (${ VSub_Name distribution))} {(DQ (${ VSub_Name deb_dsc_name))} ) (C {(reprepro)} {(-C)} {(jdk1.7)} {(includedeb)} {(DQ (${ VSub_Name distribution))} {(DQ (${ VSub_Name deb_pkg_name_jdk7))} ) (C {(reprepro)} {(-C)} {(jdk1.7)} {(includedsc)} {(DQ (${ VSub_Name distribution))} {(DQ (${ VSub_Name deb_dsc_name))} ) (C {(DQ (${ VSub_Name gs))} {(-m)} {(cp)} {(-a)} {(public-read)} {(-r)} {(dists)} {(DQ ("gs://") (${ VSub_Name GCS_APT_BUCKET) (/))} ) (C {(DQ (${ VSub_Name gs))} {(-m)} {(cp)} {(-a)} {(public-read)} {(-r)} {(pool)} {(DQ ("gs://") (${ VSub_Name GCS_APT_BUCKET) (/))} ) ] spids: [2401] ) spids: [2395 2400] ) (FuncDef name: release_to_apt body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:gs) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_gsutil)})]) left_token: <Left_CommandSub "$("> spids: [2679 2681] ) ) } spids: [2677] ) ] spids: [2675] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:release_name) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_release_name)})]) left_token: <Left_CommandSub "$("> spids: [2689 2691] ) ) } spids: [2687] ) ] spids: [2685] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:rc) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_release_candidate)})]) left_token: <Left_CommandSub "$("> spids: [2699 2701] ) ) } spids: [2697] ) ] spids: [2695] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-z)} { (DQ (BracedVarSub token: <VSub_Name GCS_APT_BUCKET> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )}) spids: [2712 2715] ) ) } {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ( "Please set GCS_APT_BUCKET to the name of your GCS bucket for apt repository." ) ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[2730])] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [-1 2721] ) ] spids: [-1 2739] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-z)} { (DQ (BracedVarSub token: <VSub_Name APT_GPG_KEY_ID> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )}) spids: [2749 2752] ) ) } {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ("Please set APT_GPG_KEY_ID for apt repository."))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[2767])] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [-1 2758] ) ] spids: [-1 2776] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} {(DQ (${ VSub_Name release_name))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:dir) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(mktemp)} {(-d)} { (BracedVarSub token: <VSub_Name TMPDIR> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(Lit_Slash /) (tmp)} ) spids: [2810 2815] ) (/tmp.XXXXXXXX) } ) ] ) left_token: <Left_CommandSub "$("> spids: [2805 2817] ) ) } spids: [2803] ) ] spids: [2801] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:prev_dir) op: Equal rhs: {(DQ ($ VSub_Name "$PWD"))} spids: [2823] ) ] spids: [2821] ) (C {(trap)} { (DQ ("{ cd ") (${ VSub_Name prev_dir) ("; rm -fr ") (${ VSub_Name dir) ("; }")) } {(EXIT)} ) (C {(mkdir)} {(-p)} {(DQ (${ VSub_Name dir) (/) (${ VSub_Name release_name))}) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:release_label) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(get_full_release_name)})] ) left_token: <Left_CommandSub "$("> spids: [2865 2867] ) ) } spids: [2863] ) ] spids: [2861] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:deb_pkg_name_jdk8) op: Equal rhs: { (DQ (${ VSub_Name release_name) (/bazel_) (${ VSub_Name release_label) (-linux-x86_64.deb) ) } spids: [2873] ) ] spids: [2871] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:deb_pkg_name_jdk7) op: Equal rhs: { (DQ (${ VSub_Name release_name) (/bazel_) (${ VSub_Name release_label) (-jdk7-linux-x86_64.deb) ) } spids: [2888] ) ] spids: [2886] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:deb_dsc_name) op: Equal rhs: { (DQ (${ VSub_Name release_name) (/bazel_) (CommandSubPart command_list: (CommandList children:[(C {(get_release_name)})]) left_token: <Left_CommandSub "$("> spids: [2909 2911] ) (.dsc) ) } spids: [2903] ) ] spids: [2901] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:deb_tar_name) op: Equal rhs: { (DQ (${ VSub_Name release_name) (/bazel_) (CommandSubPart command_list: (CommandList children:[(C {(get_release_name)})]) left_token: <Left_CommandSub "$("> spids: [2924 2926] ) (.tar.gz) ) } spids: [2918] ) ] spids: [2916] ) (C {(cp)} { (DQ (${ VSub_Name tmpdir) (/bazel_) (${ VSub_Name release_label) (-linux-x86_64.deb) ) } {(DQ (${ VSub_Name dir) (/) (${ VSub_Name deb_pkg_name_jdk8))} ) (C {(cp)} { (DQ (${ VSub_Name tmpdir) (/bazel_) (${ VSub_Name release_label) (-jdk7-linux-x86_64.deb) ) } {(DQ (${ VSub_Name dir) (/) (${ VSub_Name deb_pkg_name_jdk7))} ) (C {(cp)} {(DQ (${ VSub_Name tmpdir) (/bazel.dsc))} {(DQ (${ VSub_Name dir) (/) (${ VSub_Name deb_dsc_name))} ) (C {(cp)} {(DQ (${ VSub_Name tmpdir) (/bazel.tar.gz))} {(DQ (${ VSub_Name dir) (/) (${ VSub_Name deb_tar_name))} ) (C {(cd)} {(DQ (${ VSub_Name dir))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} {(DQ (${ VSub_Name rc))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (C {(create_apt_repository)} {(testing)} {(DQ (${ VSub_Name deb_pkg_name_jdk8))} {(DQ (${ VSub_Name deb_pkg_name_jdk7))} {(DQ (${ VSub_Name deb_dsc_name))} ) ] spids: [-1 3043] ) ] else_action: [ (C {(create_apt_repository)} {(stable)} {(DQ (${ VSub_Name deb_pkg_name_jdk8))} {(DQ (${ VSub_Name deb_pkg_name_jdk7))} {(DQ (${ VSub_Name deb_dsc_name))} ) ] spids: [3069 3095] ) (C {(cd)} {(DQ (${ VSub_Name prev_dir))}) (C {(rm)} {(-fr)} {(DQ (${ VSub_Name dir))}) (C {(trap)} {(-)} {(EXIT)}) ] spids: [-1 2794] ) ] spids: [-1 3125] ) ] spids: [2672] ) spids: [2666 2671] ) (FuncDef name: deploy_release body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:github_args) op: Equal rhs: {(ArrayLiteralPart)} spids: [3144] ) ] spids: [3142] ) (ForEach iter_name: i iter_words: [{(DQ ($ VSub_At "$@"))}] do_arg_iter: False body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (Subshell child: (AndOr children: [ (DBracket expr: (BoolBinary op_id: BoolBinary_EqualTilde left: {(DQ ($ VSub_Name "$i"))} right: {(README.md) (Lit_Other "$")} ) ) (AndOr children: [ (DBracket expr: (BoolBinary op_id: BoolBinary_EqualTilde left: {(DQ ($ VSub_Name "$i"))} right: {(bazel.dsc)} ) ) (DBracket expr: (BoolBinary op_id: BoolBinary_EqualTilde left: {(DQ ($ VSub_Name "$i"))} right: {(bazel.tar.gz)} ) ) ] op_id: Op_DPipe ) ] op_id: Op_DPipe ) spids: [3171 3214] ) ] negated: True ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:github_args) op: PlusEqual rhs: {(ArrayLiteralPart words:[{(DQ ($ VSub_Name "$i"))}])} spids: [3221] ) ] spids: [3221] ) ] spids: [-1 3218] ) ] spids: [-1 3229] ) ] spids: [3164 3232] ) spids: [3158 3162] ) (C {(release_to_github)} { (DQ (BracedVarSub token: <VSub_Name github_args> bracket_op: (WholeArray op_id:Lit_At) spids: [3238 3243] ) ) } ) (C {(release_to_gcs)} {(DQ ($ VSub_At "$@"))}) (C {(release_to_apt)}) ] spids: [3139] ) spids: [3133 3138] ) (FuncDef name: bazel_release body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:README) op: Equal rhs: {($ VSub_Number "$2") (/README.md)} spids: [3309] ) ] spids: [3307] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tmpdir) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(mktemp)} {(-d)} { (BracedVarSub token: <VSub_Name TMPDIR> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(Lit_Slash /) (tmp)} ) spids: [3320 3325] ) (/tmp.XXXXXXXX) } ) ] ) left_token: <Left_CommandSub "$("> spids: [3315 3327] ) } spids: [3314] ) ] spids: [3314] ) (C {(trap)} {(SQ <"rm -fr ${tmpdir}">)} {(EXIT)}) (C {(ensure_gpg_secret_key_imported)}) (While cond: [ (Sentence child: (DParen child: (ArithBinary op_id: Arith_Great left: (ArithWord w:{($ VSub_Pound "$#")}) right: (ArithWord w:{(Lit_Digits 1)}) ) ) terminator: <Op_Semi ";"> ) ] body: (DoGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:platform) op: Equal rhs: {($ VSub_Number "$1")} spids: [3362] ) ] spids: [3360] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:folder) op: Equal rhs: {($ VSub_Number "$2")} spids: [3368] ) ] spids: [3366] ) (C {(shift)} {(2)}) (ForEach iter_name: file iter_words: [{($ VSub_Name "$folder") (/) (Lit_Other "*")}] do_arg_iter: False body: (DoGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:filename) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(basename)} {($ VSub_Name "$file")})] ) left_token: <Left_CommandSub "$("> spids: [3394 3398] ) } spids: [3393] ) ] spids: [3391] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$filename"))} {(KW_Bang "!") (Lit_Other "=")} {(README.md)} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$filename"))} {(Lit_Other "=") (Lit_Other "=")} {(DQ (bazel.dsc))} {(Lit_Other "]")} ) (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$filename"))} {(Lit_Other "=") (Lit_Other "=")} {(DQ (bazel.tar.gz))} {(Lit_Other "]")} ) ] op_id: Op_DPipe ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:destfile) op: Equal rhs: {(${ VSub_Name tmpdir) (/) ($ VSub_Name "$filename") } spids: [3461] ) ] spids: [3459] ) ] spids: [-1 3456] ) (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_EqualTilde left: {(DQ ($ VSub_Name "$file"))} right: {(/) ("(") (Lit_Other "[") (Lit_Other "^") (/) (Lit_Other "]") (Lit_Other "*") (")") ("(") (EscapedLiteralPart token:<Lit_EscapedChar "\\.">) (Lit_Other "[") (Lit_Other "^") (EscapedLiteralPart token:<Lit_EscapedChar "\\.">) (/) (Lit_Other "]") (Lit_Other "+") (")") (Lit_Other "$") } ) ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:destfile) op: Equal rhs: {(${ VSub_Name tmpdir) (/) (BracedVarSub token: <VSub_Name BASH_REMATCH> bracket_op: (ArrayIndex expr: (ArithWord w:{(Lit_Digits 1)}) ) spids: [3511 3516] ) (-) (${ VSub_Name platform) (BracedVarSub token: <VSub_Name BASH_REMATCH> bracket_op: (ArrayIndex expr: (ArithWord w:{(Lit_Digits 2)}) ) spids: [3521 3526] ) } spids: [3506] ) ] spids: [3504] ) ] spids: [3469 3501] ) ] else_action: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:destfile) op: Equal rhs: {(${ VSub_Name tmpdir) (/) ($ VSub_Name "$filename") (-) (${ VSub_Name platform) } spids: [3534] ) ] spids: [3532] ) ] spids: [3529 3546] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(KW_Bang "!")} {(-f)} {(DQ ($ VSub_Name "$destfile"))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (C {(mv)} {($ VSub_Name "$file")} {($ VSub_Name "$destfile")} ) (SimpleCommand words: [{(checksum)} {($ VSub_Name "$destfile")}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$destfile") (.sha256)} spids: [3586] ) ] ) (C {(gpg)} {(--no-tty)} {(--detach-sign)} {(-u)} {(DQ (${ VSub_Name APT_GPG_KEY_ID))} {(DQ ($ VSub_Name "$destfile"))} ) ] spids: [-1 3572] ) ] spids: [-1 3611] ) ] spids: [-1 3417] ) ] spids: [-1 3614] ) ] spids: [3388 3617] ) spids: [3382 3386] ) ] spids: [3357 3620] ) ) (C {(deploy_release)} {($ VSub_Name "$README")} { (CommandSubPart command_list: (CommandList children: [(C {(find)} {(${ VSub_Name tmpdir)} {(-type)} {(f)})] ) left_token: <Left_CommandSub "$("> spids: [3627 3637] ) } ) (C {(export)} {(Lit_VarLike "RELEASE_EMAIL=") (DQ (CommandSubPart command_list: (CommandList children:[(C {(generate_email)})]) left_token: <Left_CommandSub "$("> spids: [3645 3647] ) ) } ) (C {(export)} {(Lit_VarLike "RELEASE_EMAIL_RECIPIENT=") (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name RELEASE_EMAIL))}) (C {(head)} {(-1)}) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [3656 3670] ) ) } ) (C {(export)} {(Lit_VarLike "RELEASE_EMAIL_SUBJECT=") (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name RELEASE_EMAIL))}) (C {(head)} {(-2)}) (C {(tail)} {(-1)}) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [3678 3698] ) ) } ) (C {(export)} {(Lit_VarLike "RELEASE_EMAIL_CONTENT=") (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name RELEASE_EMAIL))}) (C {(tail)} {(-n)} {(Lit_Other "+") (3)}) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [3706 3723] ) ) } ) ] spids: [3304] ) spids: [3298 3303] ) (FuncDef name: build_and_publish_site body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tmpdir) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(mktemp)} {(-d)} { (BracedVarSub token: <VSub_Name TMPDIR> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(Lit_Slash /) (tmp)} ) spids: [3759 3764] ) (/tmp.XXXXXXXX) } ) ] ) left_token: <Left_CommandSub "$("> spids: [3754 3766] ) } spids: [3753] ) ] spids: [3753] ) (C {(trap)} {(SQ <"rm -fr ${tmpdir}">)} {(EXIT)}) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:gs) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_gsutil)})]) left_token: <Left_CommandSub "$("> spids: [3782 3784] ) ) } spids: [3780] ) ] spids: [3778] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:site) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [3790] ) ] spids: [3788] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:bucket) op: Equal rhs: {(DQ ($ VSub_Number "$2"))} spids: [3798] ) ] spids: [3796] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(Lit_Other "[")} {(KW_Bang "!")} {(-f)} {(DQ (${ VSub_Name site))} {(Lit_Other "]")} ) (C {(Lit_Other "[")} {(-z)} {(DQ (${ VSub_Name bucket))} {(Lit_Other "]")}) ] op_id: Op_DPipe ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ("Usage: build_and_publish_site <site-tarball> <bucket>"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[3845])] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [-1 3836] ) ] spids: [-1 3854] ) (C {(tar)} {(xf)} {(DQ (${ VSub_Name site))} {(--exclude) (Lit_Other "=") (CNAME)} {(-C)} {(DQ (${ VSub_Name tmpdir))} ) (C {(jekyll)} {(build)} {(-s)} {(DQ (${ VSub_Name tmpdir))} {(-d)} {(DQ (${ VSub_Name tmpdir) (/production))} ) (C {(DQ (${ VSub_Name gs))} {(rsync)} {(-r)} {(-c)} {(DQ (${ VSub_Name tmpdir) (/production))} {(DQ ("gs://") (${ VSub_Name bucket))} ) (C {(DQ (${ VSub_Name gs))} {(web)} {(set)} {(-m)} {(index.html)} {(-e)} {(404.html)} {(DQ ("gs://") (${ VSub_Name bucket))} ) (C {(DQ (${ VSub_Name gs))} {(-m)} {(acl)} {(ch)} {(-R)} {(-u)} {(AllUsers) (Lit_Other ":") (R)} {(DQ ("gs://") (${ VSub_Name bucket))} ) ] spids: [3750] ) spids: [3744 3749] ) ] )