(CommandList children: [ (C {(set)} {(-e)}) (C {(set)} {(-o)} {(pipefail)}) (FuncDef name: usage body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[52]) (HereDoc op_id: Redir_DLess fd: 16777215 body: {('To run, I need:\n') ( '- to be in a container generated by the Dockerfile at the top of the Docker\n' ) (' repository;\n') ('- to be provided with the location of an S3 bucket and path, in\n') ( " environment variables AWS_S3_BUCKET and AWS_S3_BUCKET_PATH (default: '');\n" ) ('- to be provided with AWS credentials for this S3 bucket, in environment\n') (' variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY;\n') ('- a generous amount of good will and nice manners.\n') ( 'The canonical way to run me is to run the image produced by the Dockerfile: e.g.:"\n' ) ('\n') ('docker run -e AWS_S3_BUCKET=test.docker.com \\\n') (' -e AWS_ACCESS_KEY_ID \\\n') (' -e AWS_SECRET_ACCESS_KEY \\\n') (' -e AWS_DEFAULT_REGION \\\n') (' -it --privileged \\\n') (' docker ./hack/release.sh\n') } do_expansion: False here_end: EOF was_filled: True spids: [55] ) ] ) (C {(exit)} {(1)}) ] spids: [47] ) spids: [43 46] ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$AWS_S3_BUCKET'))} {(Lit_Other ']')}) (C {(usage)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$AWS_ACCESS_KEY_ID'))} {(Lit_Other ']')}) (C {(usage)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$AWS_SECRET_ACCESS_KEY'))} {(Lit_Other ']')}) (C {(usage)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(Lit_Other '[')} {(-d)} {(/go/src/github.com/docker/docker)} {(Lit_Other ']')}) (C {(usage)}) ] op_id: Op_DPipe ) (C {(cd)} {(/go/src/github.com/docker/docker)}) (AndOr children: [(C {(Lit_Other '[')} {(-x)} {(hack/make.sh)} {(Lit_Other ']')}) (C {(usage)})] op_id: Op_DPipe ) (C {(export)} {(AWS_DEFAULT_REGION)}) (C {(Lit_Other ':')} { (BracedVarSub token: <VSub_Name AWS_DEFAULT_REGION> suffix_op: (StringUnary op_id:VTest_ColonEquals arg_word:{(us-west-1)}) spids: [139 143] ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:AWS_CLI) op: Equal rhs: { (BracedVarSub token: <VSub_Name AWS_CLI> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ <aws>)}) spids: [147 153] ) } spids: [146] ) ] spids: [146] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RELEASE_BUNDLES) op: Equal rhs: {(ArrayLiteralPart words:[{(binary)} {(cross)} {(tgz)}])} spids: [156] ) ] spids: [156] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(SQ <--release-regardless-of-test-failure>)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RELEASE_BUNDLES) op: Equal rhs: { (ArrayLiteralPart words: [ {(test-unit)} { (DQ (BracedVarSub token: <VSub_Name RELEASE_BUNDLES> bracket_op: (WholeArray op_id:Lit_At) spids: [200 205] ) ) } {(test-integration)} ] ) } spids: [192] ) ] spids: [192] ) ] spids: [16777215 189] ) ] spids: [16777215 214] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:VERSION) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(VERSION)} spids: [219] ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [218 222] ) } spids: [217] ) ] spids: [217] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BUCKET) op: Equal rhs: {($ VSub_Name '$AWS_S3_BUCKET')} spids: [224] ) ] spids: [224] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BUCKET_PATH) op: Equal rhs: {($ VSub_Name '$BUCKET')} spids: [227] ) ] spids: [227] ) (AndOr children: [ (DBracket expr: (BoolUnary op_id:BoolUnary_n child:{(DQ ($ VSub_Name '$AWS_S3_BUCKET_PATH'))}) ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BUCKET_PATH) op: PlusEqual rhs: {(/) ($ VSub_Name '$AWS_S3_BUCKET_PATH')} spids: [242] ) ] spids: [242] ) ] op_id: Op_DAmp ) (If arms: [ (if_arm cond: [ (Sentence child:(C {(command)} {(-v)} {(git)}) terminator:<Op_Amp '&'>) (Sentence child: (AndOr children: [ (SimpleCommand redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [256] ) ] ) (C {(git)} {(rev-parse)}) ] op_id: Op_DAmp ) terminator: <Op_Amp '&'> ) (Sentence child: (SimpleCommand redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [267] ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-n)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(git)} {(status)} {(--porcelain)} {(--untracked-files) (Lit_Other '=') (no)} ) ] ) left_token: <Left_CommandSub '$('> spids: [282 292] ) ) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ('You cannot run the release script on a repo with uncommitted changes'))} ) (C {(usage)}) ] spids: [16777215 298] ) ] spids: [16777215 311] ) ] spids: [16777215 272] ) ] spids: [16777215 313] ) (FuncDef name: setup_s3 body: (BraceGroup children: [ (C {(echo)} {(DQ ('Setting up S3'))}) (AndOr children: [ (SimpleCommand words: [ {($ VSub_Name '$AWS_CLI')} {(s3)} {(mb)} {(DQ ('s3://') ($ VSub_Name '$BUCKET'))} ] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[361])] ) (C {(true)}) ] op_id: Op_DPipe ) (SimpleCommand words: [{($ VSub_Name '$AWS_CLI')} {(s3)} {(ls)} {(DQ ('s3://') ($ VSub_Name '$BUCKET'))}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[384])] ) (C {($ VSub_Name '$AWS_CLI')} {(s3)} {(website)} {(--index-document)} {(index)} {(--error-document)} {(error)} {(DQ ('s3://') ($ VSub_Name '$BUCKET'))} ) ] spids: [336] ) spids: [332 335] ) (FuncDef name: write_to_s3 body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DEST) op: Equal rhs: {($ VSub_Number '$1')} spids: [424] ) ] spids: [424] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:F) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(mktemp)})]) left_token: <Left_Backtick '`'> spids: [429 431] ) } spids: [428] ) ] spids: [428] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ ($ VSub_Name '$F'))} spids: [436] ) ] ) (C {($ VSub_Name '$AWS_CLI')} {(s3)} {(cp)} {(--acl)} {(public-read)} {(--content-type)} {(SQ <text/plain>)} {(DQ ($ VSub_Name '$F'))} {(DQ ($ VSub_Name '$DEST'))} ) (C {(rm)} {(-f)} {(DQ ($ VSub_Name '$F'))}) ] spids: [421] ) spids: [417 420] ) (FuncDef name: s3_url body: (BraceGroup children: [ (Case to_match: {(DQ ($ VSub_Name '$BUCKET'))} arms: [ (case_arm pat_list: [{(get.docker.com)} {(test.docker.com)} {(experimental.docker.com)}] action: [(C {(echo)} {(DQ ('https://') ($ VSub_Name '$BUCKET_PATH'))})] spids: [495 500 511 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BASE_URL) op: Equal rhs: { (DQ ('http://') (${ VSub_Name BUCKET) (.s3-website-) (${ VSub_Name AWS_DEFAULT_REGION) (.amazonaws.com) ) } spids: [518] ) ] spids: [518] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id: BoolUnary_n child: {(DQ ($ VSub_Name '$AWS_S3_BUCKET_PATH'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ($ VSub_Name '$BASE_URL') (/) ($ VSub_Name '$AWS_S3_BUCKET_PATH')) } ) ] spids: [16777215 546] ) ] else_action: [(C {(echo)} {(DQ ($ VSub_Name '$BASE_URL'))})] spids: [558 568] ) ] spids: [514 515 571 16777215] ) ] spids: [486 492 574] ) ] spids: [483] ) spids: [479 482] ) (FuncDef name: build_all body: (BraceGroup children: [ (C {(echo)} {(DQ ('Building release'))}) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(./hack/make.sh)} { (DQ (BracedVarSub token: <VSub_Name RELEASE_BUNDLES> bracket_op: (WholeArray op_id:Lit_At) spids: [600 605] ) ) } ) ] negated: True ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [{(echo)}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[614])] ) (SimpleCommand words: [{(echo)} {(SQ <'The build or tests appear to have failed.'>)}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[620])] ) (SimpleCommand words: [{(echo)}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[630])] ) (SimpleCommand words: [ {(echo)} {(SQ <'You, as the release maintainer, now have a couple options:'>)} ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[636])] ) (SimpleCommand words: [{(echo)} {(SQ <'- delay release and fix issues'>)}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[646])] ) (SimpleCommand words: [{(echo)} {(SQ <'- delay release and fix issues'>)}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[656])] ) (SimpleCommand words: [ {(echo)} {(SQ <'- did we mention how important this is? issues need fixing :)'>)} ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[666])] ) (SimpleCommand words: [{(echo)}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[676])] ) (SimpleCommand words: [ {(echo)} { (SQ < 'As a final LAST RESORT, you (because only you, the release maintainer,' > ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[682])] ) (SimpleCommand words: [ {(echo)} { (SQ < ' really knows all the hairy problems at hand with the current release' > ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[692])] ) (SimpleCommand words: [ {(echo)} { (SQ < ' issues) may bypass this checking by running this script again with the' > ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[702])] ) (SimpleCommand words: [ {(echo)} { (SQ < ' single argument of "--release-regardless-of-test-failure", which will skip' > ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[712])] ) (SimpleCommand words: [ {(echo)} { (SQ < ' running the test suite, and will only build the binaries and packages. Please' > ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[722])] ) (SimpleCommand words: [{(echo)} {(SQ <' avoid using this if at all possible.'>)}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[732])] ) (SimpleCommand words: [{(echo)}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[742])] ) (SimpleCommand words: [ {(echo)} { (SQ < 'Regardless, we cannot stress enough the scarcity with which this bypass' > ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[748])] ) (SimpleCommand words: [ {(echo)} { (SQ < ' should be used. If there are release issues, we should always err on the' > ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[758])] ) (SimpleCommand words: [{(echo)} {(SQ <' side of caution.'>)}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[768])] ) (SimpleCommand words: [{(echo)}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[778])] ) (C {(exit)} {(1)}) ] spids: [16777215 609] ) ] spids: [16777215 787] ) ] spids: [583] ) spids: [579 582] ) (FuncDef name: upload_release_build body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:src) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [799] ) ] spids: [799] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:dst) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [805] ) ] spids: [805] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:latest) op: Equal rhs: {(DQ ($ VSub_Number '$3'))} spids: [811] ) ] spids: [811] ) (C {(echo)}) (C {(echo)} {(DQ ('Uploading ') ($ VSub_Name '$src'))}) (C {(echo)} {(DQ (' to ') ($ VSub_Name '$dst'))}) (C {(echo)}) (C {($ VSub_Name '$AWS_CLI')} {(s3)} {(cp)} {(--follow-symlinks)} {(--acl)} {(public-read)} {(DQ ($ VSub_Name '$src'))} {(DQ ($ VSub_Name '$dst'))} ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$latest'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)}) (C {(echo)} {(DQ ('Copying to ') ($ VSub_Name '$latest'))}) (C {(echo)}) (C {($ VSub_Name '$AWS_CLI')} {(s3)} {(cp)} {(--acl)} {(public-read)} {(DQ ($ VSub_Name '$dst'))} {(DQ ($ VSub_Name '$latest'))} ) ] spids: [16777215 872] ) ] spids: [16777215 908] ) (ForEach iter_name: hashAlgo iter_words: [{(md5)} {(sha256)}] do_arg_iter: False body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-e)} {(DQ ($ VSub_Name '$src') (.) ($ VSub_Name '$hashAlgo'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)}) (C {(echo)} { (DQ ('Uploading ') ($ VSub_Name '$src') (.) ($ VSub_Name '$hashAlgo')) } ) (C {(echo)} {(DQ (' to ') ($ VSub_Name '$dst') (.) ($ VSub_Name '$hashAlgo'))} ) (C {(echo)}) (C {($ VSub_Name '$AWS_CLI')} {(s3)} {(cp)} {(--follow-symlinks)} {(--acl)} {(public-read)} {(--content-type) (Lit_Other '=') (SQ <text/plain>)} {(DQ ($ VSub_Name '$src') (.) ($ VSub_Name '$hashAlgo'))} {(DQ ($ VSub_Name '$dst') (.) ($ VSub_Name '$hashAlgo'))} ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$latest'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)}) (C {(echo)} { (DQ ('Copying to ') ($ VSub_Name '$latest') (.) ($ VSub_Name '$hashAlgo') ) } ) (C {(echo)}) (C {($ VSub_Name '$AWS_CLI')} {(s3)} {(cp)} {(--acl)} {(public-read)} {(DQ ($ VSub_Name '$dst') (.) ($ VSub_Name '$hashAlgo'))} {(DQ ($ VSub_Name '$latest') (.) ($ VSub_Name '$hashAlgo'))} ) ] spids: [16777215 1016] ) ] spids: [16777215 1058] ) ] spids: [16777215 945] ) ] spids: [16777215 1061] ) ] spids: [927 1064] ) spids: [921 925] ) ] spids: [796] ) spids: [792 795] ) (FuncDef name: release_build body: (BraceGroup children: [ (C {(echo)} {(DQ ('Releasing binaries'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GOOS) op: Equal rhs: {($ VSub_Number '$1')} spids: [1083] ) ] spids: [1083] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GOARCH) op: Equal rhs: {($ VSub_Number '$2')} spids: [1087] ) ] spids: [1087] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:binDir) op: Equal rhs: {(bundles/) ($ VSub_Name '$VERSION') (/cross/) ($ VSub_Name '$GOOS') (/) ($ VSub_Name '$GOARCH') } spids: [1092] ) ] spids: [1092] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tgzDir) op: Equal rhs: {(bundles/) ($ VSub_Name '$VERSION') (/tgz/) ($ VSub_Name '$GOOS') (/) ($ VSub_Name '$GOARCH') } spids: [1101] ) ] spids: [1101] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:binary) op: Equal rhs: {(docker-) ($ VSub_Name '$VERSION')} spids: [1110] ) ] spids: [1110] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:zipExt) op:Equal rhs:{(DQ (.tgz))} spids:[1115])] spids: [1115] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:binaryExt) op:Equal rhs:{(DQ )} spids:[1121])] spids: [1121] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tgz) op: Equal rhs: {($ VSub_Name '$binary') ($ VSub_Name '$zipExt')} spids: [1126] ) ] spids: [1126] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:latestBase) op:Equal rhs:{(SQ )} spids:[1132])] spids: [1132] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$NOLATEST'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:latestBase) op: Equal rhs: {(docker-latest)} spids: [1151] ) ] spids: [1151] ) ] spids: [16777215 1148] ) ] spids: [16777215 1155] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:s3Os) op: Equal rhs: {($ VSub_Name '$GOOS')} spids: [1172] ) ] spids: [1172] ) (Case to_match: {(DQ ($ VSub_Name '$s3Os'))} arms: [ (case_arm pat_list: [{(darwin)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:s3Os) op: Equal rhs: {(Darwin)} spids: [1189] ) ] spids: [1189] ) ] spids: [1185 1186 1193 16777215] ) (case_arm pat_list: [{(freebsd)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:s3Os) op: Equal rhs: {(FreeBSD)} spids: [1200] ) ] spids: [1200] ) ] spids: [1196 1197 1204 16777215] ) (case_arm pat_list: [{(linux)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:s3Os) op: Equal rhs: {(Linux)} spids: [1211] ) ] spids: [1211] ) ] spids: [1207 1208 1215 16777215] ) (case_arm pat_list: [{(solaris)}] action: [ (C {(echo)} {(skipping)} {(solaris)} {(release)}) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [1218 1219 1236 16777215] ) (case_arm pat_list: [{(windows)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:s3Os) op: Equal rhs: {(Windows)} spids: [1247] ) ] spids: [1247] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:zipExt) op: Equal rhs: {(DQ (.zip))} spids: [1251] ) ] spids: [1251] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:binaryExt) op: Equal rhs: {(DQ (.exe))} spids: [1257] ) ] spids: [1257] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tgz) op: Equal rhs: {($ VSub_Name '$binary') ($ VSub_Name '$zipExt')} spids: [1263] ) ] spids: [1263] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:binary) op: PlusEqual rhs: {($ VSub_Name '$binaryExt')} spids: [1268] ) ] spids: [1268] ) ] spids: [1239 1240 1272 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (SimpleCommand words: [ {(echo)} { (DQ ("error: can't convert ") ($ VSub_Name '$s3Os') (" to an appropriate value for 'uname -s'") ) } ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 16777215 arg_word: {(2)} spids: [1281] ) ] ) (C {(exit)} {(1)}) ] spids: [1275 1276 1296 16777215] ) ] spids: [1176 1182 1299] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:s3Arch) op: Equal rhs: {($ VSub_Name '$GOARCH')} spids: [1303] ) ] spids: [1303] ) (Case to_match: {(DQ ($ VSub_Name '$s3Arch'))} arms: [ (case_arm pat_list: [{(amd64)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:s3Arch) op: Equal rhs: {(x86_64)} spids: [1320] ) ] spids: [1320] ) ] spids: [1316 1317 1324 16777215] ) (case_arm pat_list: [{(386)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:s3Arch) op: Equal rhs: {(i386)} spids: [1331] ) ] spids: [1331] ) ] spids: [1327 1328 1335 16777215] ) (case_arm pat_list: [{(arm)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:s3Arch) op: Equal rhs: {(armel)} spids: [1342] ) ] spids: [1342] ) ] spids: [1338 1339 1350 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (SimpleCommand words: [ {(echo)} { (DQ ("error: can't convert ") ($ VSub_Name '$s3Arch') (" to an appropriate value for 'uname -m'") ) } ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 16777215 arg_word: {(2)} spids: [1359] ) ] ) (C {(exit)} {(1)}) ] spids: [1353 1354 1374 16777215] ) ] spids: [1307 1313 1377] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:s3Dir) op: Equal rhs: { (DQ ('s3://') ($ VSub_Name '$BUCKET_PATH') (/builds/) ($ VSub_Name '$s3Os') (/) ($ VSub_Name '$s3Arch') ) } spids: [1381] ) ] spids: [1381] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:latestTgz) op:Equal rhs:{(SQ )} spids:[1396])] spids: [1396] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$latestBase'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:latestTgz) op: Equal rhs: { (DQ ($ VSub_Name '$s3Dir') (/) ($ VSub_Name '$latestBase') ($ VSub_Name '$zipExt') ) } spids: [1425] ) ] spids: [1425] ) ] spids: [16777215 1410] ) ] spids: [16777215 1434] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Name '$tgzDir') (/) ($ VSub_Name '$tgz'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ("error: can't find ") ($ VSub_Name '$tgzDir') (/) ($ VSub_Name '$tgz') (' - was it packaged properly?') ) } ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 16777215 arg_word: {(2)} spids: [1460] ) ] ) (C {(exit)} {(1)}) ] spids: [16777215 1455] ) ] spids: [16777215 1477] ) (C {(upload_release_build)} {(DQ ($ VSub_Name '$tgzDir') (/) ($ VSub_Name '$tgz'))} {(DQ ($ VSub_Name '$s3Dir') (/) ($ VSub_Name '$tgz'))} {(DQ ($ VSub_Name '$latestTgz'))} ) ] spids: [1073] ) spids: [1069 1072] ) (FuncDef name: release_binaries body: (BraceGroup children: [ (AndOr children: [ (C {(Lit_Other '[')} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(find)} {(bundles/) ($ VSub_Name '$VERSION')} {(-path)} { (DQ (bundles/) ($ VSub_Name '$VERSION') ('/cross/*/*/docker-') ($ VSub_Name '$VERSION') ) } ) ] ) left_token: <Left_CommandSub '$('> spids: [1522 1536] ) ) } {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) (BraceGroup children: [ (SimpleCommand words: [{(echo)} {(SQ <'./hack/make.sh must be run before release_binaries'>)}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 16777215 arg_word: {(2)} spids: [1554] ) ] ) (C {(exit)} {(1)}) ] spids: [1549] ) ] op_id: Op_DPipe ) (ForEach iter_name: d iter_words: [ {(bundles/) ($ VSub_Name '$VERSION') (/cross/) (Lit_Other '*') (/) (Lit_Other '*')} ] do_arg_iter: False body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GOARCH) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(basename)} {(DQ ($ VSub_Name '$d'))})] ) left_token: <Left_CommandSub '$('> spids: [1590 1596] ) ) } spids: [1588] ) ] spids: [1588] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GOOS) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(basename)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {(DQ ($ VSub_Name '$d'))})] ) left_token: <Left_CommandSub '$('> spids: [1606 1612] ) ) } ) ] ) left_token: <Left_CommandSub '$('> spids: [1602 1614] ) ) } spids: [1600] ) ] spids: [1600] ) (C {(release_build)} {(DQ ($ VSub_Name '$GOOS'))} {(DQ ($ VSub_Name '$GOARCH'))}) ] spids: [1585 1629] ) spids: [1576 1583] ) (Pipeline children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('# To install, run the following commands as root:\n') ('curl -fsSLO ') (CommandSubPart command_list: (CommandList children:[(C {(s3_url)})]) left_token: <Left_CommandSub '$('> spids: [1655 1657] ) (/builds/Linux/x86_64/docker-) ($ VSub_Name '$VERSION') ('.tgz && tar --strip-components=1 -xvzf docker-') ($ VSub_Name '$VERSION') ('.tgz -C /usr/local/bin\n') ('\n') ('# Then start docker in daemon mode:\n') ('/usr/local/bin/dockerd\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [1640] ) ] ) (C {(write_to_s3)} {(s3) (Lit_Other ':') (//) ($ VSub_Name '$BUCKET_PATH') (/builds/index)} ) ] negated: False ) (AndOr children: [(C {(rm)} {(-rf)} {(/tmp/emptyfile)}) (C {(touch)} {(/tmp/emptyfile)})] op_id: Op_DAmp ) (C {($ VSub_Name '$AWS_CLI')} {(s3)} {(cp)} {(--acl)} {(public-read)} {(--website-redirect)} {(SQ </builds/>)} {(--content-type) (Lit_Other '=') (SQ <text/plain>)} {(/tmp/emptyfile)} {(DQ ('s3://') ($ VSub_Name '$BUCKET_PATH') (/builds/info))} ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$NOLATEST'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('Advertising ') ($ VSub_Name '$VERSION') (' on ') ($ VSub_Name '$BUCKET_PATH') (' as most recent version') ) } ) (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$VERSION'))}) (C {(write_to_s3)} {(DQ ('s3://') ($ VSub_Name '$BUCKET_PATH') (/latest))}) ] negated: False ) ] spids: [16777215 1731] ) ] spids: [16777215 1762] ) ] spids: [1516] ) spids: [1512 1515] ) (FuncDef name: main body: (BraceGroup children: [ (AndOr children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$SKIP_RELEASE_BUILD'))} {(Lit_Other '=')} {(SQ <1>)} {(Lit_Other ']')} ) (C {(build_all)}) ] op_id: Op_DPipe ) (C {(setup_s3)}) (C {(release_binaries)}) ] spids: [1771] ) spids: [1767 1770] ) (C {(main)}) (C {(echo)}) (C {(echo)}) (C {(echo)} { (DQ ('Release complete; see ') (CommandSubPart command_list: (CommandList children:[(C {(s3_url)})]) left_token: <Left_CommandSub '$('> spids: [1812 1814] ) ) } ) (C {(echo)} {(DQ ('Use the following text to announce the release:'))}) (C {(echo)}) (C {(echo)} { (DQ ('We have just pushed ') ($ VSub_Name '$VERSION') (' to ') (CommandSubPart command_list: (CommandList children:[(C {(s3_url)})]) left_token: <Left_CommandSub '$('> spids: [1831 1833] ) ('. You can download it with the following:') ) } ) (C {(echo)}) (C {(echo)} { (DQ ('Linux 64bit tgz: ') (CommandSubPart command_list: (CommandList children:[(C {(s3_url)})]) left_token: <Left_CommandSub '$('> spids: [1843 1845] ) (/builds/Linux/x86_64/docker-) ($ VSub_Name '$VERSION') (.tgz) ) } ) (C {(echo)} { (DQ ('Darwin/OSX 64bit client tgz: ') (CommandSubPart command_list: (CommandList children:[(C {(s3_url)})]) left_token: <Left_CommandSub '$('> spids: [1855 1857] ) (/builds/Darwin/x86_64/docker-) ($ VSub_Name '$VERSION') (.tgz) ) } ) (C {(echo)} { (DQ ('Windows 64bit zip: ') (CommandSubPart command_list: (CommandList children:[(C {(s3_url)})]) left_token: <Left_CommandSub '$('> spids: [1867 1869] ) (/builds/Windows/x86_64/docker-) ($ VSub_Name '$VERSION') (.zip) ) } ) (C {(echo)} { (DQ ('Windows 32bit client zip: ') (CommandSubPart command_list: (CommandList children:[(C {(s3_url)})]) left_token: <Left_CommandSub '$('> spids: [1879 1881] ) (/builds/Windows/i386/docker-) ($ VSub_Name '$VERSION') (.zip) ) } ) (C {(echo)}) ] )