diff --git a/package-lock.json b/package-lock.json
deleted file mode 100644
index 0666614..0000000
--- a/package-lock.json
+++ /dev/null
@@ -1,904 +0,0 @@
-{
- "requires": true,
- "lockfileVersion": 1,
- "dependencies": {
- "ajv": {
- "version": "6.6.2",
- "resolved": "http://registry.npm.taobao.org/ajv/download/ajv-6.6.2.tgz",
- "integrity": "sha1-ys7M9HS/P8POOxR0Q3EaJAY8ww0=",
- "requires": {
- "fast-deep-equal": "^2.0.1",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.4.1",
- "uri-js": "^4.2.2"
- }
- },
- "all-contributors-cli": {
- "version": "5.4.1",
- "resolved": "http://registry.npm.taobao.org/all-contributors-cli/download/all-contributors-cli-5.4.1.tgz",
- "integrity": "sha1-w4XNckHzP/OBBIw+2BYH7d7NL0s=",
- "dev": true,
- "requires": {
- "async": "^2.0.0-rc.1",
- "chalk": "^2.3.0",
- "inquirer": "^4.0.0",
- "lodash": "^4.11.2",
- "pify": "^3.0.0",
- "request": "^2.72.0",
- "yargs": "^10.0.3"
- }
- },
- "ansi-escapes": {
- "version": "3.1.0",
- "resolved": "http://registry.npm.taobao.org/ansi-escapes/download/ansi-escapes-3.1.0.tgz",
- "integrity": "sha1-9zIHu4EgfXX9bIPxJa8m7qN4yjA="
- },
- "ansi-regex": {
- "version": "3.0.0",
- "resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz",
- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
- },
- "ansi-styles": {
- "version": "3.2.1",
- "resolved": "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz",
- "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=",
- "requires": {
- "color-convert": "^1.9.0"
- }
- },
- "asn1": {
- "version": "0.2.4",
- "resolved": "http://registry.npm.taobao.org/asn1/download/asn1-0.2.4.tgz",
- "integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=",
- "requires": {
- "safer-buffer": "~2.1.0"
- }
- },
- "assert-plus": {
- "version": "1.0.0",
- "resolved": "http://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
- },
- "async": {
- "version": "2.6.1",
- "resolved": "http://registry.npm.taobao.org/async/download/async-2.6.1.tgz",
- "integrity": "sha1-skWiPKcZMAROxT+kaqAKPofGphA=",
- "requires": {
- "lodash": "^4.17.10"
- }
- },
- "asynckit": {
- "version": "0.4.0",
- "resolved": "http://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz",
- "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
- },
- "aws-sign2": {
- "version": "0.7.0",
- "resolved": "http://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.7.0.tgz",
- "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
- },
- "aws4": {
- "version": "1.8.0",
- "resolved": "http://registry.npm.taobao.org/aws4/download/aws4-1.8.0.tgz",
- "integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8="
- },
- "bcrypt-pbkdf": {
- "version": "1.0.2",
- "resolved": "http://registry.npm.taobao.org/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz",
- "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
- "requires": {
- "tweetnacl": "^0.14.3"
- }
- },
- "camelcase": {
- "version": "4.1.0",
- "resolved": "http://registry.npm.taobao.org/camelcase/download/camelcase-4.1.0.tgz",
- "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0="
- },
- "caseless": {
- "version": "0.12.0",
- "resolved": "http://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz",
- "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
- },
- "chalk": {
- "version": "2.4.1",
- "resolved": "http://registry.npm.taobao.org/chalk/download/chalk-2.4.1.tgz",
- "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=",
- "requires": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
- }
- },
- "chardet": {
- "version": "0.4.2",
- "resolved": "http://registry.npm.taobao.org/chardet/download/chardet-0.4.2.tgz",
- "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I="
- },
- "cli-cursor": {
- "version": "2.1.0",
- "resolved": "http://registry.npm.taobao.org/cli-cursor/download/cli-cursor-2.1.0.tgz",
- "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
- "requires": {
- "restore-cursor": "^2.0.0"
- }
- },
- "cli-width": {
- "version": "2.2.0",
- "resolved": "http://registry.npm.taobao.org/cli-width/download/cli-width-2.2.0.tgz",
- "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk="
- },
- "cliui": {
- "version": "4.1.0",
- "resolved": "http://registry.npm.taobao.org/cliui/download/cliui-4.1.0.tgz",
- "integrity": "sha1-NIQi2+gtgAswIu709qwQvy5NG0k=",
- "requires": {
- "string-width": "^2.1.1",
- "strip-ansi": "^4.0.0",
- "wrap-ansi": "^2.0.0"
- }
- },
- "code-point-at": {
- "version": "1.1.0",
- "resolved": "http://registry.npm.taobao.org/code-point-at/download/code-point-at-1.1.0.tgz",
- "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
- },
- "color-convert": {
- "version": "1.9.3",
- "resolved": "http://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz",
- "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=",
- "requires": {
- "color-name": "1.1.3"
- }
- },
- "color-name": {
- "version": "1.1.3",
- "resolved": "http://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz",
- "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
- },
- "combined-stream": {
- "version": "1.0.7",
- "resolved": "http://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.7.tgz",
- "integrity": "sha1-LR0kMXr7ir6V1tLAsHtXgTU52Cg=",
- "requires": {
- "delayed-stream": "~1.0.0"
- }
- },
- "core-util-is": {
- "version": "1.0.2",
- "resolved": "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
- },
- "cross-spawn": {
- "version": "5.1.0",
- "resolved": "http://registry.npm.taobao.org/cross-spawn/download/cross-spawn-5.1.0.tgz",
- "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
- "requires": {
- "lru-cache": "^4.0.1",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- },
- "dashdash": {
- "version": "1.14.1",
- "resolved": "http://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz",
- "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
- "requires": {
- "assert-plus": "^1.0.0"
- }
- },
- "decamelize": {
- "version": "1.2.0",
- "resolved": "http://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz",
- "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
- },
- "delayed-stream": {
- "version": "1.0.0",
- "resolved": "http://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz",
- "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
- },
- "ecc-jsbn": {
- "version": "0.1.2",
- "resolved": "http://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz",
- "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
- "requires": {
- "jsbn": "~0.1.0",
- "safer-buffer": "^2.1.0"
- }
- },
- "escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "http://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
- },
- "execa": {
- "version": "0.7.0",
- "resolved": "http://registry.npm.taobao.org/execa/download/execa-0.7.0.tgz",
- "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
- "requires": {
- "cross-spawn": "^5.0.1",
- "get-stream": "^3.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
- }
- },
- "extend": {
- "version": "3.0.2",
- "resolved": "http://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz",
- "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo="
- },
- "external-editor": {
- "version": "2.2.0",
- "resolved": "http://registry.npm.taobao.org/external-editor/download/external-editor-2.2.0.tgz",
- "integrity": "sha1-BFURz9jRM/OEZnPRBHwVTiFK09U=",
- "requires": {
- "chardet": "^0.4.0",
- "iconv-lite": "^0.4.17",
- "tmp": "^0.0.33"
- }
- },
- "extsprintf": {
- "version": "1.3.0",
- "resolved": "http://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz",
- "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
- },
- "fast-deep-equal": {
- "version": "2.0.1",
- "resolved": "http://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-2.0.1.tgz",
- "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
- },
- "fast-json-stable-stringify": {
- "version": "2.0.0",
- "resolved": "http://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.0.0.tgz",
- "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
- },
- "figures": {
- "version": "2.0.0",
- "resolved": "http://registry.npm.taobao.org/figures/download/figures-2.0.0.tgz",
- "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=",
- "requires": {
- "escape-string-regexp": "^1.0.5"
- }
- },
- "find-up": {
- "version": "2.1.0",
- "resolved": "http://registry.npm.taobao.org/find-up/download/find-up-2.1.0.tgz",
- "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
- "requires": {
- "locate-path": "^2.0.0"
- }
- },
- "forever-agent": {
- "version": "0.6.1",
- "resolved": "http://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz",
- "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
- },
- "form-data": {
- "version": "2.3.3",
- "resolved": "http://registry.npm.taobao.org/form-data/download/form-data-2.3.3.tgz",
- "integrity": "sha1-3M5SwF9kTymManq5Nr1yTO/786Y=",
- "requires": {
- "asynckit": "^0.4.0",
- "combined-stream": "^1.0.6",
- "mime-types": "^2.1.12"
- }
- },
- "get-caller-file": {
- "version": "1.0.3",
- "resolved": "http://registry.npm.taobao.org/get-caller-file/download/get-caller-file-1.0.3.tgz",
- "integrity": "sha1-+Xj6TJDR3+f/LWvtoqUV5xO9z0o="
- },
- "get-stream": {
- "version": "3.0.0",
- "resolved": "http://registry.npm.taobao.org/get-stream/download/get-stream-3.0.0.tgz",
- "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
- },
- "getpass": {
- "version": "0.1.7",
- "resolved": "http://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz",
- "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
- "requires": {
- "assert-plus": "^1.0.0"
- }
- },
- "har-schema": {
- "version": "2.0.0",
- "resolved": "http://registry.npm.taobao.org/har-schema/download/har-schema-2.0.0.tgz",
- "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
- },
- "har-validator": {
- "version": "5.1.3",
- "resolved": "http://registry.npm.taobao.org/har-validator/download/har-validator-5.1.3.tgz",
- "integrity": "sha1-HvievT5JllV2de7ZiTEQ3DUPoIA=",
- "requires": {
- "ajv": "^6.5.5",
- "har-schema": "^2.0.0"
- }
- },
- "has-flag": {
- "version": "3.0.0",
- "resolved": "http://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz",
- "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
- },
- "http-signature": {
- "version": "1.2.0",
- "resolved": "http://registry.npm.taobao.org/http-signature/download/http-signature-1.2.0.tgz",
- "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
- "requires": {
- "assert-plus": "^1.0.0",
- "jsprim": "^1.2.2",
- "sshpk": "^1.7.0"
- }
- },
- "iconv-lite": {
- "version": "0.4.24",
- "resolved": "http://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz",
- "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=",
- "requires": {
- "safer-buffer": ">= 2.1.2 < 3"
- }
- },
- "inquirer": {
- "version": "4.0.2",
- "resolved": "http://registry.npm.taobao.org/inquirer/download/inquirer-4.0.2.tgz",
- "integrity": "sha1-zGeLTLwOGDo1AMxjOVgx7JVqsKM=",
- "requires": {
- "ansi-escapes": "^3.0.0",
- "chalk": "^2.0.0",
- "cli-cursor": "^2.1.0",
- "cli-width": "^2.0.0",
- "external-editor": "^2.1.0",
- "figures": "^2.0.0",
- "lodash": "^4.3.0",
- "mute-stream": "0.0.7",
- "run-async": "^2.2.0",
- "rx-lite": "^4.0.8",
- "rx-lite-aggregates": "^4.0.8",
- "string-width": "^2.1.0",
- "strip-ansi": "^4.0.0",
- "through": "^2.3.6"
- }
- },
- "invert-kv": {
- "version": "1.0.0",
- "resolved": "http://registry.npm.taobao.org/invert-kv/download/invert-kv-1.0.0.tgz",
- "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY="
- },
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
- },
- "is-promise": {
- "version": "2.1.0",
- "resolved": "http://registry.npm.taobao.org/is-promise/download/is-promise-2.1.0.tgz",
- "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o="
- },
- "is-stream": {
- "version": "1.1.0",
- "resolved": "http://registry.npm.taobao.org/is-stream/download/is-stream-1.1.0.tgz",
- "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
- },
- "is-typedarray": {
- "version": "1.0.0",
- "resolved": "http://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz",
- "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
- },
- "isexe": {
- "version": "2.0.0",
- "resolved": "http://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz",
- "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
- },
- "isstream": {
- "version": "0.1.2",
- "resolved": "http://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz",
- "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
- },
- "jsbn": {
- "version": "0.1.1",
- "resolved": "http://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz",
- "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
- },
- "json-schema": {
- "version": "0.2.3",
- "resolved": "http://registry.npm.taobao.org/json-schema/download/json-schema-0.2.3.tgz",
- "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
- },
- "json-schema-traverse": {
- "version": "0.4.1",
- "resolved": "http://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz",
- "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA="
- },
- "json-stringify-safe": {
- "version": "5.0.1",
- "resolved": "http://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz",
- "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
- },
- "jsprim": {
- "version": "1.4.1",
- "resolved": "http://registry.npm.taobao.org/jsprim/download/jsprim-1.4.1.tgz",
- "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
- "requires": {
- "assert-plus": "1.0.0",
- "extsprintf": "1.3.0",
- "json-schema": "0.2.3",
- "verror": "1.10.0"
- }
- },
- "lcid": {
- "version": "1.0.0",
- "resolved": "http://registry.npm.taobao.org/lcid/download/lcid-1.0.0.tgz",
- "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
- "requires": {
- "invert-kv": "^1.0.0"
- }
- },
- "locate-path": {
- "version": "2.0.0",
- "resolved": "http://registry.npm.taobao.org/locate-path/download/locate-path-2.0.0.tgz",
- "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
- "requires": {
- "p-locate": "^2.0.0",
- "path-exists": "^3.0.0"
- }
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": "http://registry.npm.taobao.org/lodash/download/lodash-4.17.11.tgz",
- "integrity": "sha1-s56mIp72B+zYniyN8SU2iRysm40="
- },
- "lru-cache": {
- "version": "4.1.5",
- "resolved": "http://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.5.tgz",
- "integrity": "sha1-i75Q6oW+1ZvJ4z3KuCNe6bz0Q80=",
- "requires": {
- "pseudomap": "^1.0.2",
- "yallist": "^2.1.2"
- }
- },
- "mem": {
- "version": "1.1.0",
- "resolved": "http://registry.npm.taobao.org/mem/download/mem-1.1.0.tgz",
- "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=",
- "requires": {
- "mimic-fn": "^1.0.0"
- }
- },
- "mime-db": {
- "version": "1.37.0",
- "resolved": "http://registry.npm.taobao.org/mime-db/download/mime-db-1.37.0.tgz",
- "integrity": "sha1-C2oM5v2+lXbiXx8tL96IMNwK0Ng="
- },
- "mime-types": {
- "version": "2.1.21",
- "resolved": "http://registry.npm.taobao.org/mime-types/download/mime-types-2.1.21.tgz",
- "integrity": "sha1-KJlaoey3cHQv5q5+WPkYHHRLP5Y=",
- "requires": {
- "mime-db": "~1.37.0"
- }
- },
- "mimic-fn": {
- "version": "1.2.0",
- "resolved": "http://registry.npm.taobao.org/mimic-fn/download/mimic-fn-1.2.0.tgz",
- "integrity": "sha1-ggyGo5M0ZA6ZUWkovQP8qIBX0CI="
- },
- "mute-stream": {
- "version": "0.0.7",
- "resolved": "http://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz",
- "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s="
- },
- "npm-run-path": {
- "version": "2.0.2",
- "resolved": "http://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz",
- "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
- "requires": {
- "path-key": "^2.0.0"
- }
- },
- "number-is-nan": {
- "version": "1.0.1",
- "resolved": "http://registry.npm.taobao.org/number-is-nan/download/number-is-nan-1.0.1.tgz",
- "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
- },
- "oauth-sign": {
- "version": "0.9.0",
- "resolved": "http://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz",
- "integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU="
- },
- "onetime": {
- "version": "2.0.1",
- "resolved": "http://registry.npm.taobao.org/onetime/download/onetime-2.0.1.tgz",
- "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
- "requires": {
- "mimic-fn": "^1.0.0"
- }
- },
- "os-locale": {
- "version": "2.1.0",
- "resolved": "http://registry.npm.taobao.org/os-locale/download/os-locale-2.1.0.tgz",
- "integrity": "sha1-QrwpAKa1uL0XN2yOiCtlr8zyS/I=",
- "requires": {
- "execa": "^0.7.0",
- "lcid": "^1.0.0",
- "mem": "^1.1.0"
- }
- },
- "os-tmpdir": {
- "version": "1.0.2",
- "resolved": "http://registry.npm.taobao.org/os-tmpdir/download/os-tmpdir-1.0.2.tgz",
- "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
- },
- "p-finally": {
- "version": "1.0.0",
- "resolved": "http://registry.npm.taobao.org/p-finally/download/p-finally-1.0.0.tgz",
- "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
- },
- "p-limit": {
- "version": "1.3.0",
- "resolved": "http://registry.npm.taobao.org/p-limit/download/p-limit-1.3.0.tgz",
- "integrity": "sha1-uGvV8MJWkJEcdZD8v8IBDVSzzLg=",
- "requires": {
- "p-try": "^1.0.0"
- }
- },
- "p-locate": {
- "version": "2.0.0",
- "resolved": "http://registry.npm.taobao.org/p-locate/download/p-locate-2.0.0.tgz",
- "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
- "requires": {
- "p-limit": "^1.1.0"
- }
- },
- "p-try": {
- "version": "1.0.0",
- "resolved": "http://registry.npm.taobao.org/p-try/download/p-try-1.0.0.tgz",
- "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M="
- },
- "path-exists": {
- "version": "3.0.0",
- "resolved": "http://registry.npm.taobao.org/path-exists/download/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
- },
- "path-key": {
- "version": "2.0.1",
- "resolved": "http://registry.npm.taobao.org/path-key/download/path-key-2.0.1.tgz",
- "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
- },
- "performance-now": {
- "version": "2.1.0",
- "resolved": "http://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz",
- "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
- },
- "pify": {
- "version": "3.0.0",
- "resolved": "http://registry.npm.taobao.org/pify/download/pify-3.0.0.tgz",
- "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
- },
- "pseudomap": {
- "version": "1.0.2",
- "resolved": "http://registry.npm.taobao.org/pseudomap/download/pseudomap-1.0.2.tgz",
- "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
- },
- "psl": {
- "version": "1.1.31",
- "resolved": "http://registry.npm.taobao.org/psl/download/psl-1.1.31.tgz",
- "integrity": "sha1-6aqG0BAbWxBcvpOsa3hM1UcnYYQ="
- },
- "punycode": {
- "version": "2.1.1",
- "resolved": "http://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz",
- "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew="
- },
- "qs": {
- "version": "6.5.2",
- "resolved": "http://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz",
- "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY="
- },
- "request": {
- "version": "2.88.0",
- "resolved": "http://registry.npm.taobao.org/request/download/request-2.88.0.tgz",
- "integrity": "sha1-nC/KT301tZLv5Xx/ClXoEFIST+8=",
- "requires": {
- "aws-sign2": "~0.7.0",
- "aws4": "^1.8.0",
- "caseless": "~0.12.0",
- "combined-stream": "~1.0.6",
- "extend": "~3.0.2",
- "forever-agent": "~0.6.1",
- "form-data": "~2.3.2",
- "har-validator": "~5.1.0",
- "http-signature": "~1.2.0",
- "is-typedarray": "~1.0.0",
- "isstream": "~0.1.2",
- "json-stringify-safe": "~5.0.1",
- "mime-types": "~2.1.19",
- "oauth-sign": "~0.9.0",
- "performance-now": "^2.1.0",
- "qs": "~6.5.2",
- "safe-buffer": "^5.1.2",
- "tough-cookie": "~2.4.3",
- "tunnel-agent": "^0.6.0",
- "uuid": "^3.3.2"
- }
- },
- "require-directory": {
- "version": "2.1.1",
- "resolved": "http://registry.npm.taobao.org/require-directory/download/require-directory-2.1.1.tgz",
- "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
- },
- "require-main-filename": {
- "version": "1.0.1",
- "resolved": "http://registry.npm.taobao.org/require-main-filename/download/require-main-filename-1.0.1.tgz",
- "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
- },
- "restore-cursor": {
- "version": "2.0.0",
- "resolved": "http://registry.npm.taobao.org/restore-cursor/download/restore-cursor-2.0.0.tgz",
- "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
- "requires": {
- "onetime": "^2.0.0",
- "signal-exit": "^3.0.2"
- }
- },
- "run-async": {
- "version": "2.3.0",
- "resolved": "http://registry.npm.taobao.org/run-async/download/run-async-2.3.0.tgz",
- "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=",
- "requires": {
- "is-promise": "^2.1.0"
- }
- },
- "rx-lite": {
- "version": "4.0.8",
- "resolved": "http://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz",
- "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ="
- },
- "rx-lite-aggregates": {
- "version": "4.0.8",
- "resolved": "http://registry.npm.taobao.org/rx-lite-aggregates/download/rx-lite-aggregates-4.0.8.tgz",
- "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=",
- "requires": {
- "rx-lite": "*"
- }
- },
- "safe-buffer": {
- "version": "5.1.2",
- "resolved": "http://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz",
- "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0="
- },
- "safer-buffer": {
- "version": "2.1.2",
- "resolved": "http://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz",
- "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo="
- },
- "set-blocking": {
- "version": "2.0.0",
- "resolved": "http://registry.npm.taobao.org/set-blocking/download/set-blocking-2.0.0.tgz",
- "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
- },
- "shebang-command": {
- "version": "1.2.0",
- "resolved": "http://registry.npm.taobao.org/shebang-command/download/shebang-command-1.2.0.tgz",
- "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
- "requires": {
- "shebang-regex": "^1.0.0"
- }
- },
- "shebang-regex": {
- "version": "1.0.0",
- "resolved": "http://registry.npm.taobao.org/shebang-regex/download/shebang-regex-1.0.0.tgz",
- "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
- },
- "signal-exit": {
- "version": "3.0.2",
- "resolved": "http://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
- },
- "sshpk": {
- "version": "1.16.0",
- "resolved": "http://registry.npm.taobao.org/sshpk/download/sshpk-1.16.0.tgz",
- "integrity": "sha1-HUljovv/5YBQqpCEyiC+gXQcB94=",
- "requires": {
- "asn1": "~0.2.3",
- "assert-plus": "^1.0.0",
- "bcrypt-pbkdf": "^1.0.0",
- "dashdash": "^1.12.0",
- "ecc-jsbn": "~0.1.1",
- "getpass": "^0.1.1",
- "jsbn": "~0.1.0",
- "safer-buffer": "^2.0.2",
- "tweetnacl": "~0.14.0"
- }
- },
- "string-width": {
- "version": "2.1.1",
- "resolved": "http://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz",
- "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=",
- "requires": {
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^4.0.0"
- }
- },
- "strip-ansi": {
- "version": "4.0.0",
- "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz",
- "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
- "requires": {
- "ansi-regex": "^3.0.0"
- }
- },
- "strip-eof": {
- "version": "1.0.0",
- "resolved": "http://registry.npm.taobao.org/strip-eof/download/strip-eof-1.0.0.tgz",
- "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
- },
- "supports-color": {
- "version": "5.5.0",
- "resolved": "http://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz",
- "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=",
- "requires": {
- "has-flag": "^3.0.0"
- }
- },
- "through": {
- "version": "2.3.8",
- "resolved": "http://registry.npm.taobao.org/through/download/through-2.3.8.tgz",
- "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
- },
- "tmp": {
- "version": "0.0.33",
- "resolved": "http://registry.npm.taobao.org/tmp/download/tmp-0.0.33.tgz",
- "integrity": "sha1-bTQzWIl2jSGyvNoKonfO07G/rfk=",
- "requires": {
- "os-tmpdir": "~1.0.2"
- }
- },
- "tough-cookie": {
- "version": "2.4.3",
- "resolved": "http://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.4.3.tgz",
- "integrity": "sha1-U/Nto/R3g7CSWvoG/587FlKA94E=",
- "requires": {
- "psl": "^1.1.24",
- "punycode": "^1.4.1"
- },
- "dependencies": {
- "punycode": {
- "version": "1.4.1",
- "resolved": "http://registry.npm.taobao.org/punycode/download/punycode-1.4.1.tgz",
- "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
- }
- }
- },
- "tunnel-agent": {
- "version": "0.6.0",
- "resolved": "http://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz",
- "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
- "requires": {
- "safe-buffer": "^5.0.1"
- }
- },
- "tweetnacl": {
- "version": "0.14.5",
- "resolved": "http://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz",
- "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
- },
- "uri-js": {
- "version": "4.2.2",
- "resolved": "http://registry.npm.taobao.org/uri-js/download/uri-js-4.2.2.tgz",
- "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=",
- "requires": {
- "punycode": "^2.1.0"
- }
- },
- "uuid": {
- "version": "3.3.2",
- "resolved": "http://registry.npm.taobao.org/uuid/download/uuid-3.3.2.tgz",
- "integrity": "sha1-G0r0lV6zB3xQHCOHL8ZROBFYcTE="
- },
- "verror": {
- "version": "1.10.0",
- "resolved": "http://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz",
- "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
- "requires": {
- "assert-plus": "^1.0.0",
- "core-util-is": "1.0.2",
- "extsprintf": "^1.2.0"
- }
- },
- "which": {
- "version": "1.3.1",
- "resolved": "http://registry.npm.taobao.org/which/download/which-1.3.1.tgz",
- "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=",
- "requires": {
- "isexe": "^2.0.0"
- }
- },
- "which-module": {
- "version": "2.0.0",
- "resolved": "http://registry.npm.taobao.org/which-module/download/which-module-2.0.0.tgz",
- "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
- },
- "wrap-ansi": {
- "version": "2.1.0",
- "resolved": "http://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-2.1.0.tgz",
- "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
- "requires": {
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
- },
- "is-fullwidth-code-point": {
- "version": "1.0.0",
- "resolved": "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz",
- "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
- "requires": {
- "number-is-nan": "^1.0.0"
- }
- },
- "string-width": {
- "version": "1.0.2",
- "resolved": "http://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz",
- "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
- "requires": {
- "code-point-at": "^1.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "strip-ansi": "^3.0.0"
- }
- },
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- }
- }
- },
- "y18n": {
- "version": "3.2.1",
- "resolved": "http://registry.npm.taobao.org/y18n/download/y18n-3.2.1.tgz",
- "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE="
- },
- "yallist": {
- "version": "2.1.2",
- "resolved": "http://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz",
- "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
- },
- "yargs": {
- "version": "10.1.2",
- "resolved": "http://registry.npm.taobao.org/yargs/download/yargs-10.1.2.tgz",
- "integrity": "sha1-RU0HTCsWpRpD4vt4B+T53mnMtcU=",
- "requires": {
- "cliui": "^4.0.0",
- "decamelize": "^1.1.1",
- "find-up": "^2.1.0",
- "get-caller-file": "^1.0.1",
- "os-locale": "^2.0.0",
- "require-directory": "^2.1.1",
- "require-main-filename": "^1.0.1",
- "set-blocking": "^2.0.0",
- "string-width": "^2.0.0",
- "which-module": "^2.0.0",
- "y18n": "^3.2.1",
- "yargs-parser": "^8.1.0"
- }
- },
- "yargs-parser": {
- "version": "8.1.0",
- "resolved": "http://registry.npm.taobao.org/yargs-parser/download/yargs-parser-8.1.0.tgz",
- "integrity": "sha1-8TdqM7Ziml0GN4KUTacyYx6WaVA=",
- "requires": {
- "camelcase": "^4.1.0"
- }
- }
- }
-}
diff --git a/package.json b/package.json
deleted file mode 100644
index 52cf796..0000000
--- a/package.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "name": "newbe.mahua.framework",
- "version": "1.0.0",
- "description": "[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors)\r [![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors)",
- "main": "index.js",
- "directories": {
- "doc": "docs"
- },
- "dependencies": {
- "all-contributors-cli": "^5.4.1"
- },
- "devDependencies": {},
- "scripts": {
- "add": "all-contributors add",
- "generate": "all-contributors generate",
- "check": "all-contributors check"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/Newbe36524/Newbe.Mahua.Framework.git"
- },
- "author": "",
- "license": "ISC",
- "bugs": {
- "url": "https://github.com/Newbe36524/Newbe.Mahua.Framework/issues"
- },
- "homepage": "https://github.com/Newbe36524/Newbe.Mahua.Framework#readme"
-}
diff --git a/src/.idea/.idea.Newbe.Mahua/.idea/encodings.xml b/src/.idea/.idea.Newbe.Mahua/.idea/encodings.xml
index 196cc5a..a847fe5 100644
--- a/src/.idea/.idea.Newbe.Mahua/.idea/encodings.xml
+++ b/src/.idea/.idea.Newbe.Mahua/.idea/encodings.xml
@@ -1,6 +1,6 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/PSGetModuleInfo.xml b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/PSGetModuleInfo.xml
new file mode 100644
index 0000000..fd22fed
Binary files /dev/null and b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/PSGetModuleInfo.xml differ
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/en-US/psake.psm1-help.xml.old b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/en-US/psake.psm1-help.xml.old
new file mode 100644
index 0000000..d67c446
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/en-US/psake.psm1-help.xml.old
@@ -0,0 +1,2265 @@
+
+
+
+
+ Invoke-psake
+
+ Runs a psake build script.
+
+
+
+
+ Invoke
+ psake
+
+
+
+ This function runs a psake build script
+
+
+
+ Invoke-psake
+
+ buildFile
+ String
+
+
+ taskList
+ String[]
+
+
+ framework
+ String
+
+
+ docs
+ SwitchParameter
+
+
+ parameters
+ Hashtable
+
+
+ properties
+ Hashtable
+
+
+ nologo
+ SwitchParameter
+
+
+ notr
+ SwitchParameter
+
+
+
+
+
+ buildFile
+
+ The path to the psake build script to execute
+
+ String
+
+ String
+
+
+ 'psakefile.ps1'
+
+
+ taskList
+
+ A comma-separated list of task names to execute
+
+ String[]
+
+ String[]
+
+
+
+
+
+ framework
+
+ The version of the .NET framework you want to use during build. You can append x86 or x64 to force a specific framework. If not specified, x86 or x64 will be detected based on the bitness of the PowerShell process.
+Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x64', '4.5', '4.5x86', '4.5x64', '4.5.1', '4.5.1x86', '4.5.1x64'
+
+ String
+
+ String
+
+
+ '3.5'
+
+
+ docs
+
+ Prints a list of tasks and their descriptions
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ parameters
+
+ A hashtable containing parameters to be passed into the current build script. These parameters will be processed before the 'Properties' function of the script is processed. This means you can access parameters from within the 'Properties' function!
+
+
+ Hashtable
+
+ Hashtable
+
+
+
+
+
+ properties
+
+ A hashtable containing properties to be passed into the current build script. These properties will override matching properties that are found in the 'Properties' function of the script.
+
+ Hashtable
+
+ Hashtable
+
+
+
+
+
+ nologo
+
+ Do not display the startup banner and copyright message.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ notr
+
+ Do not display the time report.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ---- Exceptions ----
+ If there is an exception thrown during the running of a build script psake will set the '$psake.build_success' variable to $false. To detect failue outside PowerShell (for example by build server), finish PowerShell process with non-zero exit code when '$psake.build_success' is $false. Calling psake from 'cmd.exe' with 'psake.cmd' will give you that behaviour.
+
+
+
+ ---- $psake variable ----
+ When the psake module is loaded a variable called $psake is created which is a hashtable
+containing some variables:
+
+$psake.version # contains the current version of psake
+$psake.context # holds onto the current state of all variables
+$psake.run_by_psake_build_tester # indicates that build is being run by psake-BuildTester
+$psake.config_default # contains default configuration
+ # can be overriden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script
+$psake.build_success # indicates that the current build was successful
+$psake.build_script_file # contains a System.IO.FileInfo for the current build script
+$psake.build_script_dir # contains the fully qualified path to the current build script
+
+You should see the following when you display the contents of the $psake variable right after importing psake
+
+PS projects:\psake> Import-Module .\psake.psm1
+PS projects:\psake> $psake
+
+Name Value
+---- -----
+run_by_psake_build_tester False
+version 4.2
+build_success False
+build_script_file
+build_script_dir
+config_default @{framework=3.5; ...
+context {}
+
+After a build is executed the following $psake values are updated: build_script_file, build_script_dir, build_success
+
+PS projects:\psake> Invoke-psake .\examples\psakefile.ps1
+Executing task: Clean
+Executed Clean!
+Executing task: Compile
+Executed Compile!
+Executing task: Test
+Executed Test!
+
+Build Succeeded!
+
+----------------------------------------------------------------------
+Build Time Report
+----------------------------------------------------------------------
+Name Duration
+---- --------
+Clean 00:00:00.0798486
+Compile 00:00:00.0869948
+Test 00:00:00.0958225
+Total: 00:00:00.2712414
+
+PS projects:\psake> $psake
+
+Name Value
+---- -----
+build_script_file YOUR_PATH\examples\psakefile.ps1
+run_by_psake_build_tester False
+build_script_dir YOUR_PATH\examples
+context {}
+version 4.2
+build_success True
+config_default @{framework=3.5; ...
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ Invoke-psake
+
+ Description
+ -----------
+ Runs the 'default' task in the '.build.ps1' build script
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 2 --------------
+
+ C:\PS>
+
+ Invoke-psake '.\build.ps1' Tests,Package
+
+ Description
+ -----------
+ Runs the 'Tests' and 'Package' tasks in the '.build.ps1' build script
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 3 --------------
+
+ C:\PS>
+
+ Invoke-psake Tests
+
+ Description
+ -----------
+ This example will run the 'Tests' tasks in the 'psakefile.ps1' build script. The 'psakefile.ps1' is assumed to be in the current directory.
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 4 --------------
+
+ C:\PS>
+
+ Invoke-psake 'Tests, Package'
+
+ Description
+ -----------
+ This example will run the 'Tests' and 'Package' tasks in the 'psakefile.ps1' build script. The 'psakefile.ps1' is assumed to be in the current directory.
+ NOTE: The quotes around the list of tasks to execute is required if you want to execute more than 1 task.
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 5 --------------
+
+ C:\PS>
+
+ Invoke-psake .\build.ps1 -docs
+
+ Description
+ -----------
+ Prints a report of all the tasks and their dependencies and descriptions and then exits
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 6 --------------
+
+ C:\PS>
+
+ Invoke-psake .\parameters.ps1 -parameters @{"p1"="v1";"p2"="v2"}
+
+ Description
+ -----------
+ Runs the build script called 'parameters.ps1' and passes in parameters 'p1' and 'p2' with values 'v1' and 'v2'
+ Here's the .\parameters.ps1 build script:
+
+
+ properties {
+ $my_property = $p1 + $p2
+}
+
+task default -depends TestParams
+
+task TestParams {
+ Assert ($my_property -ne $null) '$my_property should not be null'
+}
+
+ Notice how you can refer to the parameters that were passed into the script from within the “properties” function. The value of the $p1 variable should be the string “v1” and the value of the $p2 variable should be “v2”.
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 7 --------------
+
+ C:\PS>
+
+ Invoke-psake .\properties.ps1 -properties @{"x"="1";"y"="2"}
+
+ Description
+ -----------
+ Runs the build script called 'properties.ps1' and passes in parameters 'x' and 'y' with values '1' and '2'
+ This feature allows you to over-ride existing properties in your build script.
+
+ Here's the .\properties.ps1 build script
+ properties {
+ $x = $null
+ $y = $null
+ $z = $null
+}
+
+task default -depends TestProperties
+
+task TestProperties {
+ Assert ($x -ne $null) "x should not be null"
+ Assert ($y -ne $null) "y should not be null"
+ Assert ($z -eq $null) "z should be null"
+}
+
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ Include
+
+
+
+ Properties
+
+
+
+ FormatTaskName
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ TaskTearDown
+
+ Adds a scriptblock to the build that will be executed after each task
+
+
+
+
+
+
+
+
+
+ This function will accept a scriptblock that will be executed after each
+task in the build script.
+
+
+
+ TaskTearDown
+
+ teardown
+ ScriptBlock
+
+
+
+
+
+ teardown
+
+ A scriptblock to execute
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script is shown below:
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+TaskTearDown {
+ "Running 'TaskTearDown' for task $context.Peek().currentTaskName"
+}
+
+ Description
+ -----------
+ The script above produces the following output:
+ Executing task, Clean...
+Running 'TaskTearDown' for task Clean
+Executing task, Compile...
+Running 'TaskTearDown' for task Compile
+Executing task, Test...
+Running 'TaskTearDown' for task Test
+
+Build Succeeded
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ Include
+
+
+
+ Properties
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ TaskSetup
+
+ Adds a scriptblock that will be executed before each task
+
+
+
+
+
+
+
+
+
+ This function will accept a scriptblock that will be executed before each
+task in the build script.
+
+
+
+ TaskSetup
+
+ setup
+ ScriptBlock
+
+
+
+
+
+ setup
+
+ A scriptblock to execute
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script is shown below:
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+TaskSetup {
+ "Running 'TaskSetup' for task $context.Peek().currentTaskName"
+}
+
+ Description
+ -----------
+ The script above produces the following output:
+ Running 'TaskSetup' for task Clean
+Executing task, Clean...
+Running 'TaskSetup' for task Compile
+Executing task, Compile...
+Running 'TaskSetup' for task Test
+Executing task, Test...
+
+Build Succeeded
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ Include
+
+
+
+ Properties
+
+
+
+ Invoke-psake
+
+
+
+ FormatTaskName
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ Framework
+
+ Sets the version of the .NET framework you want to use during build.
+
+
+
+
+
+
+
+
+
+ This function will accept a string containing version of the .NET framework to use during build. Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x64', '4.5', '4.5x86', '4.5x64', '4.5.1', '4.5.1x86', '4.5.1x64'. Default is '3.5*', where x86 or x64 will be detected based on the bitness of the PowerShell process.
+
+
+
+ Framework
+
+ framework
+ string
+
+
+
+
+
+ framework
+
+ Version of the .NET framework to use during build.
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+Framework "4.0"
+
+Task default -depends Compile
+
+Task Compile -depends Clean {
+ msbuild /version
+}
+
+ Description
+ -----------
+ The script above will output detailed version of msbuid v4
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ Include
+
+
+
+ Properties
+
+
+
+ Invoke-psake
+
+
+
+ FormatTaskName
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+
+
+
+
+ FormatTaskName
+
+ This function allows you to change how psake renders the task name during a build.
+
+
+
+
+
+
+
+
+
+ This function takes either a string which represents a format string (formats using the -f format operator see “help about_operators”) or it can accept a script block that has a single parameter that is the name of the task that will be executed.
+
+
+
+ FormatTaskName
+
+ format
+ String or ScriptBlock
+
+
+
+
+
+ format
+
+ A format string or a scriptblock to execute
+
+ String or ScriptBlock
+
+ String or ScriptBlock
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script that uses a format string is shown below:
+
+Task default -depends TaskA, TaskB, TaskC
+
+FormatTaskName "-------- {0} --------"
+
+Task TaskA {
+ "TaskA is executing"
+}
+
+Task TaskB {
+ "TaskB is executing"
+}
+
+Task TaskC {
+ "TaskC is executing"
+}
+
+ Description
+ -----------
+ The script above produces the following output:
+ -------- TaskA --------
+TaskA is executing
+-------- TaskB --------
+TaskB is executing
+-------- TaskC --------
+TaskC is executing
+
+Build Succeeded!
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 2 --------------
+
+ C:\PS>
+
+ A sample build script that uses a ScriptBlock is shown below:
+
+Task default -depends TaskA, TaskB, TaskC
+
+FormatTaskName {
+ param($taskName)
+ write-host "Executing Task: $taskName" -foregroundcolor blue
+}
+
+Task TaskA {
+ "TaskA is executing"
+}
+
+Task TaskB {
+ "TaskB is executing"
+}
+
+Task TaskC {
+ "TaskC is executing"
+}
+
+ Description
+ -----------
+ The preceding example uses the scriptblock parameter to the FormatTaskName function to render each task name in the color blue.
+ Note: the $taskName parameter is arbitrary it could be named anything
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ Include
+
+
+
+ Properties
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+
+ Get-PSakeScriptTasks
+
+ Returns meta data about all the tasks defined in the provided psake script.
+
+
+
+
+ Get
+ PSakeScriptTasks
+
+
+
+ Returns meta data about all the tasks defined in the provided psake script.
+
+
+
+ Get-PSakeScriptTasks
+
+ buildFile
+
+ The path to the psake build script to read the tasks from.
+
+ String
+
+
+ InformationAction
+
+
+
+ ActionPreference
+
+
+ InformationVariable
+
+
+
+ String
+
+
+
+
+
+ buildFile
+
+ The path to the psake build script to read the tasks from.
+
+ String
+
+ String
+
+
+ 'psakefile.ps1'
+
+
+ InformationAction
+
+
+
+ ActionPreference
+
+ ActionPreference
+
+
+
+
+
+ InformationVariable
+
+
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Include
+
+ Include the functions or code of another powershell script file into the current build script's scope
+
+
+
+
+
+
+
+
+
+ A build script may declare an "includes" function which allows you to define a file containing powershell code to be included and added to the scope of the currently running build script. Code from such file will be executed after code from build script.
+
+
+
+ Include
+
+ fileNamePathToInclude
+ String
+
+
+
+
+
+ fileNamePathToInclude
+
+ A string containing the path and name of the powershell file to include
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script is shown below:
+
+Include ".\build_utils.ps1"
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+ Description
+ -----------
+ The script above includes all the functions and variables defined in the ".\build_utils.ps1" script into the current build script's scope
+ Note: You can have more than 1 "Include" function defined in the build script
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ FormatTaskName
+
+
+
+ Properties
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ Properties
+
+ Define a scriptblock that contains assignments to variables that will be available to all tasks in the build script
+
+
+
+
+
+
+
+
+
+ A build script may declare a "Properies" function which allows you to define variables that will be available to all the "Task" functions in the build script.
+
+
+
+ Properties
+
+ properties
+ ScriptBlock
+
+
+
+
+
+ properties
+
+ The script block containing all the variable assignment statements
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script is shown below:
+
+Properties {
+ $build_dir = "c:\build"
+ $connection_string = "datasource=localhost;initial catalog=northwind;integrated security=sspi"
+}
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+ Description
+ -----------
+ Note: You can have more than 1 "Properties" function defined in the build script
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ FormatTaskName
+
+
+
+ Include
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ Task
+
+ Defines a build task to be executed by psake
+
+
+
+
+
+
+
+
+
+ This function creates a 'task' object that will be used by the psake engine to execute a build task. Note: There must be at least one task called 'default' in the build script
+
+
+
+ Task
+
+ Name
+ String
+
+
+ Action
+ ScriptBlock
+
+
+ PreAction
+ ScriptBlock
+
+
+ PostAction
+ ScriptBlock
+
+
+ Precondition
+ ScriptBlock
+
+
+ Postcondition
+ ScriptBlock
+
+
+ ContinueOnError
+ Boolean
+
+
+ Depends
+ String[]
+
+
+ RequiredVariables
+ String[]
+
+
+ Description
+ String[]
+
+
+
+
+
+ Name
+
+ The name of the task
+
+ String
+
+ String
+
+
+
+
+
+ Action
+
+ A scriptblock containing the statements to execute for the task.
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+ PreAction
+
+ A scriptblock to be executed before the 'Action' scriptblock. Note: This parameter is ignored if the 'Action' scriptblock is not defined.
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+ PostAction
+
+ A scriptblock to be executed after the 'Action' scriptblock. Note: This parameter is ignored if the 'Action' scriptblock is not defined.
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+ Precondition
+
+ A scriptblock that is executed to determine if the task is executed or skipped. This scriptblock should return $true or $false
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+ Postcondition
+
+ A scriptblock that is executed to determine if the task completed its job correctly. An exception is thrown if the scriptblock returns $false.
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+ ContinueOnError
+
+ If this switch parameter is set then the task will not cause the build to fail when an exception is thrown by the task
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Depends
+
+ An array of task names that this task depends on. These tasks will be executed before the current task is executed.
+
+ String[]
+
+ String[]
+
+
+
+
+
+ RequiredVariables
+
+ An array of names of variables that must be set to run this task.
+
+ String[]
+
+ String[]
+
+
+
+
+
+ Description
+
+ A description of the task.
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script is shown below:
+
+Task default -Depends Test
+
+Task Test -Depends Compile, Clean {
+ "This is a test"
+}
+
+Task Compile -Depends Clean {
+ "Compile"
+}
+
+Task Clean {
+ "Clean"
+}
+
+The 'default' task is required and should not contain an 'Action' parameter.
+It uses the 'Depends' parameter to specify that 'Test' is a dependency
+
+The 'Test' task uses the 'Depends' parameter to specify that 'Compile' and 'Clean' are dependencies
+The 'Compile' task depends on the 'Clean' task.
+
+Note:
+The 'Action' parameter is defaulted to the script block following the 'Clean' task.
+
+An equivalent 'Test' task is shown below:
+
+Task Test -Depends Compile, Clean -Action {
+ $testMessage
+}
+
+The output for the above sample build script is shown below:
+Executing task, Clean...
+Clean
+Executing task, Compile...
+Compile
+Executing task, Test...
+This is a test
+
+Build Succeeded!
+
+----------------------------------------------------------------------
+Build Time Report
+----------------------------------------------------------------------
+Name Duration
+---- --------
+Clean 00:00:00.0065614
+Compile 00:00:00.0133268
+Test 00:00:00.0225964
+Total: 00:00:00.0782496
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+ FormatTaskName
+
+
+
+ Include
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ Assert
+
+ Helper function for "Design by Contract" assertion checking.
+
+
+
+
+
+
+
+
+
+ This is a helper function that makes the code less noisy by eliminating many of the "if" statements that are normally required to verify assumptions in the code.
+
+
+
+ Assert
+
+ conditionToCheck
+ Boolean
+
+
+ failureMessage
+ String
+
+
+
+
+
+ conditionToCheck
+
+ The boolean condition to evaluate
+
+ Boolean
+
+ Boolean
+
+
+
+
+
+ failureMessage
+
+ The error message used for the exception if the conditionToCheck parameter is false
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ Assert $false "This always throws an exception"
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 2 --------------
+
+ C:\PS>
+
+ Assert ( ($i % 2) -eq 0 ) "$i is not an even number"
+
+ Description
+ -----------
+ This exmaple may throw an exception if $i is not an even number
+
+ Note:
+ It might be necessary to wrap the condition with paranthesis to force PS to evaluate the condition
+so that a boolean value is calculated and passed into the 'conditionToCheck' parameter.
+
+Example:
+ Assert 1 -eq 2 "1 doesn't equal 2"
+
+PS will pass 1 into the condtionToCheck variable and PS will look for a parameter called "eq" and
+throw an exception with the following message "A parameter cannot be found that matches parameter name 'eq'"
+
+The solution is to wrap the condition in () so that PS will evaluate it first.
+
+ Assert (1 -eq 2) "1 doesn't equal 2"
+
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ FormatTaskName
+
+
+
+ Include
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Properties
+
+
+
+
+ Framework
+
+
+
+
+
+
+ Exec
+
+ Helper function for executing command-line programs.
+
+
+
+
+
+
+
+
+
+ This is a helper function that runs a scriptblock and checks the PS variable $lastexitcode to see if an error occcured. If an error is detected then an exception is thrown. This function allows you to run command-line programs without having to explicitly check fthe $lastexitcode variable.
+
+
+
+ Exec
+
+ cmd
+ ScriptBlock
+
+
+ errorMessage
+ String
+
+
+
+
+
+ cmd
+
+ The scriptblock to execute. This scriptblock will typically contain the command-line invocation.
+
+ ScriptBlock
+
+ Boolean
+
+
+
+
+
+ failureMessage
+
+ The error message used for the exception that is thrown.
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ exec { svn info $repository_trunk } "Error executing SVN. Please verify SVN command-line client is installed"
+
+ This example calls the svn command-line client.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Assert
+
+
+
+ FormatTaskName
+
+
+
+ Include
+
+
+
+ Invoke-psake
+
+
+
+ Properties
+
+
+
+ Task
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+
+ Framework
+
+
+
+
+
+
+ Invoke-Task
+
+ Executes another task in the current build script.
+
+
+
+
+
+
+
+
+
+ This is a function that will allow you to invoke a Task from within another Task in the current build script.
+
+
+
+ Invoke-Task
+
+ taskName
+ String
+
+
+
+
+
+ taskName
+
+ The name of the task to execute.
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ Invoke-Task "Compile"
+
+ This example calls the "Compile" task.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Assert
+
+
+
+ Exec
+
+
+
+ FormatTaskName
+
+
+
+ Include
+
+
+
+ Invoke-psake
+
+
+
+ Properties
+
+
+
+ Task
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Framework
+
+
+
+
+
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/checkvariables.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/checkvariables.ps1
new file mode 100644
index 0000000..0d6b0b1
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/checkvariables.ps1
@@ -0,0 +1,33 @@
+Properties {
+ $x = 1
+ $y = 2
+}
+
+FormatTaskName "[{0}]"
+
+Task default -Depends Verify
+
+Task Verify -Description "This task verifies psake's variables" {
+
+ Assert (Test-Path 'variable:\psake') "psake variable was not exported from module"
+
+ Assert ($psake.ContainsKey("version")) "psake variable does not contain 'version'"
+ Assert ($psake.ContainsKey("context")) "psake variable does not contain 'context'"
+ Assert ($psake.ContainsKey("build_success")) "psake variable does not contain 'build_success'"
+ Assert ($psake.ContainsKey("build_script_file")) "psake variable does not contain 'build_script_file'"
+ Assert ($psake.ContainsKey("build_script_dir")) "psake variable does not contain 'build_script_dir'"
+
+ Assert (![string]::IsNullOrEmpty($psake.version)) '$psake.version was null or empty'
+ Assert ($psake.context -ne $null) '$psake.context was null'
+ Assert (!$psake.build_success) '$psake.build_success should be $false'
+ Assert ($psake.build_script_file -ne $null) '$psake.build_script_file was null'
+ Assert ($psake.build_script_file.Name -eq "checkvariables.ps1") ("psake variable: {0} was not equal to 'checkvariables.ps1'" -f $psake.build_script_file.Name)
+ Assert (![string]::IsNullOrEmpty($psake.build_script_dir)) '$psake.build_script_dir was null or empty'
+
+ Assert ($psake.context.Peek().tasks.Count -ne 0) "psake context variable 'tasks' had length zero"
+ Assert ($psake.context.Peek().properties.Count -ne 0) "psake context variable 'properties' had length zero"
+ Assert ($psake.context.Peek().includes.Count -eq 0) "psake context variable 'includes' should have had length zero"
+ Assert ($psake.context.Peek().config -ne $null) "psake context variable 'config' was null"
+
+ Assert ($psake.context.Peek().currentTaskName -eq "Verify") 'psake variable: $currentTaskName was not set correctly'
+}
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/continueonerror.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/continueonerror.ps1
new file mode 100644
index 0000000..9679a4d
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/continueonerror.ps1
@@ -0,0 +1,14 @@
+Task default -Depends TaskA
+
+Task TaskA -Depends TaskB {
+ "Task - A"
+}
+
+Task TaskB -Depends TaskC -ContinueOnError {
+ "Task - B"
+ throw "I failed on purpose!"
+}
+
+Task TaskC {
+ "Task - C"
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/default.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/default.ps1
new file mode 100644
index 0000000..4657bea
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/default.ps1
@@ -0,0 +1,23 @@
+properties {
+ $testMessage = 'Executed Test!'
+ $compileMessage = 'Executed Compile!'
+ $cleanMessage = 'Executed Clean!'
+}
+
+task default -depends Test
+
+task Test -depends Compile, Clean {
+ $testMessage
+}
+
+task Compile -depends Clean {
+ $compileMessage
+}
+
+task Clean {
+ $cleanMessage
+}
+
+task ? -Description "Helper to display task info" {
+ Write-Documentation
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/formattaskname_scriptblock.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/formattaskname_scriptblock.ps1
new file mode 100644
index 0000000..3ec3b96
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/formattaskname_scriptblock.ps1
@@ -0,0 +1,24 @@
+properties {
+ $testMessage = 'Executed Test!'
+ $compileMessage = 'Executed Compile!'
+ $cleanMessage = 'Executed Clean!'
+}
+
+task default -depends Test
+
+formatTaskName {
+ param($taskName)
+ write-host $taskName -foregroundcolor Green
+}
+
+task Test -depends Compile, Clean {
+ $testMessage
+}
+
+task Compile -depends Clean {
+ $compileMessage
+}
+
+task Clean {
+ $cleanMessage
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/formattaskname_string.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/formattaskname_string.ps1
new file mode 100644
index 0000000..f9b5dce
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/formattaskname_string.ps1
@@ -0,0 +1,21 @@
+properties {
+ $testMessage = 'Executed Test!'
+ $compileMessage = 'Executed Compile!'
+ $cleanMessage = 'Executed Clean!'
+}
+
+task default -depends Test
+
+formatTaskName "-------{0}-------"
+
+task Test -depends Compile, Clean {
+ $testMessage
+}
+
+task Compile -depends Clean {
+ $compileMessage
+}
+
+task Clean {
+ $cleanMessage
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/msbuild40.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/msbuild40.ps1
new file mode 100644
index 0000000..2298e42
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/msbuild40.ps1
@@ -0,0 +1,8 @@
+Framework "4.0"
+# Framework "4.0x64"
+
+task default -depends ShowMsBuildVersion
+
+task ShowMsBuildVersion {
+ msbuild /version
+}
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/nested.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/nested.ps1
new file mode 100644
index 0000000..d7f27b4
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/nested.ps1
@@ -0,0 +1,17 @@
+Properties {
+ $x = 1
+}
+
+Task default -Depends RunNested1, RunNested2, CheckX
+
+Task RunNested1 {
+ Invoke-psake .\nested\nested1.ps1
+}
+
+Task RunNested2 {
+ Invoke-psake .\nested\nested2.ps1
+}
+
+Task CheckX{
+ Assert ($x -eq 1) '$x was not 1'
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/nested/nested1.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/nested/nested1.ps1
new file mode 100644
index 0000000..78d99a3
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/nested/nested1.ps1
@@ -0,0 +1,9 @@
+Properties {
+ $x = 100
+}
+
+Task default -Depends Nested1CheckX
+
+Task Nested1CheckX{
+ Assert ($x -eq 100) '$x was not 100'
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/nested/nested2.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/nested/nested2.ps1
new file mode 100644
index 0000000..c5a244b
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/nested/nested2.ps1
@@ -0,0 +1,9 @@
+Properties {
+ $x = 200
+}
+
+Task default -Depends Nested2CheckX
+
+Task Nested2CheckX{
+ Assert ($x -eq 200) '$x was not 200'
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/paralleltasks.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/paralleltasks.ps1
new file mode 100644
index 0000000..24a401f
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/paralleltasks.ps1
@@ -0,0 +1,20 @@
+Task ParallelTask1 {
+ "ParallelTask1"
+}
+
+Task ParallelTask2 {
+ "ParallelTask2"
+}
+
+Task ParallelNested1andNested2 {
+ $jobArray = @()
+ @("ParallelTask1", "ParallelTask2") | ForEach-Object {
+ $jobArray += Start-Job {
+ param($scriptFile, $taskName)
+ Invoke-psake $scriptFile -taskList $taskName
+ } -ArgumentList $psake.build_script_file.FullName, $_
+ }
+ Wait-Job $jobArray | Receive-Job
+}
+
+Task default -depends ParallelNested1andNested2
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/parameters.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/parameters.ps1
new file mode 100644
index 0000000..c087615
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/parameters.ps1
@@ -0,0 +1,9 @@
+properties {
+ $my_property = $p1 + $p2
+}
+
+task default -depends TestParams
+
+task TestParams {
+ Assert ($my_property -ne $null) "`$my_property should not be null. Run with -parameters @{'p1' = 'v1'; 'p2' = 'v2'}"
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/passingParametersString/build.Release.Version.bat b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/passingParametersString/build.Release.Version.bat
new file mode 100644
index 0000000..a48c126
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/passingParametersString/build.Release.Version.bat
@@ -0,0 +1,3 @@
+powershell -Command "& {Import-Module .\..\..\psake.psm1; Invoke-psake .\parameters.ps1 -parameters @{"buildConfiguration"='Release';} }"
+
+Pause
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/passingParametersString/parameters.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/passingParametersString/parameters.ps1
new file mode 100644
index 0000000..937d644
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/passingParametersString/parameters.ps1
@@ -0,0 +1,22 @@
+properties {
+ $buildOutputPath = ".\bin\$buildConfiguration"
+}
+
+task default -depends DoRelease
+
+task DoRelease {
+ Assert ("$buildConfiguration" -ne $null) "buildConfiguration should not have been null"
+ Assert ("$buildConfiguration" -eq 'Release') "buildConfiguration=[$buildConfiguration] should have been 'Release'"
+
+ Write-Host ""
+ Write-Host ""
+ Write-Host ""
+ Write-Host -NoNewline "Would build output into path "
+ Write-Host -NoNewline -ForegroundColor Green "$buildOutputPath"
+ Write-Host -NoNewline " for build configuration "
+ Write-Host -ForegroundColor Green "$buildConfiguration"
+ Write-Host -NoNewline "."
+ Write-Host ""
+ Write-Host ""
+ Write-Host ""
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/preandpostaction.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/preandpostaction.ps1
new file mode 100644
index 0000000..fcb36e6
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/preandpostaction.ps1
@@ -0,0 +1,13 @@
+task default -depends Test
+
+task Test -depends Compile, Clean -PreAction {"Pre-Test"} -Action {
+ "Test"
+} -PostAction {"Post-Test"}
+
+task Compile -depends Clean {
+ "Compile"
+}
+
+task Clean {
+ "Clean"
+}
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/preandpostcondition.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/preandpostcondition.ps1
new file mode 100644
index 0000000..ce855fb
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/preandpostcondition.ps1
@@ -0,0 +1,18 @@
+properties {
+ $runTaskA = $false
+ $taskBSucceded = $true
+}
+
+task default -depends TaskC
+
+task TaskA -precondition { $runTaskA -eq $true } {
+ "TaskA executed"
+}
+
+task TaskB -postcondition { $taskBSucceded -eq $true } {
+ "TaskB executed"
+}
+
+task TaskC -depends TaskA,TaskB {
+ "TaskC executed."
+}
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/properties.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/properties.ps1
new file mode 100644
index 0000000..ccbb3ec
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/properties.ps1
@@ -0,0 +1,13 @@
+properties {
+ $x = $null
+ $y = $null
+ $z = $null
+}
+
+task default -depends TestProperties
+
+task TestProperties {
+ Assert ($x -ne $null) "x should not be null. Run with -properties @{'x' = '1'; 'y' = '2'}"
+ Assert ($y -ne $null) "y should not be null. Run with -properties @{'x' = '1'; 'y' = '2'}"
+ Assert ($z -eq $null) "z should be null"
+}
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/requiredvariables.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/requiredvariables.ps1
new file mode 100644
index 0000000..d9922bb
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/requiredvariables.ps1
@@ -0,0 +1,14 @@
+properties {
+ $x = $null
+ $y = $null
+ $z = $null
+}
+
+task default -depends TestRequiredVariables
+
+# you can put arguments to task in multiple lines using `
+task TestRequiredVariables `
+ -description "This task shows how to make a variable required to run task. Run this script with -properties @{x = 1; y = 2; z = 3}" `
+ -requiredVariables x, y, z `
+{
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/tasksetupandteardown.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/tasksetupandteardown.ps1
new file mode 100644
index 0000000..be0834a
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/examples/tasksetupandteardown.ps1
@@ -0,0 +1,17 @@
+TaskSetup {
+ "Executing task setup"
+}
+
+TaskTearDown {
+ "Executing task tear down"
+}
+
+Task default -depends TaskB
+
+Task TaskA {
+ "TaskA executed"
+}
+
+Task TaskB -depends TaskA {
+ "TaskB executed"
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/CleanupEnvironment.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/CleanupEnvironment.ps1
new file mode 100644
index 0000000..7d970f6
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/CleanupEnvironment.ps1
@@ -0,0 +1,12 @@
+function CleanupEnvironment {
+ if ($psake.context.Count -gt 0) {
+ $currentContext = $psake.context.Peek()
+ [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
+ $env:PATH = $currentContext.originalEnvPath
+ Set-Location $currentContext.originalDirectory
+ $global:ErrorActionPreference = $currentContext.originalErrorActionPreference
+ $psake.LoadedTaskModules = @{}
+ $psake.ReferenceTasks = @{}
+ [void] $psake.context.Pop()
+ }
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/ConfigureBuildEnvironment.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/ConfigureBuildEnvironment.ps1
new file mode 100644
index 0000000..6233477
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/ConfigureBuildEnvironment.ps1
@@ -0,0 +1,198 @@
+
+function ConfigureBuildEnvironment {
+ if (!(Test-Path Variable:\IsWindows) -or $IsWindows) {
+ $framework = $psake.context.peek().config.framework
+ if ($framework -cmatch '^((?:\d+\.\d+)(?:\.\d+){0,1})(x86|x64){0,1}$') {
+ $versionPart = $matches[1]
+ $bitnessPart = $matches[2]
+ }
+ else {
+ throw ($msgs.error_invalid_framework -f $framework)
+ }
+ $versions = $null
+ $buildToolsVersions = $null
+ switch ($versionPart) {
+ '1.0' {
+ $versions = @('v1.0.3705')
+ }
+ '1.1' {
+ $versions = @('v1.1.4322')
+ }
+ '1.1.0' {
+ $versions = @()
+ }
+ '2.0' {
+ $versions = @('v2.0.50727')
+ }
+ '2.0.0' {
+ $versions = @()
+ }
+ '3.0' {
+ $versions = @('v2.0.50727')
+ }
+ '3.5' {
+ $versions = @('v3.5', 'v2.0.50727')
+ }
+ '4.0' {
+ $versions = @('v4.0.30319')
+ }
+ {($_ -eq '4.5') -or ($_ -eq '4.5.1') -or ($_ -eq '4.5.2')} {
+ $versions = @('v4.0.30319')
+ $buildToolsVersions = @('16.0', '15.0', '14.0', '12.0')
+ }
+ {($_ -eq '4.6') -or ($_ -eq '4.6.1') -or ($_ -eq '4.6.2')} {
+ $versions = @('v4.0.30319')
+ $buildToolsVersions = @('16.0', '15.0', '14.0')
+ }
+ {($_ -eq '4.7') -or ($_ -eq '4.7.1') -or ($_ -eq '4.7.2')} {
+ $versions = @('v4.0.30319')
+ $buildToolsVersions = @('16.0', '15.0')
+ }
+
+ default {
+ throw ($msgs.error_unknown_framework -f $versionPart, $framework)
+ }
+ }
+
+ $bitness = 'Framework'
+ if ($versionPart -ne '1.0' -and $versionPart -ne '1.1') {
+ switch ($bitnessPart) {
+ 'x86' {
+ $bitness = 'Framework'
+ $buildToolsKey = 'MSBuildToolsPath32'
+ }
+ 'x64' {
+ $bitness = 'Framework64'
+ $buildToolsKey = 'MSBuildToolsPath'
+ }
+ { [string]::IsNullOrEmpty($_) } {
+ $ptrSize = [System.IntPtr]::Size
+ switch ($ptrSize) {
+ 4 {
+ $bitness = 'Framework'
+ $buildToolsKey = 'MSBuildToolsPath32'
+ }
+ 8 {
+ $bitness = 'Framework64'
+ $buildToolsKey = 'MSBuildToolsPath'
+ }
+ default {
+ throw ($msgs.error_unknown_pointersize -f $ptrSize)
+ }
+ }
+ }
+ default {
+ throw ($msgs.error_unknown_bitnesspart -f $bitnessPart, $framework)
+ }
+ }
+ }
+
+ $frameworkDirs = @()
+ if ($null -ne $buildToolsVersions) {
+ foreach($ver in $buildToolsVersions) {
+ if ($ver -eq "15.0") {
+ if ($null -eq (Get-Module -Name VSSetup)) {
+ if ($null -eq (Get-Module -Name VSSetup -ListAvailable)) {
+ WriteColoredOutput ($msgs.warning_missing_vsssetup_module -f $ver) -foregroundcolor Yellow
+ continue
+ }
+
+ Import-Module VSSetup
+ }
+
+ # borrowed from nightroman https://github.com/nightroman/Invoke-Build
+ if ($vsInstances = Get-VSSetupInstance) {
+ $vs = @($vsInstances | Select-VSSetupInstance -Version '[15.0,)' -Require Microsoft.Component.MSBuild)
+ if ($vs) {
+ if ($buildToolsKey -eq 'MSBuildToolsPath32') {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin
+ }
+ else {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin\amd64
+ }
+ }
+
+ $vs = @($vsInstances | Select-VSSetupInstance -Version '[15.0,)' -Product Microsoft.VisualStudio.Product.BuildTools)
+ if ($vs) {
+ if ($buildToolsKey -eq 'MSBuildToolsPath32') {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin
+ }
+ else {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin\amd64
+ }
+ }
+ }
+ else {
+ if (!($root = ${env:ProgramFiles(x86)})) {$root = $env:ProgramFiles}
+ if (Test-Path -LiteralPath "$root\Microsoft Visual Studio\2017") {
+ if ($buildToolsKey -eq 'MSBuildToolsPath32') {
+ $rp = @(Resolve-Path "$root\Microsoft Visual Studio\2017\*\MSBuild\15.0\Bin" -ErrorAction SilentlyContinue)
+ }
+ else {
+ $rp = @(Resolve-Path "$root\Microsoft Visual Studio\2017\*\MSBuild\15.0\Bin\amd64" -ErrorAction SilentlyContinue)
+ }
+
+ if ($rp) {
+ $frameworkDirs += $rp[-1].ProviderPath
+ }
+ }
+ }
+ }
+ elseif ($ver -eq "16.0") {
+ if ($null -eq (Get-Module -Name VSSetup)) {
+ if ($null -eq (Get-Module -Name VSSetup -ListAvailable)) {
+ WriteColoredOutput ($msgs.warning_missing_vsssetup_module -f $ver) -foregroundcolor Yellow
+ continue
+ }
+
+ Import-Module VSSetup
+ }
+
+ # borrowed from nightroman https://github.com/nightroman/Invoke-Build
+ if ($vsInstances = Get-VSSetupInstance) {
+ $vs = @($vsInstances | Select-VSSetupInstance -Version '[16.0,)' -Require Microsoft.Component.MSBuild)
+ if ($vs) {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\Current\Bin
+ }
+
+ $vs = @($vsInstances | Select-VSSetupInstance -Version '[16.0,)' -Product Microsoft.VisualStudio.Product.BuildTools)
+ if ($vs) {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\Current\Bin
+ }
+ }
+ else {
+ if (!($root = ${env:ProgramFiles(x86)})) {$root = $env:ProgramFiles}
+ if (Test-Path -LiteralPath "$root\Microsoft Visual Studio\2019") {
+ $rp = @(Resolve-Path "$root\Microsoft Visual Studio\2019\*\MSBuild\Current\Bin" -ErrorAction SilentlyContinue)
+ if ($rp) {
+ $frameworkDirs += $rp[-1].ProviderPath
+ }
+ }
+ }
+ }
+ elseif (Test-Path "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\$ver") {
+ $frameworkDirs += (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\$ver" -Name $buildToolsKey).$buildToolsKey
+ }
+ }
+ }
+
+ $frameworkDirs = $frameworkDirs + @($versions | ForEach-Object { "$env:windir\Microsoft.NET\$bitness\$_\" })
+ for ($i = 0; $i -lt $frameworkDirs.Count; $i++) {
+ $dir = $frameworkDirs[$i]
+ if ($dir -Match "\$\(Registry:HKEY_LOCAL_MACHINE(.*?)@(.*)\)") {
+ $key = "HKLM:" + $matches[1]
+ $name = $matches[2]
+ $dir = (Get-ItemProperty -Path $key -Name $name).$name
+ $frameworkDirs[$i] = $dir
+ }
+ }
+
+ $frameworkDirs | ForEach-Object { Assert (test-path $_ -pathType Container) ($msgs.error_no_framework_install_dir_found -f $_)}
+
+ $env:PATH = ($frameworkDirs -join ";") + ";$env:PATH"
+ }
+
+ # if any error occurs in a PS function then "stop" processing immediately
+ # this does not effect any external programs that return a non-zero exit code
+ $global:ErrorActionPreference = "Stop"
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/CreateConfigurationForNewContext.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/CreateConfigurationForNewContext.ps1
new file mode 100644
index 0000000..cbe91f4
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/CreateConfigurationForNewContext.ps1
@@ -0,0 +1,28 @@
+function CreateConfigurationForNewContext {
+ param(
+ [string] $buildFile,
+ [string] $framework
+ )
+
+ $previousConfig = GetCurrentConfigurationOrDefault
+
+ $config = new-object psobject -property @{
+ buildFileName = $previousConfig.buildFileName;
+ framework = $previousConfig.framework;
+ taskNameFormat = $previousConfig.taskNameFormat;
+ verboseError = $previousConfig.verboseError;
+ coloredOutput = $previousConfig.coloredOutput;
+ modules = $previousConfig.modules;
+ moduleScope = $previousConfig.moduleScope;
+ }
+
+ if ($framework) {
+ $config.framework = $framework;
+ }
+
+ if ($buildFile) {
+ $config.buildFileName = $buildFile;
+ }
+
+ return $config
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/ExecuteInBuildFileScope.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/ExecuteInBuildFileScope.ps1
new file mode 100644
index 0000000..4be547b
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/ExecuteInBuildFileScope.ps1
@@ -0,0 +1,56 @@
+function ExecuteInBuildFileScope {
+ param([string]$buildFile, $module, [scriptblock]$sb)
+
+ # Execute the build file to set up the tasks and defaults
+ Assert (test-path $buildFile -pathType Leaf) ($msgs.error_build_file_not_found -f $buildFile)
+
+ $psake.build_script_file = get-item $buildFile
+ $psake.build_script_dir = $psake.build_script_file.DirectoryName
+ $psake.build_success = $false
+
+ # Create a new psake context
+ $psake.context.push(
+ @{
+ "taskSetupScriptBlock" = {}
+ "taskTearDownScriptBlock" = {}
+ "executedTasks" = new-object System.Collections.Stack
+ "callStack" = new-object System.Collections.Stack
+ "originalEnvPath" = $env:PATH
+ "originalDirectory" = get-location
+ "originalErrorActionPreference" = $global:ErrorActionPreference
+ "tasks" = @{}
+ "aliases" = @{}
+ "properties" = new-object System.Collections.Stack
+ "includes" = new-object System.Collections.Queue
+ "config" = CreateConfigurationForNewContext $buildFile $framework
+ }
+ )
+
+ # Load in the psake configuration (or default)
+ LoadConfiguration $psake.build_script_dir
+
+ set-location $psake.build_script_dir
+
+ # Import any modules declared in the build script
+ LoadModules
+
+ $frameworkOldValue = $framework
+
+ . $psake.build_script_file.FullName
+
+ $currentContext = $psake.context.Peek()
+
+ if ($framework -ne $frameworkOldValue) {
+ writecoloredoutput $msgs.warning_deprecated_framework_variable -foregroundcolor Yellow
+ $currentContext.config.framework = $framework
+ }
+
+ ConfigureBuildEnvironment
+
+ while ($currentContext.includes.Count -gt 0) {
+ $includeFilename = $currentContext.includes.Dequeue()
+ . $includeFilename
+ }
+
+ & $sb $currentContext $module
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/FormatErrorMessage.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/FormatErrorMessage.ps1
new file mode 100644
index 0000000..657aa72
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/FormatErrorMessage.ps1
@@ -0,0 +1,26 @@
+function FormatErrorMessage
+{
+ [CmdletBinding()]
+ param(
+ [Parameter(ValueFromPipeline=$true)]
+ $ErrorRecord = $Error[0]
+ )
+
+ $currentConfig = GetCurrentConfigurationOrDefault
+ if ($currentConfig.verboseError) {
+ $error_message = "{0}: An Error Occurred. See Error Details Below: $($script:nl)" -f (Get-Date)
+ $error_message += ("-" * 70) + $script:nl
+ $error_message += "Error: {0}$($script:nl)" -f (ResolveError $ErrorRecord -Short)
+ $error_message += ("-" * 70) + $script:nl
+ $error_message += ResolveError $ErrorRecord
+ $error_message += ("-" * 70) + $script:nl
+ $error_message += "Script Variables" + $script:nl
+ $error_message += ("-" * 70) + $script:nl
+ $error_message += get-variable -scope script | format-table | out-string
+ } else {
+ # ($_ | Out-String) gets error messages with source information included.
+ $error_message = "Error: {0}: $($script:nl){1}" -f (Get-Date), (ResolveError $ErrorRecord -Short)
+}
+
+ $error_message
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/Get-DefaultBuildFile.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/Get-DefaultBuildFile.ps1
new file mode 100644
index 0000000..5413208
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/Get-DefaultBuildFile.ps1
@@ -0,0 +1,17 @@
+# Attempt to find the default build file given the config_default of
+# buildFileName and legacyBuildFileName. If neither exist optionally
+# return the buildFileName or $null
+function Get-DefaultBuildFile {
+ param(
+ [boolean] $UseDefaultIfNoneExist = $true
+ )
+
+ if (test-path $psake.config_default.buildFileName -pathType Leaf) {
+ Write-Output $psake.config_default.buildFileName
+ } elseif (test-path $psake.config_default.legacyBuildFileName -pathType Leaf) {
+ Write-Warning "The default configuration file of default.ps1 is deprecated. Please use psakefile.ps1"
+ Write-Output $psake.config_default.legacyBuildFileName
+ } elseif ($UseDefaultIfNoneExist) {
+ Write-Output $psake.config_default.buildFileName
+ }
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/GetCurrentConfigurationOrDefault.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/GetCurrentConfigurationOrDefault.ps1
new file mode 100644
index 0000000..ae0fa4f
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/GetCurrentConfigurationOrDefault.ps1
@@ -0,0 +1,7 @@
+function GetCurrentConfigurationOrDefault() {
+ if ($psake.context.count -gt 0) {
+ return $psake.context.peek().config
+ } else {
+ return $psake.config_default
+ }
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/GetTasksFromContext.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/GetTasksFromContext.ps1
new file mode 100644
index 0000000..5764962
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/GetTasksFromContext.ps1
@@ -0,0 +1,15 @@
+function GetTasksFromContext($currentContext) {
+
+ $docs = $currentContext.tasks.Keys | foreach-object {
+
+ $task = $currentContext.tasks.$_
+ new-object PSObject -property @{
+ Name = $task.Name;
+ Alias = $task.Alias;
+ Description = $task.Description;
+ DependsOn = $task.DependsOn;
+ }
+ }
+
+ return $docs
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/LoadConfiguration.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/LoadConfiguration.ps1
new file mode 100644
index 0000000..7cdcd28
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/LoadConfiguration.ps1
@@ -0,0 +1,31 @@
+function LoadConfiguration {
+ <#
+ .SYNOPSIS
+ Load psake-config.ps1 file
+ .DESCRIPTION
+ Load psake-config.ps1 if present in the directory of the current build script.
+ If that file doesn't exist, load the default psake-config.ps1 file from the module directory.
+ #>
+ param(
+ [string]$configdir = (Split-Path -Path $PSScriptRoot -Parent)
+ )
+
+ $configFilePath = Join-Path -Path $configdir -ChildPath $script:psakeConfigFile
+ $defaultConfigFilePath = Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -ChildPath $script:psakeConfigFile
+
+ if (Test-Path -LiteralPath $configFilePath -PathType Leaf) {
+ $configFileToLoad = $configFilePath
+ } elseIf (Test-Path -LiteralPath $defaultConfigFilePath -PathType Leaf) {
+ $configFileToLoad = $defaultConfigFilePath
+ } else {
+ throw 'Cannot find psake-config.ps1'
+ }
+
+ try {
+ [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
+ $config = GetCurrentConfigurationOrDefault
+ . $configFileToLoad
+ } catch {
+ throw 'Error Loading Configuration from {0}: {1}' -f $configFileToLoad, $_
+ }
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/LoadModules.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/LoadModules.ps1
new file mode 100644
index 0000000..7182b1f
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/LoadModules.ps1
@@ -0,0 +1,21 @@
+function LoadModules {
+ $currentConfig = $psake.context.peek().config
+ if ($currentConfig.modules) {
+
+ $scope = $currentConfig.moduleScope
+
+ $global = [string]::Equals($scope, "global", [StringComparison]::CurrentCultureIgnoreCase)
+
+ $currentConfig.modules | ForEach-Object {
+ resolve-path $_ | ForEach-Object {
+ "Loading module: $_"
+ $module = Import-Module $_ -passthru -DisableNameChecking -global:$global
+ if (!$module) {
+ throw ($msgs.error_loading_module -f $_.Name)
+ }
+ }
+ }
+
+ ""
+ }
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/ResolveError.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/ResolveError.ps1
new file mode 100644
index 0000000..3f697ba
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/ResolveError.ps1
@@ -0,0 +1,62 @@
+# borrowed from Jeffrey Snover http://blogs.msdn.com/powershell/archive/2006/12/07/resolve-error.aspx
+# modified to better handle SQL errors
+function ResolveError
+{
+ [CmdletBinding()]
+ param(
+ [Parameter(ValueFromPipeline=$true)]
+ $ErrorRecord=$Error[0],
+ [Switch]
+ $Short
+ )
+
+ process {
+ if ($_ -eq $null) { $_ = $ErrorRecord }
+ $ex = $_.Exception
+
+ if (-not $Short) {
+ $error_message = "$($script:nl)ErrorRecord:{0}ErrorRecord.InvocationInfo:{1}Exception:$($script:nl){2}"
+ $formatted_errorRecord = $_ | format-list * -force | out-string
+ $formatted_invocationInfo = $_.InvocationInfo | format-list * -force | out-string
+ $formatted_exception = ''
+
+ $i = 0
+ while ($null -ne $ex) {
+ $i++
+ $formatted_exception += ("$i" * 70) + $script:nl +
+ ($ex | format-list * -force | out-string) + $script:nl
+ $ex = $ex | SelectObjectWithDefault -Name 'InnerException' -Value $null
+ }
+
+ return $error_message -f $formatted_errorRecord, $formatted_invocationInfo, $formatted_exception
+ }
+
+ $lastException = @()
+ while ($null -ne $ex) {
+ $lastMessage = $ex | SelectObjectWithDefault -Name 'Message' -Value ''
+ $lastException += ($lastMessage -replace $script:nl, '')
+ if ($ex -is [Data.SqlClient.SqlException]) {
+ $lastException += "(Line [$($ex.LineNumber)] " +
+ "Procedure [$($ex.Procedure)] Class [$($ex.Class)] " +
+ " Number [$($ex.Number)] State [$($ex.State)] )"
+ }
+ $ex = $ex | SelectObjectWithDefault -Name 'InnerException' -Value $null
+ }
+ $shortException = $lastException -join ' --> '
+
+ $header = $null
+ $header = (($_.InvocationInfo |
+ SelectObjectWithDefault -Name 'PositionMessage' -Value '') -replace $script:nl, ' '),
+ ($_ | SelectObjectWithDefault -Name 'Message' -Value ''),
+ ($_ | SelectObjectWithDefault -Name 'Exception' -Value '') |
+ Where-Object { -not [String]::IsNullOrEmpty($_) } |
+ Select-Object -First 1
+
+ $delimiter = ''
+ if ((-not [String]::IsNullOrEmpty($header)) -and
+ (-not [String]::IsNullOrEmpty($shortException)))
+ { $delimiter = ' [<<==>>] ' }
+
+ return "$($header)$($delimiter)Exception: $($shortException)"
+ }
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/SelectObjectWithDefault.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/SelectObjectWithDefault.ps1
new file mode 100644
index 0000000..f60af9d
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/SelectObjectWithDefault.ps1
@@ -0,0 +1,23 @@
+function SelectObjectWithDefault
+{
+ [CmdletBinding()]
+ param(
+ [Parameter(ValueFromPipeline=$true)]
+ [PSObject]
+ $InputObject,
+ [string]
+ $Name,
+ $Value
+ )
+
+ process {
+ if ($_ -eq $null) { $Value }
+ elseif ($_ | Get-Member -Name $Name) {
+ $_.$Name
+ }
+ elseif (($_ -is [Hashtable]) -and ($_.Keys -contains $Name)) {
+ $_.$Name
+ }
+ else { $Value }
+ }
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/Test-ModuleVersion.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/Test-ModuleVersion.ps1
new file mode 100644
index 0000000..c1c9fb5
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/Test-ModuleVersion.ps1
@@ -0,0 +1,107 @@
+<#
+.SYNOPSIS
+ Validate that the version of a module passed in via the $currentVersion
+ parameter is valid based on the criteria specified by the following
+ parameters.
+.DESCRIPTION
+ This function is used to determine whether or not a given module is within
+ the version bounds specified by the parameters passed in. Psake will use
+ this information to determine if the module it has found will contain the
+ proper version of the shared task it has been asked to import.
+
+ This function should allow bounds that are only on the lower limit, only on
+ the upper, within a range, or if no bounds are supplied, the current module
+ will be accepted without question.
+.PARAMETER currentVersion
+ The version of the module in the current session to be subjected to comparison
+.PARAMETER minimumVersion
+ The lower bound of the version that will be accepted. This comparison should
+ be inclusive, meaning an input version greater than or equal to this version
+ should be accepted.
+.PARAMETER maximumVersion
+ The upper bound of the version that will be accepted. This comparison should
+ be inclusive, meaning an input version less than or equal to this version
+ should be accepted.
+.PARAMETER lessThanVersion
+ The upper bound of the version that will be accepted. This comparison should
+ be exlusive. Meaning an input version that is less than only, not equal to
+ this version, will be accepted.
+.INPUTS
+ A $currentVersion of type [System.Version] or a convertable string.
+ A set of version criteria, each of type [System.Version] or a convertable string.
+.OUTPUTS
+ boolean - Pass/Fail
+#>
+function Test-ModuleVersion {
+ [CmdletBinding()]
+ param (
+ [string]$currentVersion,
+ [string]$minimumVersion,
+ [string]$maximumVersion,
+ [string]$lessThanVersion
+ )
+
+ begin {
+ }
+
+ process {
+ $result = $true
+
+ # If no version is specified simply return true and allow the module to pass.
+ if("$minimumVersion$maximumVersion$lessthanVersion" -eq ''){
+ return $true
+ }
+
+ # Single integer values cannot be converted to type system.version.
+ # We convert to a string, and if there is a single character we know that
+ # we need to add a '.0' to the integer to make it convertable to a version.
+ if(![string]::IsNullOrEmpty($currentVersion)) {
+ if($currentVersion.ToString().Length -eq 1) {
+ [version]$currentVersion = "$currentVersion.0"
+ } else {
+ [version]$currentVersion = $currentVersion
+ }
+ }
+
+ if(![string]::IsNullOrEmpty($minimumVersion)) {
+ if($minimumVersion.ToString().Length -eq 1){
+ [version]$minimumVersion = "$minimumVersion.0"
+ } else {
+ [version]$minimumVersion = $minimumVersion
+ }
+
+ if($currentVersion.CompareTo($minimumVersion) -lt 0){
+ $result = $false
+ }
+ }
+
+ if(![string]::IsNullOrEmpty($maximumVersion)) {
+ if($maximumVersion.ToString().Length -eq 1) {
+ [version]$maximumVersion = "$maximumVersion.0"
+ } else {
+ [version]$maximumVersion = $maximumVersion
+ }
+
+ if ($currentVersion.CompareTo($maximumVersion) -gt 0) {
+ $result = $false
+ }
+ }
+
+ if(![string]::IsNullOrEmpty($lessThanVersion)) {
+ if($lessThanVersion.ToString().Length -eq 1) {
+ [version]$lessThanVersion = "$lessThanVersion.0"
+ } else {
+ [version]$lessThanVersion = $lessThanVersion
+ }
+
+ if($currentVersion.CompareTo($lessThanVersion) -ge 0) {
+ $result = $false
+ }
+ }
+
+ Write-Output $result
+ }
+
+ end {
+ }
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/WriteColoredOutput.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/WriteColoredOutput.ps1
new file mode 100644
index 0000000..5c33ec6
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/WriteColoredOutput.ps1
@@ -0,0 +1,20 @@
+function WriteColoredOutput {
+ param(
+ [string] $message,
+ [System.ConsoleColor] $foregroundcolor
+ )
+
+ $currentConfig = GetCurrentConfigurationOrDefault
+ if ($currentConfig.coloredOutput -eq $true) {
+ if (($null -ne $Host.UI) -and ($null -ne $Host.UI.RawUI) -and ($null -ne $Host.UI.RawUI.ForegroundColor)) {
+ $previousColor = $Host.UI.RawUI.ForegroundColor
+ $Host.UI.RawUI.ForegroundColor = $foregroundcolor
+ }
+ }
+
+ $message
+
+ if ($null -ne $previousColor) {
+ $Host.UI.RawUI.ForegroundColor = $previousColor
+ }
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/WriteDocumentation.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/WriteDocumentation.ps1
new file mode 100644
index 0000000..a131e54
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/WriteDocumentation.ps1
@@ -0,0 +1,26 @@
+function WriteDocumentation($showDetailed) {
+
+ $currentContext = $psake.context.Peek()
+
+ if ($currentContext.tasks.default) {
+ $defaultTaskDependencies = $currentContext.tasks.default.DependsOn
+ } else {
+ $defaultTaskDependencies = @()
+ }
+
+ $docs = GetTasksFromContext $currentContext |
+ Where-Object {$_.Name -ne 'default'} |
+ ForEach-Object {
+ $isDefault = $null
+ if ($defaultTaskDependencies -contains $_.Name) {
+ $isDefault = $true
+ }
+ return Add-Member -InputObject $_ 'Default' $isDefault -PassThru
+ }
+
+ if ($showDetailed) {
+ $docs | Sort-Object 'Name' | format-list -property Name,Alias,Description,@{Label="Depends On";Expression={$_.DependsOn -join ', '}},Default
+ } else {
+ $docs | Sort-Object 'Name' | format-table -autoSize -wrap -property Name,Alias,@{Label="Depends On";Expression={$_.DependsOn -join ', '}},Default,Description
+ }
+ }
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/WriteTaskTimeSummary.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/WriteTaskTimeSummary.ps1
new file mode 100644
index 0000000..732a2d6
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/private/WriteTaskTimeSummary.ps1
@@ -0,0 +1,34 @@
+function WriteTaskTimeSummary($invokePsakeDuration) {
+ if ($psake.context.count -gt 0) {
+ $currentContext = $psake.context.Peek()
+ if ($currentContext.config.taskNameFormat -is [ScriptBlock]) {
+ & $currentContext.config.taskNameFormat "Build Time Report"
+ } elseif ($currentContext.config.taskNameFormat -ne "Executing {0}") {
+ $currentContext.config.taskNameFormat -f "Build Time Report"
+ }
+ else {
+ "-" * 70
+ "Build Time Report"
+ "-" * 70
+ }
+ $list = @()
+ while ($currentContext.executedTasks.Count -gt 0) {
+ $taskKey = $currentContext.executedTasks.Pop()
+ $task = $currentContext.tasks.$taskKey
+ if ($taskKey -eq "default") {
+ continue
+ }
+ $list += new-object PSObject -property @{
+ Name = $task.Name;
+ Duration = $task.Duration.ToString("hh\:mm\:ss\.fff")
+ }
+ }
+ [Array]::Reverse($list)
+ $list += new-object PSObject -property @{
+ Name = "Total:";
+ Duration = $invokePsakeDuration.ToString("hh\:mm\:ss\.fff")
+ }
+ # using "out-string | where-object" to filter out the blank line that format-table prepends
+ $list | format-table -autoSize -property Name,Duration | out-string -stream | where-object { $_ }
+ }
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake
new file mode 100644
index 0000000..e2cbfc5
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake
@@ -0,0 +1,12 @@
+#!/usr/bin/env sh
+
+# Use greadlink on macOS.
+if [ "$(uname)" = "Darwin" ]; then
+ which greadlink > /dev/null || {
+ printf 'GNU readlink not found\n'
+ exit 1
+ }
+ alias readlink="greadlink"
+fi
+
+pwsh -NoProfile -Command "& $(dirname "$(readlink -f -- "$0")")/psake.ps1 $@"
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake-config.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake-config.ps1
new file mode 100644
index 0000000..2c5001f
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake-config.ps1
@@ -0,0 +1,22 @@
+<#
+-------------------------------------------------------------------
+Defaults
+-------------------------------------------------------------------
+$config.buildFileName="psakefile.ps1"
+$config.legacyBuildFileName="default.ps1"
+$config.framework = "4.0"
+$config.taskNameFormat="Executing {0}"
+$config.verboseError=$false
+$config.coloredOutput = $true
+$config.modules=$null
+
+-------------------------------------------------------------------
+Load modules from .\modules folder and from file my_module.psm1
+-------------------------------------------------------------------
+$config.modules=(".\modules\*.psm1",".\my_module.psm1")
+
+-------------------------------------------------------------------
+Use scriptblock for taskNameFormat
+-------------------------------------------------------------------
+$config.taskNameFormat= { param($taskName) "Executing $taskName at $(get-date)" }
+#>
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake.cmd b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake.cmd
new file mode 100644
index 0000000..634314e
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake.cmd
@@ -0,0 +1,14 @@
+@echo off
+rem Helper script for those who want to run psake from cmd.exe
+rem Example run from cmd.exe:
+rem psake "psakefile.ps1" "BuildHelloWord" "4.0"
+
+if '%1'=='/?' goto help
+if '%1'=='-help' goto help
+if '%1'=='-h' goto help
+
+powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\psake.ps1' %*"
+exit /B %errorlevel%
+
+:help
+powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\psake.ps1' -help"
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake.ps1
new file mode 100644
index 0000000..0fe9e6f
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake.ps1
@@ -0,0 +1,71 @@
+# Helper script for those who want to run psake without importing the module.
+# Example run from PowerShell:
+# .\psake.ps1 "psakefile.ps1" "BuildHelloWord" "4.0"
+
+# Must match parameter definitions for psake.psm1/invoke-psake
+# otherwise named parameter binding fails
+[cmdletbinding()]
+param(
+ [Parameter(Position = 0, Mandatory = $false)]
+ [string]$buildFile,
+
+ [Parameter(Position = 1, Mandatory = $false)]
+ [string[]]$taskList = @(),
+
+ [Parameter(Position = 2, Mandatory = $false)]
+ [string]$framework,
+
+ [Parameter(Position = 3, Mandatory = $false)]
+ [switch]$docs = $false,
+
+ [Parameter(Position = 4, Mandatory = $false)]
+ [System.Collections.Hashtable]$parameters = @{},
+
+ [Parameter(Position = 5, Mandatory = $false)]
+ [System.Collections.Hashtable]$properties = @{},
+
+ [Parameter(Position = 6, Mandatory = $false)]
+ [alias("init")]
+ [scriptblock]$initialization = {},
+
+ [Parameter(Position = 7, Mandatory = $false)]
+ [switch]$nologo = $false,
+
+ [Parameter(Position = 8, Mandatory = $false)]
+ [switch]$help = $false,
+
+ [Parameter(Position = 9, Mandatory = $false)]
+ [string]$scriptPath,
+
+ [Parameter(Position = 10, Mandatory = $false)]
+ [switch]$detailedDocs = $false,
+
+ [Parameter(Position = 11, Mandatory = $false)]
+ [switch]$notr = $false
+)
+
+# setting $scriptPath here, not as default argument, to support calling as "powershell -File psake.ps1"
+if (-not $scriptPath) {
+ $scriptPath = $(Split-Path -Path $MyInvocation.MyCommand.path -Parent)
+}
+
+# '[p]sake' is the same as 'psake' but $Error is not polluted
+Remove-Module -Name [p]sake -Verbose:$false
+Import-Module -Name (Join-Path -Path $scriptPath -ChildPath 'psake.psd1') -Verbose:$false
+if ($help) {
+ Get-Help -Name Invoke-psake -Full
+ return
+}
+
+if ($buildFile -and (-not (Test-Path -Path $buildFile))) {
+ $absoluteBuildFile = (Join-Path -Path $scriptPath -ChildPath $buildFile)
+ if (Test-path -Path $absoluteBuildFile) {
+ $buildFile = $absoluteBuildFile
+ }
+}
+
+Invoke-psake $buildFile $taskList $framework $docs $parameters $properties $initialization $nologo $detailedDocs $notr
+
+if (!$psake.build_success) {
+ exit 1
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake.psd1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake.psd1
new file mode 100644
index 0000000..ab339f2
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake.psd1
@@ -0,0 +1,33 @@
+@{
+ RootModule = 'psake.psm1'
+ ModuleVersion = '4.8.0'
+ GUID = 'cfb53216-072f-4a46-8975-ff7e6bda05a5'
+ Author = 'James Kovacs'
+ Copyright = 'Copyright (c) 2010-18 James Kovacs, Damian Hickey, Brandon Olin, and Contributors'
+ PowerShellVersion = '3.0'
+ Description = 'psake is a build automation tool written in PowerShell.'
+ FunctionsToExport = @(
+ 'Invoke-psake'
+ 'Invoke-Task'
+ 'Get-PSakeScriptTasks'
+ 'Task'
+ 'Properties'
+ 'Include'
+ 'FormatTaskName'
+ 'TaskSetup'
+ 'TaskTearDown'
+ 'Framework'
+ 'Assert'
+ 'Exec'
+ )
+ VariablesToExport = 'psake'
+ PrivateData = @{
+ PSData = @{
+ ReleaseNotes = 'https://raw.githubusercontent.com/psake/psake/master/CHANGELOG.md'
+ LicenseUri = 'https://raw.githubusercontent.com/psake/psake/master/license.txt'
+ ProjectUri = 'https://github.com/psake/psake'
+ Tags = @('Build', 'Task')
+ IconUri = 'https://raw.githubusercontent.com/psake/graphics/master/png/psake-single-icon-teal-bg-256x256.png'
+ }
+ }
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake.psm1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake.psm1
new file mode 100644
index 0000000..1d5f008
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/psake.psm1
@@ -0,0 +1,112 @@
+# psake
+# Copyright (c) 2012 James Kovacs
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+#Requires -Version 2.0
+
+if ($PSVersionTable.PSVersion.Major -ge 3) {
+ $script:IgnoreError = 'Ignore'
+} else {
+ $script:IgnoreError = 'SilentlyContinue'
+}
+
+$script:nl = [System.Environment]::NewLine
+
+# Dot source public/private functions
+$dotSourceParams = @{
+ Filter = '*.ps1'
+ Recurse = $true
+ ErrorAction = 'Stop'
+}
+$public = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -ChildPath 'public') @dotSourceParams )
+$private = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -ChildPath 'private/*.ps1') @dotSourceParams)
+foreach ($import in @($public + $private)) {
+ try {
+ . $import.FullName
+ } catch {
+ throw "Unable to dot source [$($import.FullName)]"
+ }
+}
+
+DATA msgs {
+ convertfrom-stringdata @'
+ error_invalid_task_name = Task name should not be null or empty string.
+ error_task_name_does_not_exist = Task {0} does not exist.
+ error_circular_reference = Circular reference found for task {0}.
+ error_missing_action_parameter = Action parameter must be specified when using PreAction or PostAction parameters for task {0}.
+ error_corrupt_callstack = Call stack was corrupt. Expected {0}, but got {1}.
+ error_invalid_framework = Invalid .NET Framework version, {0} specified.
+ error_unknown_framework = Unknown .NET Framework version, {0} specified in {1}.
+ error_unknown_pointersize = Unknown pointer size ({0}) returned from System.IntPtr.
+ error_unknown_bitnesspart = Unknown .NET Framework bitness, {0}, specified in {1}.
+ error_unknown_module = Unable to find module [{0}].
+ error_no_framework_install_dir_found = No .NET Framework installation directory found at {0}.
+ error_bad_command = Error executing command {0}.
+ error_default_task_cannot_have_action = 'default' task cannot specify an action.
+ error_shared_task_cannot_have_action = '{0} references a shared task from module {1} and cannot have an action.
+ error_duplicate_task_name = Task {0} has already been defined.
+ error_duplicate_alias_name = Alias {0} has already been defined.
+ error_invalid_include_path = Unable to include {0}. File not found.
+ error_build_file_not_found = Could not find the build file {0}.
+ error_no_default_task = 'default' task required.
+ error_loading_module = Error loading module {0}.
+ warning_deprecated_framework_variable = Warning: Using global variable $framework to set .NET framework version used is deprecated. Instead use Framework function or configuration file psake-config.ps1.
+ warning_missing_vsssetup_module = Warning: Cannot find build tools version {0} without the module VSSetup. You can install this module with the command: Install-Module VSSetup -Scope CurrentUser
+ required_variable_not_set = Variable {0} must be set to run task {1}.
+ postcondition_failed = Postcondition failed for task {0}.
+ precondition_was_false = Precondition was false, not executing task {0}.
+ continue_on_error = Error in task {0}. {1}
+ psake_success = psake succeeded executing {0}
+'@
+}
+
+Import-LocalizedData -BindingVariable msgs -FileName messages.psd1 -ErrorAction $script:IgnoreError
+
+$scriptDir = Split-Path $MyInvocation.MyCommand.Path
+$manifestPath = Join-Path $scriptDir psake.psd1
+$manifest = Test-ModuleManifest -Path $manifestPath -WarningAction SilentlyContinue
+
+$script:psakeConfigFile = 'psake-config.ps1'
+
+$script:psake = @{}
+
+$psake.version = $manifest.Version.ToString()
+$psake.context = new-object system.collections.stack # holds onto the current state of all variables
+$psake.run_by_psake_build_tester = $false # indicates that build is being run by psake-BuildTester
+$psake.LoadedTaskModules = @{}
+$psake.ReferenceTasks = @{}
+$psake.config_default = new-object psobject -property @{
+ buildFileName = "psakefile.ps1"
+ legacyBuildFileName = "default.ps1"
+ framework = "4.0"
+ taskNameFormat = "Executing {0}"
+ verboseError = $false
+ coloredOutput = $true
+ modules = $null
+ moduleScope = ""
+} # contains default configuration, can be overridden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script
+
+$psake.build_success = $false # indicates that the current build was successful
+$psake.build_script_file = $null # contains a System.IO.FileInfo for the current build script
+$psake.build_script_dir = "" # contains a string with fully-qualified path to current build script
+$psake.error_message = $null # contains the error message which caused the script to fail
+
+LoadConfiguration
+
+export-modulemember -function $public.BaseName -variable psake
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Assert.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Assert.ps1
new file mode 100644
index 0000000..471e561
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Assert.ps1
@@ -0,0 +1,71 @@
+function Assert {
+ <#
+ .SYNOPSIS
+ Helper function for "Design by Contract" assertion checking.
+
+ .DESCRIPTION
+ This is a helper function that makes the code less noisy by eliminating many of the "if" statements that are normally required to verify assumptions in the code.
+
+ .PARAMETER conditionToCheck
+ The boolean condition to evaluate
+
+ .PARAMETER failureMessage
+ The error message used for the exception if the conditionToCheck parameter is false
+
+ .EXAMPLE
+ C:\PS>Assert $false "This always throws an exception"
+
+ Example of an assertion that will always fail.
+
+ .EXAMPLE
+ C:\PS>Assert ( ($i % 2) -eq 0 ) "$i is not an even number"
+
+ This exmaple may throw an exception if $i is not an even number
+
+ Note:
+ It might be necessary to wrap the condition with paranthesis to force PS to evaluate the condition
+ so that a boolean value is calculated and passed into the 'conditionToCheck' parameter.
+
+ Example:
+ Assert 1 -eq 2 "1 doesn't equal 2"
+
+ PS will pass 1 into the condtionToCheck variable and PS will look for a parameter called "eq" and
+ throw an exception with the following message "A parameter cannot be found that matches parameter name 'eq'"
+
+ The solution is to wrap the condition in () so that PS will evaluate it first.
+
+ Assert (1 -eq 2) "1 doesn't equal 2"
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ $conditionToCheck,
+
+ [Parameter(Mandatory = $true)]
+ [string]$failureMessage
+ )
+
+ if (-not $conditionToCheck) {
+ throw ('Assert: {0}' -f $failureMessage)
+ }
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Exec.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Exec.ps1
new file mode 100644
index 0000000..52e8c85
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Exec.ps1
@@ -0,0 +1,109 @@
+function Exec {
+ <#
+ .SYNOPSIS
+ Helper function for executing command-line programs.
+
+ .DESCRIPTION
+ This is a helper function that runs a scriptblock and checks the PS variable $lastexitcode to see if an error occcured.
+ If an error is detected then an exception is thrown.
+ This function allows you to run command-line programs without having to explicitly check fthe $lastexitcode variable.
+
+ .PARAMETER cmd
+ The scriptblock to execute. This scriptblock will typically contain the command-line invocation.
+
+ .PARAMETER errorMessage
+ The error message to display if the external command returned a non-zero exit code.
+
+ .PARAMETER maxRetries
+ The maximum number of times to retry the command before failing.
+
+ .PARAMETER retryTriggerErrorPattern
+ If the external command raises an exception, match the exception against this regex to determine if the command can be retried.
+ If a match is found, the command will be retried provided [maxRetries] has not been reached.
+
+ .PARAMETER workingDirectory
+ The working directory to set before running the external command.
+
+ .EXAMPLE
+ exec { svn info $repository_trunk } "Error executing SVN. Please verify SVN command-line client is installed"
+
+ This example calls the svn command-line client.
+ .LINK
+ Assert
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ .LINK
+ Properties
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [scriptblock]$cmd,
+
+ [string]$errorMessage = ($msgs.error_bad_command -f $cmd),
+
+ [int]$maxRetries = 0,
+
+ [string]$retryTriggerErrorPattern = $null,
+
+ [string]$workingDirectory = $null
+ )
+
+ if ($workingDirectory) {
+ Push-Location -Path $workingDirectory
+ }
+
+ $tryCount = 1
+
+ do {
+ try {
+ $global:lastexitcode = 0
+ & $cmd
+ if ($global:lastexitcode -ne 0) {
+ throw "Exec: $errorMessage"
+ }
+ break
+ }
+ catch [Exception] {
+ if ($tryCount -gt $maxRetries) {
+ throw $_
+ }
+
+ if ($retryTriggerErrorPattern -ne $null) {
+ $isMatch = [regex]::IsMatch($_.Exception.Message, $retryTriggerErrorPattern)
+
+ if ($isMatch -eq $false) {
+ throw $_
+ }
+ }
+
+ "Try $tryCount failed, retrying again in 1 second..."
+
+ $tryCount++
+
+ [System.Threading.Thread]::Sleep([System.TimeSpan]::FromSeconds(1))
+ }
+ finally {
+ if ($workingDirectory) {
+ Pop-Location
+ }
+ }
+ }
+ while ($true)
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/FormatTaskName.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/FormatTaskName.ps1
new file mode 100644
index 0000000..a8be633
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/FormatTaskName.ps1
@@ -0,0 +1,95 @@
+function FormatTaskName {
+ <#
+ .SYNOPSIS
+ This function allows you to change how psake renders the task name during a build.
+
+ .DESCRIPTION
+ This function takes either a string which represents a format string (formats using the -f format operator see "help about_operators") or it can accept a script block that has a single parameter that is the name of the task that will be executed.
+
+ .PARAMETER format
+ A format string or a scriptblock to execute
+
+ .EXAMPLE
+ A sample build script that uses a format string is shown below:
+
+ Task default -depends TaskA, TaskB, TaskC
+
+ FormatTaskName "-------- {0} --------"
+
+ Task TaskA {
+ "TaskA is executing"
+ }
+
+ Task TaskB {
+ "TaskB is executing"
+ }
+
+ Task TaskC {
+ "TaskC is executing"
+
+ -----------
+ The script above produces the following output:
+
+ -------- TaskA --------
+ TaskA is executing
+ -------- TaskB --------
+ TaskB is executing
+ -------- TaskC --------
+ TaskC is executing
+
+ Build Succeeded!
+ .EXAMPLE
+ A sample build script that uses a ScriptBlock is shown below:
+
+ Task default -depends TaskA, TaskB, TaskC
+
+ FormatTaskName {
+ param($taskName)
+ write-host "Executing Task: $taskName" -foregroundcolor blue
+ }
+
+ Task TaskA {
+ "TaskA is executing"
+ }
+
+ Task TaskB {
+ "TaskB is executing"
+ }
+
+ Task TaskC {
+ "TaskC is executing"
+ }
+
+ -----------
+ The above example uses the scriptblock parameter to the FormatTaskName function to render each task name in the color blue.
+
+ Note: the $taskName parameter is arbitrary, it could be named anything.
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ $format
+ )
+
+ $psake.context.Peek().config.taskNameFormat = $format
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Framework.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Framework.ps1
new file mode 100644
index 0000000..304bb06
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Framework.ps1
@@ -0,0 +1,55 @@
+function Framework {
+ <#
+ .SYNOPSIS
+ Sets the version of the .NET framework you want to use during build.
+
+ .DESCRIPTION
+ This function will accept a string containing version of the .NET framework to use during build.
+ Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x64', '4.5', '4.5x86', '4.5x64', '4.5.1', '4.5.1x86', '4.5.1x64'.
+ Default is '3.5*', where x86 or x64 will be detected based on the bitness of the PowerShell process.
+
+ .PARAMETER framework
+ Version of the .NET framework to use during build.
+
+ .EXAMPLE
+ Framework "4.0"
+
+ Task default -depends Compile
+
+ Task Compile -depends Clean {
+ msbuild /version
+ }
+
+ -----------
+ The script above will output detailed version of msbuid v4
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$framework
+ )
+
+ $psake.context.Peek().config.framework = $framework
+
+ ConfigureBuildEnvironment
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Get-PSakeScriptTasks.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Get-PSakeScriptTasks.ps1
new file mode 100644
index 0000000..e0f8f96
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Get-PSakeScriptTasks.ps1
@@ -0,0 +1,45 @@
+function Get-PSakeScriptTasks {
+ <#
+ .SYNOPSIS
+ Returns meta data about all the tasks defined in the provided psake script.
+
+ .DESCRIPTION
+ Returns meta data about all the tasks defined in the provided psake script.
+
+ .PARAMETER buildFile
+ The path to the psake build script to read the tasks from.
+
+ .EXAMPLE
+ PS C:\>Get-PSakeScriptTasks -buildFile '.\build.ps1'
+
+ DependsOn Alias Name Description
+ --------- ----- ---- -----------
+ {} Compile
+ {} Clean
+ {Test} Default
+ {Clean, Compile} Test
+
+ Gets the psake tasks contained in the 'build.ps1' file.
+
+ .LINK
+ Invoke-psake
+ #>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseSingularNouns', '')]
+ [CmdletBinding()]
+ param(
+ [string]$buildFile
+ )
+
+ if (-not $buildFile) {
+ $buildFile = $psake.config_default.buildFileName
+ }
+
+ try {
+ ExecuteInBuildFileScope $buildFile $MyInvocation.MyCommand.Module {
+ param($currentContext, $module)
+ return GetTasksFromContext $currentContext
+ }
+ } finally {
+ CleanupEnvironment
+ }
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Include.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Include.ps1
new file mode 100644
index 0000000..3c163fe
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Include.ps1
@@ -0,0 +1,64 @@
+function Include {
+ <#
+ .SYNOPSIS
+ Include the functions or code of another powershell script file into the current build script's scope
+
+ .DESCRIPTION
+ A build script may declare an "includes" function which allows you to define a file containing powershell code to be included
+ and added to the scope of the currently running build script. Code from such file will be executed after code from build script.
+
+ .PARAMETER fileNamePathToInclude
+ A string containing the path and name of the powershell file to include
+
+ .EXAMPLE
+ A sample build script is shown below:
+
+ Include ".\build_utils.ps1"
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ -----------
+ The script above includes all the functions and variables defined in the ".\build_utils.ps1" script into the current build script's scope
+
+ Note: You can have more than 1 "Include" function defined in the build script.
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$fileNamePathToInclude
+ )
+
+ Assert (test-path $fileNamePathToInclude -pathType Leaf) ($msgs.error_invalid_include_path -f $fileNamePathToInclude)
+
+ $psake.context.Peek().includes.Enqueue((Resolve-Path $fileNamePathToInclude));
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Invoke-Task.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Invoke-Task.ps1
new file mode 100644
index 0000000..e441170
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Invoke-Task.ps1
@@ -0,0 +1,158 @@
+function Invoke-Task {
+ <#
+ .SYNOPSIS
+ Executes another task in the current build script.
+
+ .DESCRIPTION
+ This is a function that will allow you to invoke a Task from within another Task in the current build script.
+
+ .PARAMETER taskName
+ The name of the task to execute.
+
+ .EXAMPLE
+ Invoke-Task "Compile"
+
+ This example calls the "Compile" task.
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$taskName
+ )
+
+ Assert $taskName ($msgs.error_invalid_task_name)
+
+ $taskKey = $taskName.ToLower()
+
+ $currentContext = $psake.context.Peek()
+
+ if ($currentContext.aliases.Contains($taskKey)) {
+ $taskName = $currentContext.aliases.$taskKey.Name
+ $taskKey = $taskName.ToLower()
+ }
+
+ Assert ($currentContext.tasks.Contains($taskKey)) ($msgs.error_task_name_does_not_exist -f $taskName)
+
+ if ($currentContext.executedTasks.Contains($taskKey)) { return }
+
+ Assert (!$currentContext.callStack.Contains($taskKey)) ($msgs.error_circular_reference -f $taskName)
+
+ $currentContext.callStack.Push($taskKey)
+
+ $task = $currentContext.tasks.$taskKey
+
+ $precondition_is_valid = & $task.Precondition
+
+ if (!$precondition_is_valid) {
+ WriteColoredOutput ($msgs.precondition_was_false -f $taskName) -foregroundcolor Cyan
+ } else {
+ if ($taskKey -ne 'default') {
+
+ if ($task.PreAction -or $task.PostAction) {
+ Assert ($null -ne $task.Action) ($msgs.error_missing_action_parameter -f $taskName)
+ }
+
+ if ($task.Action) {
+
+ $stopwatch = new-object System.Diagnostics.Stopwatch
+
+ try {
+ foreach($childTask in $task.DependsOn) {
+ Invoke-Task $childTask
+ }
+ $stopwatch.Start()
+
+ $currentContext.currentTaskName = $taskName
+
+ try {
+ & $currentContext.taskSetupScriptBlock @($task)
+ try {
+ if ($task.PreAction) {
+ & $task.PreAction
+ }
+
+ if ($currentContext.config.taskNameFormat -is [ScriptBlock]) {
+ $taskHeader = & $currentContext.config.taskNameFormat $taskName
+ } else {
+ $taskHeader = $currentContext.config.taskNameFormat -f $taskName
+ }
+ WriteColoredOutput $taskHeader -foregroundcolor Cyan
+
+ foreach ($variable in $task.requiredVariables) {
+ Assert ((Test-Path "variable:$variable") -and ($null -ne (Get-Variable $variable).Value)) ($msgs.required_variable_not_set -f $variable, $taskName)
+ }
+
+ & $task.Action
+ } finally {
+ if ($task.PostAction) {
+ & $task.PostAction
+ }
+ }
+ } catch {
+ # want to catch errors here _before_ we invoke TaskTearDown
+ # so that TaskTearDown reliably gets the Task-scoped
+ # success/fail/error context.
+ $task.Success = $false
+ $task.ErrorMessage = $_
+ $task.ErrorDetail = $_ | Out-String
+ $task.ErrorFormatted = FormatErrorMessage $_
+
+ throw $_ # pass this up the chain; cleanup is handled higher int he stack
+ } finally {
+ & $currentContext.taskTearDownScriptBlock $task
+ }
+ } catch {
+ if ($task.ContinueOnError) {
+ "-"*70
+ WriteColoredOutput ($msgs.continue_on_error -f $taskName,$_) -foregroundcolor Yellow
+ "-"*70
+ [void]$currentContext.callStack.Pop()
+ } else {
+ throw $_
+ }
+ } finally {
+ $task.Duration = $stopwatch.Elapsed
+ }
+ } else {
+ # no action was specified but we still execute all the dependencies
+ foreach($childTask in $task.DependsOn) {
+ Invoke-Task $childTask
+ }
+ }
+ } else {
+ foreach($childTask in $task.DependsOn) {
+ Invoke-Task $childTask
+ }
+ }
+
+ Assert (& $task.Postcondition) ($msgs.postcondition_failed -f $taskName)
+ }
+
+ $poppedTaskKey = $currentContext.callStack.Pop()
+ Assert ($poppedTaskKey -eq $taskKey) ($msgs.error_corrupt_callstack -f $taskKey,$poppedTaskKey)
+
+ $currentContext.executedTasks.Push($taskKey)
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Invoke-psake.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Invoke-psake.ps1
new file mode 100644
index 0000000..b9119db
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Invoke-psake.ps1
@@ -0,0 +1,336 @@
+function Invoke-psake {
+ <#
+ .SYNOPSIS
+ Runs a psake build script.
+
+ .DESCRIPTION
+ This function runs a psake build script
+
+ .PARAMETER buildFile
+ The path to the psake build script to execute
+
+ .PARAMETER taskList
+ A comma-separated list of task names to execute
+
+ .PARAMETER framework
+ The version of the .NET framework you want to use during build. You can append x86 or x64 to force a specific framework.
+ If not specified, x86 or x64 will be detected based on the bitness of the PowerShell process.
+ Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x64', '4.5', '4.5x86', '4.5x64', '4.5.1', '4.5.1x86', '4.5.1x64'
+
+ .PARAMETER docs
+ Prints a list of tasks and their descriptions
+
+ .PARAMETER parameters
+ A hashtable containing parameters to be passed into the current build script.
+ These parameters will be processed before the 'Properties' function of the script is processed.
+ This means you can access parameters from within the 'Properties' function!
+
+ .PARAMETER properties
+ A hashtable containing properties to be passed into the current build script.
+ These properties will override matching properties that are found in the 'Properties' function of the script.
+
+ .PARAMETER initialization
+ Parameter description
+
+ .PARAMETER nologo
+ Do not display the startup banner and copyright message.
+
+ .PARAMETER detailedDocs
+ Prints a more descriptive list of tasks and their descriptions.
+
+ .PARAMETER notr
+ Do not display the time report.
+
+ .EXAMPLE
+ Invoke-psake
+
+ Runs the 'default' task in the '.build.ps1' build script
+
+ .EXAMPLE
+ Invoke-psake '.\build.ps1' Tests,Package
+
+ Runs the 'Tests' and 'Package' tasks in the '.build.ps1' build script
+
+ .EXAMPLE
+ Invoke-psake Tests
+
+ This example will run the 'Tests' tasks in the 'psakefile.ps1' build script. The 'psakefile.ps1' is assumed to be in the current directory.
+
+ .EXAMPLE
+ Invoke-psake 'Tests, Package'
+
+ This example will run the 'Tests' and 'Package' tasks in the 'psakefile.ps1' build script. The 'psakefile.ps1' is assumed to be in the current directory.
+
+ .EXAMPLE
+ Invoke-psake .\build.ps1 -docs
+
+ Prints a report of all the tasks and their dependencies and descriptions and then exits
+
+ .EXAMPLE
+ Invoke-psake .\parameters.ps1 -parameters @{"p1"="v1";"p2"="v2"}
+
+ Runs the build script called 'parameters.ps1' and passes in parameters 'p1' and 'p2' with values 'v1' and 'v2'
+
+ Here's the .\parameters.ps1 build script:
+
+ properties {
+ $my_property = $p1 + $p2
+ }
+
+ task default -depends TestParams
+
+ task TestParams {
+ Assert ($my_property -ne $null) '$my_property should not be null'
+ }
+
+ Notice how you can refer to the parameters that were passed into the script from within the "properties" function.
+ The value of the $p1 variable should be the string "v1" and the value of the $p2 variable should be "v2".
+
+ .EXAMPLE
+ Invoke-psake .\properties.ps1 -properties @{"x"="1";"y"="2"}
+
+ Runs the build script called 'properties.ps1' and passes in parameters 'x' and 'y' with values '1' and '2'
+
+ This feature allows you to override existing properties in your build script.
+
+ Here's the .\properties.ps1 build script:
+
+ properties {
+ $x = $null
+ $y = $null
+ $z = $null
+ }
+
+ task default -depends TestProperties
+
+ task TestProperties {
+ Assert ($x -ne $null) "x should not be null"
+ Assert ($y -ne $null) "y should not be null"
+ Assert ($z -eq $null) "z should be null"
+ }
+
+ .NOTES
+ ---- Exceptions ----
+
+ If there is an exception thrown during the running of a build script psake will set the '$psake.build_success' variable to $false.
+ To detect failue outside PowerShell (for example by build server), finish PowerShell process with non-zero exit code when '$psake.build_success' is $false.
+ Calling psake from 'cmd.exe' with 'psake.cmd' will give you that behaviour.
+
+ ---- $psake variable ----
+
+ When the psake module is loaded a variable called $psake is created which is a hashtable
+ containing some variables:
+
+ $psake.version # contains the current version of psake
+ $psake.context # holds onto the current state of all variables
+ $psake.run_by_psake_build_tester # indicates that build is being run by psake-BuildTester
+ $psake.config_default # contains default configuration
+ # can be overriden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script
+ $psake.build_success # indicates that the current build was successful
+ $psake.build_script_file # contains a System.IO.FileInfo for the current build script
+ $psake.build_script_dir # contains the fully qualified path to the current build script
+ $psake.error_message # contains the error message which caused the script to fail
+
+ You should see the following when you display the contents of the $psake variable right after importing psake
+
+ PS projects:\psake\> Import-Module .\psake.psm1
+ PS projects:\psake\> $psake
+
+ Name Value
+ ---- -----
+ run_by_psake_build_tester False
+ version 4.2
+ build_success False
+ build_script_file
+ build_script_dir
+ config_default @{framework=3.5; ...
+ context {}
+ error_message
+
+ After a build is executed the following $psake values are updated: build_script_file, build_script_dir, build_success
+
+ PS projects:\psake\> Invoke-psake .\examples\psakefile.ps1
+ Executing task: Clean
+ Executed Clean!
+ Executing task: Compile
+ Executed Compile!
+ Executing task: Test
+ Executed Test!
+
+ Build Succeeded!
+
+ ----------------------------------------------------------------------
+ Build Time Report
+ ----------------------------------------------------------------------
+ Name Duration
+ ---- --------
+ Clean 00:00:00.0798486
+ Compile 00:00:00.0869948
+ Test 00:00:00.0958225
+ Total: 00:00:00.2712414
+
+ PS projects:\psake\> $psake
+
+ Name Value
+ ---- -----
+ build_script_file YOUR_PATH\examples\psakefile.ps1
+ run_by_psake_build_tester False
+ build_script_dir YOUR_PATH\examples
+ context {}
+ version 4.2
+ build_success True
+ config_default @{framework=3.5; ...
+ error_message
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ .LINK
+ Properties
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Position = 0, Mandatory = $false)]
+ [string]$buildFile,
+
+ [Parameter(Position = 1, Mandatory = $false)]
+ [string[]]$taskList = @(),
+
+ [Parameter(Position = 2, Mandatory = $false)]
+ [string]$framework,
+
+ [Parameter(Position = 3, Mandatory = $false)]
+ [switch]$docs = $false,
+
+ [Parameter(Position = 4, Mandatory = $false)]
+ [hashtable]$parameters = @{},
+
+ [Parameter(Position = 5, Mandatory = $false)]
+ [hashtable]$properties = @{},
+
+ [Parameter(Position = 6, Mandatory = $false)]
+ [alias("init")]
+ [scriptblock]$initialization = {},
+
+ [Parameter(Position = 7, Mandatory = $false)]
+ [switch]$nologo,
+
+ [Parameter(Position = 8, Mandatory = $false)]
+ [switch]$detailedDocs,
+
+ [Parameter(Position = 9, Mandatory = $false)]
+ [switch]$notr # disable time report
+ )
+
+ try {
+ if (-not $nologo) {
+ "psake version {0}$($script:nl)Copyright (c) 2010-2018 James Kovacs & Contributors$($script:nl)" -f $psake.version
+ }
+ if (!$buildFile) {
+ $buildFile = Get-DefaultBuildFile
+ }
+ elseif (!(Test-Path $buildFile -PathType Leaf) -and ($null -ne (Get-DefaultBuildFile -UseDefaultIfNoneExist $false))) {
+ # If the default file exists and the given "buildfile" isn't found assume that the given
+ # $buildFile is actually the target Tasks to execute in the $config.buildFileName script.
+ $taskList = $buildFile.Split(', ')
+ $buildFile = Get-DefaultBuildFile
+ }
+
+ $psake.error_message = $null
+
+ ExecuteInBuildFileScope $buildFile $MyInvocation.MyCommand.Module {
+ param($currentContext, $module)
+
+ $stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
+
+ if ($docs -or $detailedDocs) {
+ WriteDocumentation($detailedDocs)
+ return
+ }
+
+ try {
+ foreach ($key in $parameters.keys) {
+ if (test-path "variable:\$key") {
+ set-item -path "variable:\$key" -value $parameters.$key -WhatIf:$false -Confirm:$false | out-null
+ } else {
+ new-item -path "variable:\$key" -value $parameters.$key -WhatIf:$false -Confirm:$false | out-null
+ }
+ }
+ } catch {
+ WriteColoredOutput "Parameter '$key' is null" -foregroundcolor Red
+ throw
+ }
+
+ # The initial dot (.) indicates that variables initialized/modified in the propertyBlock are available in the parent scope.
+ while ($currentContext.properties.Count -gt 0) {
+ $propertyBlock = $currentContext.properties.Pop()
+ . $propertyBlock
+ }
+
+ foreach ($key in $properties.keys) {
+ if (test-path "variable:\$key") {
+ set-item -path "variable:\$key" -value $properties.$key -WhatIf:$false -Confirm:$false | out-null
+ }
+ }
+
+ # Simple dot sourcing will not work. We have to force the script block into our
+ # module's scope in order to initialize variables properly.
+ . $module $initialization
+
+ # Execute the list of tasks or the default task
+ if ($taskList) {
+ foreach ($task in $taskList) {
+ invoke-task $task
+ }
+ } elseif ($currentContext.tasks.default) {
+ invoke-task default
+ } else {
+ throw $msgs.error_no_default_task
+ }
+
+ $successMsg = $msgs.psake_success -f $buildFile
+ WriteColoredOutput ("$($script:nl)${successMsg}$($script:nl)") -foregroundcolor Green
+
+ $stopwatch.Stop()
+ if (-not $notr) {
+ WriteTaskTimeSummary $stopwatch.Elapsed
+ }
+ }
+
+ $psake.build_success = $true
+
+ } catch {
+ $psake.build_success = $false
+ $psake.error_message = FormatErrorMessage $_
+
+ # if we are running in a nested scope (i.e. running a psake script from a psake script) then we need to re-throw the exception
+ # so that the parent script will fail otherwise the parent script will report a successful build
+ $inNestedScope = ($psake.context.count -gt 1)
+ if ( $inNestedScope ) {
+ throw $_
+ } else {
+ if (!$psake.run_by_psake_build_tester) {
+ WriteColoredOutput $psake.error_message -foregroundcolor Red
+ }
+ }
+ } finally {
+ CleanupEnvironment
+ }
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Properties.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Properties.ps1
new file mode 100644
index 0000000..0d4776b
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Properties.ps1
@@ -0,0 +1,61 @@
+function Properties {
+ <#
+ .SYNOPSIS
+ Define a scriptblock that contains assignments to variables that will be available to all tasks in the build script
+
+ .DESCRIPTION
+ A build script may declare a "Properies" function which allows you to define variables that will be available to all the "Task" functions in the build script.
+
+ .PARAMETER properties
+ The script block containing all the variable assignment statements
+
+ .EXAMPLE
+ A sample build script is shown below:
+
+ Properties {
+ $build_dir = "c:\build"
+ $connection_string = "datasource=localhost;initial catalog=northwind;integrated security=sspi"
+ }
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ Note: You can have more than one "Properties" function defined in the build script.
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [scriptblock]$properties
+ )
+
+ $psake.context.Peek().properties.Push($properties)
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Task.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Task.ps1
new file mode 100644
index 0000000..8a31084
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/Task.ps1
@@ -0,0 +1,331 @@
+function Task {
+ <#
+ .SYNOPSIS
+ Defines a build task to be executed by psake
+
+ .DESCRIPTION
+ This function creates a 'task' object that will be used by the psake engine to execute a build task.
+ Note: There must be at least one task called 'default' in the build script
+
+ .PARAMETER name
+ The name of the task
+
+ .PARAMETER action
+ A scriptblock containing the statements to execute for the task.
+
+ .PARAMETER preaction
+ A scriptblock to be executed before the 'Action' scriptblock.
+ Note: This parameter is ignored if the 'Action' scriptblock is not defined.
+
+ .PARAMETER postaction
+ A scriptblock to be executed after the 'Action' scriptblock.
+ Note: This parameter is ignored if the 'Action' scriptblock is not defined.
+
+ .PARAMETER precondition
+ A scriptblock that is executed to determine if the task is executed or skipped.
+ This scriptblock should return $true or $false
+
+ .PARAMETER postcondition
+ A scriptblock that is executed to determine if the task completed its job correctly.
+ An exception is thrown if the scriptblock returns $false.
+
+ .PARAMETER continueOnError
+ If this switch parameter is set then the task will not cause the build to fail when an exception is thrown by the task
+
+ .PARAMETER depends
+ An array of task names that this task depends on.
+ These tasks will be executed before the current task is executed.
+
+ .PARAMETER requiredVariables
+ An array of names of variables that must be set to run this task.
+
+ .PARAMETER description
+ A description of the task.
+
+ .PARAMETER alias
+ An alternate name for the task.
+
+ .PARAMETER FromModule
+ Load in the task from the specified PowerShell module.
+
+ .PARAMETER requiredVersion
+ The specific version of a module to load the task from
+
+ .PARAMETER minimumVersion
+ The minimum (inclusive) version of the PowerShell module to load in the task from.
+
+ .PARAMETER maximumVersion
+ The maximum (inclusive) version of the PowerShell module to load in the task from.
+
+ .PARAMETER lessThanVersion
+ The version of the PowerShell module to load in the task from that should not be met or exceeded. eg -lessThanVersion 2.0.0 will reject anything 2.0.0 or higher, allowing any module in the 1.x.x series.
+
+ .EXAMPLE
+ A sample build script is shown below:
+
+ Task default -Depends Test
+
+ Task Test -Depends Compile, Clean {
+ "This is a test"
+ }
+
+ Task Compile -Depends Clean {
+ "Compile"
+ }
+
+ Task Clean {
+ "Clean"
+ }
+
+ The 'default' task is required and should not contain an 'Action' parameter.
+ It uses the 'Depends' parameter to specify that 'Test' is a dependency
+
+ The 'Test' task uses the 'Depends' parameter to specify that 'Compile' and 'Clean' are dependencies
+ The 'Compile' task depends on the 'Clean' task.
+
+ Note:
+ The 'Action' parameter is defaulted to the script block following the 'Clean' task.
+
+ An equivalent 'Test' task is shown below:
+
+ Task Test -Depends Compile, Clean -Action {
+ $testMessage
+ }
+
+ The output for the above sample build script is shown below:
+
+ Executing task, Clean...
+ Clean
+ Executing task, Compile...
+ Compile
+ Executing task, Test...
+ This is a test
+
+ Build Succeeded!
+
+ ----------------------------------------------------------------------
+ Build Time Report
+ ----------------------------------------------------------------------
+ Name Duration
+ ---- --------
+ Clean 00:00:00.0065614
+ Compile 00:00:00.0133268
+ Test 00:00:00.0225964
+ Total: 00:00:00.0782496
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding(DefaultParameterSetName = 'Normal')]
+ param(
+ [Parameter(Mandatory = $true, Position = 0)]
+ [string]$name,
+
+ [Parameter(Position = 1)]
+ [scriptblock]$action = $null,
+
+ [Parameter(Position = 2)]
+ [scriptblock]$preaction = $null,
+
+ [Parameter(Position = 3)]
+ [scriptblock]$postaction = $null,
+
+ [Parameter(Position = 4)]
+ [scriptblock]$precondition = {$true},
+
+ [Parameter(Position = 5)]
+ [scriptblock]$postcondition = {$true},
+
+ [Parameter(Position = 6)]
+ [switch]$continueOnError,
+
+ [ValidateNotNull()]
+ [Parameter(Position = 7)]
+ [string[]]$depends = @(),
+
+ [ValidateNotNull()]
+ [Parameter(Position = 8)]
+ [string[]]$requiredVariables = @(),
+
+ [Parameter(Position = 9)]
+ [string]$description = $null,
+
+ [Parameter(Position = 10)]
+ [string]$alias = $null,
+
+ [parameter(Mandatory = $true, ParameterSetName = 'SharedTask', Position = 11)]
+ [ValidateNotNullOrEmpty()]
+ [string]$FromModule,
+
+ [Alias('Version')]
+ [parameter(ParameterSetName = 'SharedTask', Position = 12)]
+ [string]$requiredVersion,
+
+ [parameter(ParameterSetName = 'SharedTask', Position = 13)]
+ [string]$minimumVersion,
+
+ [parameter(ParameterSetName = 'SharedTask', Position = 14)]
+ [string]$maximumVersion,
+
+ [parameter(ParameterSetName = 'SharedTask', Position = 15)]
+ [string]$lessThanVersion
+ )
+
+ function CreateTask {
+ @{
+ Name = $Name
+ DependsOn = $depends
+ PreAction = $preaction
+ Action = $action
+ PostAction = $postaction
+ Precondition = $precondition
+ Postcondition = $postcondition
+ ContinueOnError = $continueOnError
+ Description = $description
+ Duration = [System.TimeSpan]::Zero
+ RequiredVariables = $requiredVariables
+ Alias = $alias
+ Success = $true # let's be optimistic
+ ErrorMessage = $null
+ ErrorDetail = $null
+ ErrorFormatted = $null
+ }
+ }
+
+ # Default tasks have no action
+ if ($name -eq 'default') {
+ Assert (!$action) ($msgs.error_shared_task_cannot_have_action)
+ }
+
+ # Shared tasks have no action
+ if ($PSCmdlet.ParameterSetName -eq 'SharedTask') {
+ Assert (!$action) ($msgs.error_shared_task_cannot_have_action -f $Name, $FromModule)
+ }
+
+ $currentContext = $psake.context.Peek()
+
+ # Dot source the shared task module to load in its tasks
+ if ($PSCmdlet.ParameterSetName -eq 'SharedTask') {
+ $testModuleParams = @{
+ minimumVersion = $minimumVersion
+ maximumVersion = $maximumVersion
+ lessThanVersion = $lessThanVersion
+ }
+
+ if(![string]::IsNullOrEmpty($requiredVersion)){
+ $testModuleParams.minimumVersion = $requiredVersion
+ $testModuleParams.maximumVersion = $requiredVersion
+ }
+
+ if ($taskModule = Get-Module -Name $FromModule) {
+ # Use the task module that is already loaded into the session
+ $testModuleParams.currentVersion = $taskModule.Version
+ $taskModule = Where-Object -InputObject $taskModule -FilterScript {Test-ModuleVersion @testModuleParams}
+ } else {
+ # Find the module
+ $getModuleParams = @{
+ ListAvailable = $true
+ Name = $FromModule
+ ErrorAction = 'Ignore'
+ Verbose = $false
+ }
+ $taskModule = Get-Module @getModuleParams |
+ Where-Object -FilterScript {Test-ModuleVersion -currentVersion $_.Version @testModuleParams} |
+ Sort-Object -Property Version -Descending |
+ Select-Object -First 1
+ }
+
+ # This task references a task from a module
+ # This reference task "could" include extra data about the task such as
+ # additional dependOn, aliase, etc.
+ # Store this task to the side so after we load the real task, we can combine
+ # this extra data if nesessary
+ $referenceTask = CreateTask
+ Assert (-not $psake.ReferenceTasks.ContainsKey($referenceTask.Name)) ($msgs.error_duplicate_task_name -f $referenceTask.Name)
+ $referenceTaskKey = $referenceTask.Name.ToLower()
+ $psake.ReferenceTasks.Add($referenceTaskKey, $referenceTask)
+
+ # Load in tasks from shared module into staging area
+ Assert ($null -ne $taskModule) ($msgs.error_unknown_module -f $FromModule)
+ $psakeFilePath = Join-Path -Path $taskModule.ModuleBase -ChildPath 'psakeFile.ps1'
+ if (-not $psake.LoadedTaskModules.ContainsKey($psakeFilePath)) {
+ Write-Debug -Message "Loading tasks from task module [$psakeFilePath]"
+ . $psakeFilePath
+ $psake.LoadedTaskModules.Add($psakeFilePath, $null)
+ }
+ } else {
+ # Create new task object
+ $newTask = CreateTask
+ $taskKey = $newTask.Name.ToLower()
+
+ # If this task was referenced from a parent build script
+ # check to see if that reference task has extra data to add
+ $refTask = $psake.ReferenceTasks.$taskKey
+ if ($refTask) {
+
+ # Override the preaction
+ if ($refTask.PreAction -ne $newTask.PreAction) {
+ $newTask.PreAction = $refTask.PreAction
+ }
+
+ # Override the postaction
+ if ($refTask.PostAction -ne $newTask.PostAction) {
+ $newTask.PostAction = $refTask.PostAction
+ }
+
+ # Override the precondition
+ if ($refTask.PreCondition -ne $newTask.PreCondition) {
+ $newTask.PreCondition = $refTask.PreCondition
+ }
+
+ # Override the postcondition
+ if ($refTask.PostCondition -ne $newTask.PostCondition) {
+ $newTask.PostCondition = $refTask.PostCondition
+ }
+
+ # Override the continueOnError
+ if ($refTask.ContinueOnError) {
+ $newTask.ContinueOnError = $refTask.ContinueOnError
+ }
+
+ # Override the depends
+ if ($refTask.DependsOn.Count -gt 0 -and (Compare-Object -ReferenceObject $refTask.DependsOn -DifferenceObject $newTask.DependsOn)) {
+ $newTask.DependsOn = $refTask.DependsOn
+ }
+
+ # Override the requiredVariables
+ if ($refTask.RequiredVariables.Count -gt 0 -and (Compare-Object -ReferenceObject.RequiredVariables -DifferenceObject $newTask.RequiredVariables)) {
+ $newTask.RequiredVariables += $refTask.RequiredVariables
+ }
+ }
+
+ # Add the task to the context
+ Assert (-not $currentContext.tasks.ContainsKey($taskKey)) ($msgs.error_duplicate_task_name -f $taskKey)
+ Write-Debug "Adding task [$taskKey)]"
+ $currentContext.tasks.$taskKey = $newTask
+
+ if ($alias) {
+ $aliasKey = $alias.ToLower()
+ Assert (-not $currentContext.aliases.ContainsKey($aliasKey)) ($msgs.error_duplicate_alias_name -f $alias)
+ $currentContext.aliases.$aliasKey = $newTask
+ }
+ }
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/TaskSetup.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/TaskSetup.ps1
new file mode 100644
index 0000000..50da9f2
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/TaskSetup.ps1
@@ -0,0 +1,102 @@
+function TaskSetup {
+ <#
+ .SYNOPSIS
+ Adds a scriptblock that will be executed before each task
+
+ .DESCRIPTION
+ This function will accept a scriptblock that will be executed before each task in the build script.
+
+ The scriptblock accepts an optional parameter which describes the Task being setup.
+
+ .PARAMETER setup
+ A scriptblock to execute
+
+ .EXAMPLE
+ A sample build script is shown below:
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ TaskSetup {
+ "Running 'TaskSetup' for task $context.Peek().currentTaskName"
+ }
+
+ The script above produces the following output:
+
+ Running 'TaskSetup' for task Clean
+ Executing task, Clean...
+ Running 'TaskSetup' for task Compile
+ Executing task, Compile...
+ Running 'TaskSetup' for task Test
+ Executing task, Test...
+
+ Build Succeeded
+
+ .EXAMPLE
+ A sample build script showing access to the Task context is shown below:
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ TaskSetup {
+ param($task)
+
+ "Running 'TaskSetup' for task $($task.Name)"
+ }
+
+ The script above produces the following output:
+
+ Running 'TaskSetup' for task Clean
+ Executing task, Clean...
+ Running 'TaskSetup' for task Compile
+ Executing task, Compile...
+ Running 'TaskSetup' for task Test
+ Executing task, Test...
+
+ Build Succeeded
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [scriptblock]$setup
+ )
+
+ $psake.context.Peek().taskSetupScriptBlock = $setup
+}
diff --git a/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/TaskTearDown.ps1 b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/TaskTearDown.ps1
new file mode 100644
index 0000000..b45a589
--- /dev/null
+++ b/src/Newbe.Mahua.Installer/buildScripts/psake/4.8.0/public/TaskTearDown.ps1
@@ -0,0 +1,107 @@
+
+function TaskTearDown {
+ <#
+ .SYNOPSIS
+ Adds a scriptblock to the build that will be executed after each task
+
+ .DESCRIPTION
+ This function will accept a scriptblock that will be executed after each task in the build script.
+
+ The scriptblock accepts an optional parameter which describes the Task being torn down.
+
+ .PARAMETER teardown
+ A scriptblock to execute
+
+ .EXAMPLE
+ A sample build script is shown below:
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ TaskTearDown {
+ "Running 'TaskTearDown' for task $context.Peek().currentTaskName"
+ }
+
+ The script above produces the following output:
+
+ Executing task, Clean...
+ Running 'TaskTearDown' for task Clean
+ Executing task, Compile...
+ Running 'TaskTearDown' for task Compile
+ Executing task, Test...
+ Running 'TaskTearDown' for task Test
+
+ Build Succeeded
+
+ .EXAMPLE
+ A sample build script demonstrating access to the task context is shown below:
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ TaskTearDown {
+ param($task)
+
+ if ($task.Success) {
+ "Running 'TaskTearDown' for task $($task.Name) - success!"
+ } else {
+ "Running 'TaskTearDown' for task $($task.Name) - failed: $($task.ErrorMessage)"
+ }
+ }
+
+ The script above produces the following output:
+
+ Executing task, Clean...
+ Running 'TaskTearDown' for task Clean - success!
+ Executing task, Compile...
+ Running 'TaskTearDown' for task Compile - success!
+ Executing task, Test...
+ Running 'TaskTearDown' for task Test - success!
+
+ Build Succeeded
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [scriptblock]$teardown
+ )
+
+ $psake.context.Peek().taskTearDownScriptBlock = $teardown
+}
diff --git a/src/Newbe.Mahua.Installer/buildTools/nuget.exe b/src/Newbe.Mahua.Installer/buildTools/nuget.exe
new file mode 100644
index 0000000..0cc4088
Binary files /dev/null and b/src/Newbe.Mahua.Installer/buildTools/nuget.exe differ
diff --git a/src/Newbe.Mahua.Installer/mahua.bat b/src/Newbe.Mahua.Installer/mahua.bat
index da10ad3..32c2743 100644
--- a/src/Newbe.Mahua.Installer/mahua.bat
+++ b/src/Newbe.Mahua.Installer/mahua.bat
@@ -1,4 +1,4 @@
@echo off
%~d0
cd %~dp0
-powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "& {if(-not (Get-Module -ListAvailable VSSetup)){Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser;Install-Module -Name VSSetup -Scope CurrentUser -Force;}if(-not (Get-Module -ListAvailable psake)){Install-Module -Name psake -RequiredVersion 4.7.4 -Scope CurrentUser -Force;} invoke-psake .\mahua.ps1 %*; if ($global:lastexitcode -and $global:lastexitcode -ne 0) {write-host "ERROR CODE: $global:lastexitcode" -fore RED; exit $global:lastexitcode} }"
+powershell -NoProfile -NonInteractive -ExecutionPolicy unrestricted -Command "& {import-module .\buildScripts\psake\4.8.0\psake.psd1;invoke-psake .\mahua.ps1 %*; if ($global:lastexitcode -and $global:lastexitcode -ne 0) {write-host "ERROR CODE: $global:lastexitcode" -fore RED; exit $global:lastexitcode} }"
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Installer/mahua.ps1 b/src/Newbe.Mahua.Installer/mahua.ps1
index 84cb1d6..d36e956 100644
--- a/src/Newbe.Mahua.Installer/mahua.ps1
+++ b/src/Newbe.Mahua.Installer/mahua.ps1
@@ -1,4 +1,4 @@
-Framework 4.6
+Framework "4.6x86"
properties {
$rootNow = Resolve-Path .
$nugetexe = "$rootNow/buildTools/nuget.exe"
diff --git a/src/Newbe.Mahua.Plugin.Agent/Newbe.Mahua.Plugin.Agent.json b/src/Newbe.Mahua.Plugin.Agent/Newbe.Mahua.Plugin.Agent.json
index cacbc68..a115c43 100644
--- a/src/Newbe.Mahua.Plugin.Agent/Newbe.Mahua.Plugin.Agent.json
+++ b/src/Newbe.Mahua.Plugin.Agent/Newbe.Mahua.Plugin.Agent.json
@@ -10,105 +10,105 @@
{
"id": 1,
"type": 21,
- "name": "˽Ϣ",
+ "name": "私聊消息处理",
"function": "_eventPrivateMsg",
"priority": 30000
},
{
"id": 2,
"type": 2,
- "name": "ȺϢ",
+ "name": "群消息处理",
"function": "_eventGroupMsg",
"priority": 30000
},
{
"id": 3,
"type": 4,
- "name": "Ϣ",
+ "name": "讨论组消息处理",
"function": "_eventDiscussMsg",
"priority": 30000
},
{
"id": 4,
"type": 11,
- "name": "Ⱥļϴ¼",
+ "name": "群文件上传事件处理",
"function": "_eventGroupUpload",
"priority": 30000
},
{
"id": 5,
"type": 101,
- "name": "Ⱥ䶯¼",
+ "name": "群管理变动事件处理",
"function": "_eventSystem_GroupAdmin",
"priority": 30000
},
{
"id": 6,
"type": 102,
- "name": "ȺԱ¼",
+ "name": "群成员减少事件处理",
"function": "_eventSystem_GroupMemberDecrease",
"priority": 30000
},
{
"id": 7,
"type": 103,
- "name": "ȺԱ¼",
+ "name": "群成员增加事件处理",
"function": "_eventSystem_GroupMemberIncrease",
"priority": 30000
},
{
"id": 10,
"type": 201,
- "name": "¼",
+ "name": "好友已添加事件处理",
"function": "_eventFriend_Add",
"priority": 30000
},
{
"id": 8,
"type": 301,
- "name": "",
+ "name": "好友添加请求处理",
"function": "_eventRequest_AddFriend",
"priority": 30000
},
{
"id": 9,
"type": 302,
- "name": "Ⱥ",
+ "name": "群添加请求处理",
"function": "_eventRequest_AddGroup",
"priority": 30000
},
{
"id": 1001,
"type": 1001,
- "name": "Q¼",
+ "name": "酷Q启动事件",
"priority": 30000,
"function": "_eventStartup"
},
{
"id": 1002,
"type": 1002,
- "name": "Qر¼",
+ "name": "酷Q关闭事件",
"priority": 30000,
"function": "_eventExit"
},
{
"id": 1003,
"type": 1003,
- "name": "Ӧѱ",
+ "name": "应用已被启用",
"priority": 30000,
"function": "_eventEnable"
},
{
"id": 1004,
"type": 1004,
- "name": "Ӧýͣ",
+ "name": "应用将被停用",
"priority": 30000,
"function": "_eventDisable"
}
],
"menu": [
{
- "name": "",
+ "name": "设置中心",
"function": "_menuA"
}
],
diff --git a/src/Newbe.Mahua.Plugin.Agent/build.bat b/src/Newbe.Mahua.Plugin.Agent/build.bat
index 03646e3..70e8e84 100644
--- a/src/Newbe.Mahua.Plugin.Agent/build.bat
+++ b/src/Newbe.Mahua.Plugin.Agent/build.bat
@@ -1,4 +1,4 @@
@echo off
%~d0
cd %~dp0
-powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "& {if(-not (Get-Module -ListAvailable VSSetup)){Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser;Install-Module -Name VSSetup -Scope CurrentUser -Force;}if(-not (Get-Module -ListAvailable psake)){Install-Module -Name psake -RequiredVersion 4.7.4 -Scope CurrentUser -Force;} invoke-psake .\build.ps1 %*; if ($global:lastexitcode -and $global:lastexitcode -ne 0) {write-host "ERROR CODE: $global:lastexitcode" -fore RED; exit $global:lastexitcode} }"
+powershell -NoProfile -NonInteractive -ExecutionPolicy unrestricted -Command "& {import-module .\buildScripts\psake\4.8.0\psake.psd1;import-module .\buildScripts\VSSetup\2.2.5\VSSetup.psd1;invoke-psake .\build.ps1 %*; if ($global:lastexitcode -and $global:lastexitcode -ne 0) {write-host "ERROR CODE: $global:lastexitcode" -fore RED; exit $global:lastexitcode} }"
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Plugin.Agent/build.ps1 b/src/Newbe.Mahua.Plugin.Agent/build.ps1
index 91b5bee..e457ca4 100644
--- a/src/Newbe.Mahua.Plugin.Agent/build.ps1
+++ b/src/Newbe.Mahua.Plugin.Agent/build.ps1
@@ -1,4 +1,4 @@
-Framework "4.6"
+Framework "4.6x86"
properties {
$rootNow = Resolve-Path .
$configuration = "Debug"
@@ -7,7 +7,7 @@ properties {
$currentBuild = "$releaseBase\$configuration\$fwVersion"
$pluginName = (Get-ChildItem *.csproj).Name.Replace(".csproj", "")
$nugetexe = "$rootNow\buildTools\nuget.exe"
- $version = "2.1.1"
+ $version = "2.2"
}
$platforms = @(
@@ -47,20 +47,20 @@ Task Build -depends Nuget -Description "编译" {
Task PackCQP -depends Clean -Description "CQP打包" {
Exec {
# CQP 要求 dll 名称和 appid 要相同,并且为小写
- $cqpPluginDllName = $pluginName.ToLowerInvariant()
+ $cqpDevPluginDirName = $pluginName.ToLowerInvariant()
New-Item -ItemType Directory "$releaseBase\CQP"
- New-Item -ItemType Directory "$releaseBase\CQP\$cqpPluginDllName"
- New-Item -ItemType Directory "$releaseBase\CQP\app"
+ New-Item -ItemType Directory "$releaseBase\CQP\$pluginName"
+ New-Item -ItemType Directory "$releaseBase\CQP\dev\$cqpDevPluginDirName"
# 复制平台对应实现
Copy-Item "../Newbe.Mahua.CQP/bin/$configuration/$fwVersion/*" "$releaseBase/CQP" -Recurse
# 插件运行时
- Copy-Item -Path "$currentBuild\*", "../Newbe.Mahua.CQP/bin/$configuration/$fwVersion/*" -Destination "$releaseBase\CQP\$cqpPluginDllName" -Recurse
+ Copy-Item -Path "$currentBuild\*", "../Newbe.Mahua.CQP/bin/$configuration/$fwVersion/*" -Destination "$releaseBase\CQP\$pluginName" -Recurse
# 机器人平台入口文件
- Copy-Item -Path "../Newbe.Mahua.CQP.Native/bin/$configuration/x86/Newbe.Mahua.CQP.Native.dll" -Destination "$releaseBase\CQP\app\$cqpPluginDllName.dll"
+ Copy-Item -Path "../Newbe.Mahua.CQP.Native/bin/$configuration/x86/Newbe.Mahua.CQP.Native.dll" -Destination "$releaseBase\CQP\dev\$cqpDevPluginDirName\app.dll"
# 复制配置文件
Copy-Item -Path "Configs/*" "$releaseBase/CQP" -Recurse
# CQP.json
- Copy-Item Newbe.Mahua.Plugin.Agent.json "$releaseBase\CQP\app\$cqpPluginDllName.json"
+ Copy-Item Newbe.Mahua.Plugin.Agent.json "$releaseBase\CQP\dev\$cqpDevPluginDirName\app.json"
}
}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/.signature.p7s b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/.signature.p7s
new file mode 100644
index 0000000..d643662
Binary files /dev/null and b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/.signature.p7s differ
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.Configuration.Interop.dll b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.Configuration.Interop.dll
new file mode 100644
index 0000000..24277b0
Binary files /dev/null and b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.Configuration.Interop.dll differ
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.PowerShell.dll b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.PowerShell.dll
new file mode 100644
index 0000000..c7a85ff
Binary files /dev/null and b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.PowerShell.dll differ
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.PowerShell.dll-Help.xml b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.PowerShell.dll-Help.xml
new file mode 100644
index 0000000..73f5c2b
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.PowerShell.dll-Help.xml
@@ -0,0 +1,379 @@
+
+
+
+
+ Get-VSSetupInstance
+ Get
+ VSSetupInstance
+
+ Enumerates instances of Visual Studio and related products.
+
+
+
+ Enumerates instances of Visual Studio and related products. By default, instances with fatal errors are not returned by you can pass `-All` to enumerate them as well.
+
+
+
+ Get-VSSetupInstance
+
+ All
+
+ Enumerate all instances of Visual Studio - even those with fatal errors.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Prerelease
+
+ Also show prereleases / previews. By default, only releases are shown.
+
+
+ SwitchParameter
+
+
+ False
+
+
+
+ Get-VSSetupInstance
+
+ LiteralPath
+
+ The path to the product installation directory. Wildcards are not supported.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+
+ Get-VSSetupInstance
+
+ Path
+
+ The path to the product installation directory. Wildcards are supported.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+
+
+
+ All
+
+ Enumerate all instances of Visual Studio - even those with fatal errors.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ LiteralPath
+
+ The path to the product installation directory. Wildcards are not supported.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+ Path
+
+ The path to the product installation directory. Wildcards are supported.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+ Prerelease
+
+ Also show prereleases / previews. By default, only releases are shown.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+
+
+
+ System.String[]
+
+
+ One or more paths to product installation directories.
+
+
+
+
+
+
+ Microsoft.VisualStudio.Setup.Instance
+
+
+ Information about each instance enumerated.
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Example 1 --------------------------
+ PS C:\> Get-VSSetupInstance -All
+
+ Enumerates all instances of Visual Studio and related products even if a fatal error was raised during the last operation.
+
+
+
+ -------------------------- Example 2 --------------------------
+ PS C:\> Get-VSSetupInstance 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community'
+
+ Gets the instance for the product installed to the given directory.
+
+
+
+
+
+ Online Version:
+ https://github.com/Microsoft/vssetup.powershell/raw/master/docs/VSSetup/Get-VSSetupInstance.md
+
+
+
+
+
+ Select-VSSetupInstance
+ Select
+ VSSetupInstance
+
+ Selects instances of Visual Studio and related products based on criteria.
+
+
+
+ You can specify zero or more products (by default, Visual Studio Community, Professional, and Enterprise are selected) to find, along with zero or more workloads that all are required by any instances enumerated. Additionally, you can specify a version range to limit the results or request the latest instance. All criteria are combined to return the best instance or instances for your needs.
+
+
+
+ Select-VSSetupInstance
+
+ Instance
+
+ One or more instances from which to select.
+
+ Instance[]
+
+ Instance[]
+
+
+ None
+
+
+ Latest
+
+ Select the most recently installed instance with the highest version (within the optional `-Version` range).
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Product
+
+ One or more products to select. Wildcards are supported.
+
+ String[]
+
+ String[]
+
+
+ Microsoft.VisualStudio.Product.Community, Microsoft.VisualStudio.Product.Professional, Microsoft.VisualStudio.Product.Enterprise
+
+
+ Require
+
+ One or more workloads or components to select. All requirements specified must be met. Wildcards are not supported.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+ RequireAny
+
+ Change the behavior of -Require such that any one or more requirements specified must be met.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Version
+
+ A version range to limit results. A single version like '15.0' is equivalent to '[15.0,)', which means versions 15.0 and newer are in range. You can also specify versions like '[15.0,16.0)' to limit results to Visual Studio 2017 only (15.x).
+
+ String
+
+ String
+
+
+ None
+
+
+
+
+
+ Instance
+
+ One or more instances from which to select.
+
+ Instance[]
+
+ Instance[]
+
+
+ None
+
+
+ Latest
+
+ Select the most recently installed instance with the highest version (within the optional `-Version` range).
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ Product
+
+ One or more products to select. Wildcards are supported.
+
+ String[]
+
+ String[]
+
+
+ Microsoft.VisualStudio.Product.Community, Microsoft.VisualStudio.Product.Professional, Microsoft.VisualStudio.Product.Enterprise
+
+
+ Require
+
+ One or more workloads or components to select. All requirements specified must be met. Wildcards are not supported.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+ RequireAny
+
+ Change the behavior of -Require such that any one or more requirements specified must be met.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ Version
+
+ A version range to limit results. A single version like '15.0' is equivalent to '[15.0,)', which means versions 15.0 and newer are in range. You can also specify versions like '[15.0,16.0)' to limit results to Visual Studio 2017 only (15.x).
+
+ String
+
+ String
+
+
+ None
+
+
+
+
+
+ Microsoft.VisualStudio.Setup.Instance[]
+
+
+ One or more instances from which to select.
+
+
+
+
+
+
+ Microsoft.VisualStudio.Setup.Instance
+
+
+ Zero or more instances that met specified criteria.
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Example 1 --------------------------
+ PS C:\> Get-VSSetupInstance | Select-VSSetupInstance -Latest
+
+ Select the most-recently installed instance of the highest version of Visual Studio Community, Professional, or Enterprise installed.
+
+
+
+ -------------------------- Example 2 --------------------------
+ PS C:\> Get-VSSetupInstance | Select-VSSetupInstance -Product * -Require 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64'
+
+ Selects any product with the native Visual C++ compilers installed.
+
+
+
+
+
+ Online Version:
+ https://github.com/Microsoft/vssetup.powershell/raw/master/docs/VSSetup/Select-VSSetupInstance.md
+
+
+
+
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/PSGetModuleInfo.xml b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/PSGetModuleInfo.xml
new file mode 100644
index 0000000..d6a486a
Binary files /dev/null and b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/PSGetModuleInfo.xml differ
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/VSSetup.psd1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/VSSetup.psd1
new file mode 100644
index 0000000..f9dcece
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/VSSetup.psd1
@@ -0,0 +1,225 @@
+# Copyright (C) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT license. See LICENSE.txt in the project root for license information.
+@{
+GUID = '440e8fb1-19c4-4d39-8f75-37424bc4265a'
+Author = 'Microsoft Corporation'
+CompanyName = 'Microsoft Corporation'
+Copyright = 'Copyright (C) Microsoft Corporation. All rights reserved.'
+Description = 'Visual Studio Setup PowerShell Module'
+ModuleVersion = '2.2.5'
+PowerShellVersion = '2.0'
+CLRVersion = '2.0'
+ModuleToProcess = 'VSSetup.psm1'
+NestedModules = 'Microsoft.VisualStudio.Setup.PowerShell.dll'
+RequiredAssemblies = @(
+ 'Microsoft.VisualStudio.Setup.PowerShell.dll',
+ 'Microsoft.VisualStudio.Setup.Configuration.Interop.dll'
+)
+CmdletsToExport = @(
+ 'Get-VSSetupInstance'
+ 'Select-VSSetupInstance'
+)
+TypesToProcess = 'VSSetup.types.ps1xml'
+PrivateData = @{
+ PSData = @{
+ ProjectUri = 'https://github.com/Microsoft/vssetup.powershell'
+ LicenseUri = 'https://github.com/Microsoft/vssetup.powershell/raw/4eb2842ded/LICENSE.txt'
+ Prerelease = ''
+ }
+}
+}
+
+# SIG # Begin signature block
+# MIIj6QYJKoZIhvcNAQcCoIIj2jCCI9YCAQExDzANBglghkgBZQMEAgEFADB5Bgor
+# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
+# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCZBAk2fEYnSgGp
+# 4WxyqzL4HsUP8h2Db8HS+SgS42zny6CCDYMwggYBMIID6aADAgECAhMzAAAAxOmJ
+# +HqBUOn/AAAAAADEMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
+# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
+# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
+# bmcgUENBIDIwMTEwHhcNMTcwODExMjAyMDI0WhcNMTgwODExMjAyMDI0WjB0MQsw
+# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u
+# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy
+# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
+# AQCIirgkwwePmoB5FfwmYPxyiCz69KOXiJZGt6PLX4kvOjMuHpF4+nypH4IBtXrL
+# GrwDykbrxZn3+wQd8oUK/yJuofJnPcUnGOUoH/UElEFj7OO6FYztE5o13jhwVG87
+# 7K1FCTBJwb6PMJkMy3bJ93OVFnfRi7uUxwiFIO0eqDXxccLgdABLitLckevWeP6N
+# +q1giD29uR+uYpe/xYSxkK7WryvTVPs12s1xk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ujzWXCgNY781WB
+# 2CRGCkrS2dh5uy33OD6RJZ76I3Vk6FabYiPGFsPbi1ZGH2tialV0qK7rCX9mcis9
+# ohezELNciNY3RRcQDZWTx7ann/p/e8M8UilVQ7o=
+# SIG # End signature block
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/VSSetup.psm1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/VSSetup.psm1
new file mode 100644
index 0000000..0be88e6
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/VSSetup.psm1
@@ -0,0 +1,203 @@
+# Copyright (C) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT license. See LICENSE.txt in the project root for license information.
+
+$ExecutionContext.SessionState.PSVariable.Set(
+ (New-Object 'Microsoft.VisualStudio.Setup.PowerShell.VersionTable')
+)
+
+Export-ModuleMember -Cmdlet * -Variable VSSetupVersionTable
+
+# SIG # Begin signature block
+# MIIj7AYJKoZIhvcNAQcCoIIj3TCCI9kCAQExDzANBglghkgBZQMEAgEFADB5Bgor
+# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
+# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBRpWOUSMrGsv71
+# RYVhmjuoascdEN5KPsaasJJu+hyc16CCDYMwggYBMIID6aADAgECAhMzAAAAxOmJ
+# +HqBUOn/AAAAAADEMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
+# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
+# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
+# bmcgUENBIDIwMTEwHhcNMTcwODExMjAyMDI0WhcNMTgwODExMjAyMDI0WjB0MQsw
+# CQYDVQ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aWNyb3NvZnQgQ29y
+# cG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEw
+# AhMzAAAAq15Ane5G3yxsAAAAAACrMBYEFGelxx9SKQGRnf960l6V+LpHJdL1MA0G
+# CSqGSIb3DQEBCwUABIIBAKHzXKdMg7mjtjt7+yYbEPmwTIlL9dhDi+hpTciQRzGX
+# 7f/ZFV9Ej8OuCNFoOXmyK7yyXnvspeuEeA2w9tAN9s76LVe54TIxfFRN/omwHUUC
+# +olxQ1ujUBEPp43iEhXSXiwzSGaKUWTRuihFrByuLI1tNNJCzSBgSMwB4M2LGUqH
+# 1ZTd7qM96KPytyjHBbRg22S8IcaPh8w705g2WJcy/VdKz15cNNcFKd2tSQNaPasB
+# 96NdkRho2xkc0MCDogNqSAb2tVprq/7C7wvXObvPoZ3j3BI+DujJI4wb2dnuiT7o
+# RF/O9LJKe7vZ8iNVSeFR497mpSJB6BoPyvpD9td5gZI=
+# SIG # End signature block
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/VSSetup.types.ps1xml b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/VSSetup.types.ps1xml
new file mode 100644
index 0000000..dfba79d
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/VSSetup.types.ps1xml
@@ -0,0 +1,261 @@
+
+
+
+ Microsoft.VisualStudio.Setup.Instance
+
+
+ PSStandardMembers
+
+
+ DefaultDisplayProperty
+ InstanceId
+
+
+ DefaultKeyPropertySet
+
+ InstanceId
+
+
+
+ DefaultDisplayPropertySet
+
+ InstanceId
+ DisplayName
+ InstallationVersion
+ InstallationPath
+ InstallDate
+
+
+
+
+
+
+ Microsoft.VisualStudio.Setup.PowerShell.InstanceAdapter
+
+
+
+ Microsoft.VisualStudio.Setup.PackageReference
+
+
+ PSStandardMembers
+
+
+ DefaultDisplayProperty
+ Id
+
+
+ DefaultKeyPropertySet
+
+ UniqueId
+
+
+
+ DefaultDisplayPropertySet
+
+ Id
+ Version
+ Chip
+ Language
+ Branch
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/about_VSSetup.help.txt b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/about_VSSetup.help.txt
new file mode 100644
index 0000000..864b5c2
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/about_VSSetup.help.txt
@@ -0,0 +1,46 @@
+TOPIC
+ about_vssetup
+
+SHORT DESCRIPTION
+ Enumerate and select instances of Visual Studio.
+
+LONG DESCRIPTION
+ Visual Studio 2017 introduced a new setup engine capable of installing
+ multiple instances of Visual Studio and other products in the Visual Studio
+ family. This module provides commands to enumerate those instances and
+ select instances that meet your criteria. For example, in a development
+ environment you might have a script that finds an instance of Visual Studio
+ with the the Managed Desktop workload for writing projects targeting the
+ .NET Framework. See below for more examples.
+
+VARIABLES
+ You can get the version of this module or of the query API the module uses
+ from the `$VSSetupVersionTable` variable.
+
+ PS> $VSSetupVersionTable
+
+ Name Value
+ ---- -----
+ QueryVersion 1.15.23.19330
+ ModuleVersion 2.1.2.4917
+
+EXAMPLES
+ You can enumerate all instances - even those with errors that require a
+ repair - with the following command.
+
+ Get-VSSetupInstance -All
+
+ If you want to select all launchable instances of Visual Studio products
+ that have the Managed Desktop workload, use the following command.
+
+ Get-VSSetupInstance | Get-VSSetupInstance `
+ -Require 'Microsoft.VisualStudio.Workload.ManagedDesktop'
+
+ You can also get the instance for an installation directory if you want to
+ discover more about what is installed to that directory.
+
+ Get-VSSetupInstance 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community'
+
+SEE ALSO
+ https://github.com/Microsoft/vssetup.powershell
+
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/tools/LICENSE.txt b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/tools/LICENSE.txt
new file mode 100644
index 0000000..d4edbae
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/VSSetup/2.2.5/tools/LICENSE.txt
@@ -0,0 +1,8 @@
+The MIT License (MIT)
+Copyright (C) Microsoft Corporation. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/PSGetModuleInfo.xml b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/PSGetModuleInfo.xml
new file mode 100644
index 0000000..fd22fed
Binary files /dev/null and b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/PSGetModuleInfo.xml differ
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/en-US/psake.psm1-help.xml.old b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/en-US/psake.psm1-help.xml.old
new file mode 100644
index 0000000..d67c446
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/en-US/psake.psm1-help.xml.old
@@ -0,0 +1,2265 @@
+
+
+
+
+ Invoke-psake
+
+ Runs a psake build script.
+
+
+
+
+ Invoke
+ psake
+
+
+
+ This function runs a psake build script
+
+
+
+ Invoke-psake
+
+ buildFile
+ String
+
+
+ taskList
+ String[]
+
+
+ framework
+ String
+
+
+ docs
+ SwitchParameter
+
+
+ parameters
+ Hashtable
+
+
+ properties
+ Hashtable
+
+
+ nologo
+ SwitchParameter
+
+
+ notr
+ SwitchParameter
+
+
+
+
+
+ buildFile
+
+ The path to the psake build script to execute
+
+ String
+
+ String
+
+
+ 'psakefile.ps1'
+
+
+ taskList
+
+ A comma-separated list of task names to execute
+
+ String[]
+
+ String[]
+
+
+
+
+
+ framework
+
+ The version of the .NET framework you want to use during build. You can append x86 or x64 to force a specific framework. If not specified, x86 or x64 will be detected based on the bitness of the PowerShell process.
+Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x64', '4.5', '4.5x86', '4.5x64', '4.5.1', '4.5.1x86', '4.5.1x64'
+
+ String
+
+ String
+
+
+ '3.5'
+
+
+ docs
+
+ Prints a list of tasks and their descriptions
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ parameters
+
+ A hashtable containing parameters to be passed into the current build script. These parameters will be processed before the 'Properties' function of the script is processed. This means you can access parameters from within the 'Properties' function!
+
+
+ Hashtable
+
+ Hashtable
+
+
+
+
+
+ properties
+
+ A hashtable containing properties to be passed into the current build script. These properties will override matching properties that are found in the 'Properties' function of the script.
+
+ Hashtable
+
+ Hashtable
+
+
+
+
+
+ nologo
+
+ Do not display the startup banner and copyright message.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ notr
+
+ Do not display the time report.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ---- Exceptions ----
+ If there is an exception thrown during the running of a build script psake will set the '$psake.build_success' variable to $false. To detect failue outside PowerShell (for example by build server), finish PowerShell process with non-zero exit code when '$psake.build_success' is $false. Calling psake from 'cmd.exe' with 'psake.cmd' will give you that behaviour.
+
+
+
+ ---- $psake variable ----
+ When the psake module is loaded a variable called $psake is created which is a hashtable
+containing some variables:
+
+$psake.version # contains the current version of psake
+$psake.context # holds onto the current state of all variables
+$psake.run_by_psake_build_tester # indicates that build is being run by psake-BuildTester
+$psake.config_default # contains default configuration
+ # can be overriden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script
+$psake.build_success # indicates that the current build was successful
+$psake.build_script_file # contains a System.IO.FileInfo for the current build script
+$psake.build_script_dir # contains the fully qualified path to the current build script
+
+You should see the following when you display the contents of the $psake variable right after importing psake
+
+PS projects:\psake> Import-Module .\psake.psm1
+PS projects:\psake> $psake
+
+Name Value
+---- -----
+run_by_psake_build_tester False
+version 4.2
+build_success False
+build_script_file
+build_script_dir
+config_default @{framework=3.5; ...
+context {}
+
+After a build is executed the following $psake values are updated: build_script_file, build_script_dir, build_success
+
+PS projects:\psake> Invoke-psake .\examples\psakefile.ps1
+Executing task: Clean
+Executed Clean!
+Executing task: Compile
+Executed Compile!
+Executing task: Test
+Executed Test!
+
+Build Succeeded!
+
+----------------------------------------------------------------------
+Build Time Report
+----------------------------------------------------------------------
+Name Duration
+---- --------
+Clean 00:00:00.0798486
+Compile 00:00:00.0869948
+Test 00:00:00.0958225
+Total: 00:00:00.2712414
+
+PS projects:\psake> $psake
+
+Name Value
+---- -----
+build_script_file YOUR_PATH\examples\psakefile.ps1
+run_by_psake_build_tester False
+build_script_dir YOUR_PATH\examples
+context {}
+version 4.2
+build_success True
+config_default @{framework=3.5; ...
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ Invoke-psake
+
+ Description
+ -----------
+ Runs the 'default' task in the '.build.ps1' build script
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 2 --------------
+
+ C:\PS>
+
+ Invoke-psake '.\build.ps1' Tests,Package
+
+ Description
+ -----------
+ Runs the 'Tests' and 'Package' tasks in the '.build.ps1' build script
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 3 --------------
+
+ C:\PS>
+
+ Invoke-psake Tests
+
+ Description
+ -----------
+ This example will run the 'Tests' tasks in the 'psakefile.ps1' build script. The 'psakefile.ps1' is assumed to be in the current directory.
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 4 --------------
+
+ C:\PS>
+
+ Invoke-psake 'Tests, Package'
+
+ Description
+ -----------
+ This example will run the 'Tests' and 'Package' tasks in the 'psakefile.ps1' build script. The 'psakefile.ps1' is assumed to be in the current directory.
+ NOTE: The quotes around the list of tasks to execute is required if you want to execute more than 1 task.
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 5 --------------
+
+ C:\PS>
+
+ Invoke-psake .\build.ps1 -docs
+
+ Description
+ -----------
+ Prints a report of all the tasks and their dependencies and descriptions and then exits
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 6 --------------
+
+ C:\PS>
+
+ Invoke-psake .\parameters.ps1 -parameters @{"p1"="v1";"p2"="v2"}
+
+ Description
+ -----------
+ Runs the build script called 'parameters.ps1' and passes in parameters 'p1' and 'p2' with values 'v1' and 'v2'
+ Here's the .\parameters.ps1 build script:
+
+
+ properties {
+ $my_property = $p1 + $p2
+}
+
+task default -depends TestParams
+
+task TestParams {
+ Assert ($my_property -ne $null) '$my_property should not be null'
+}
+
+ Notice how you can refer to the parameters that were passed into the script from within the “properties” function. The value of the $p1 variable should be the string “v1” and the value of the $p2 variable should be “v2”.
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 7 --------------
+
+ C:\PS>
+
+ Invoke-psake .\properties.ps1 -properties @{"x"="1";"y"="2"}
+
+ Description
+ -----------
+ Runs the build script called 'properties.ps1' and passes in parameters 'x' and 'y' with values '1' and '2'
+ This feature allows you to over-ride existing properties in your build script.
+
+ Here's the .\properties.ps1 build script
+ properties {
+ $x = $null
+ $y = $null
+ $z = $null
+}
+
+task default -depends TestProperties
+
+task TestProperties {
+ Assert ($x -ne $null) "x should not be null"
+ Assert ($y -ne $null) "y should not be null"
+ Assert ($z -eq $null) "z should be null"
+}
+
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ Include
+
+
+
+ Properties
+
+
+
+ FormatTaskName
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ TaskTearDown
+
+ Adds a scriptblock to the build that will be executed after each task
+
+
+
+
+
+
+
+
+
+ This function will accept a scriptblock that will be executed after each
+task in the build script.
+
+
+
+ TaskTearDown
+
+ teardown
+ ScriptBlock
+
+
+
+
+
+ teardown
+
+ A scriptblock to execute
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script is shown below:
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+TaskTearDown {
+ "Running 'TaskTearDown' for task $context.Peek().currentTaskName"
+}
+
+ Description
+ -----------
+ The script above produces the following output:
+ Executing task, Clean...
+Running 'TaskTearDown' for task Clean
+Executing task, Compile...
+Running 'TaskTearDown' for task Compile
+Executing task, Test...
+Running 'TaskTearDown' for task Test
+
+Build Succeeded
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ Include
+
+
+
+ Properties
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ TaskSetup
+
+ Adds a scriptblock that will be executed before each task
+
+
+
+
+
+
+
+
+
+ This function will accept a scriptblock that will be executed before each
+task in the build script.
+
+
+
+ TaskSetup
+
+ setup
+ ScriptBlock
+
+
+
+
+
+ setup
+
+ A scriptblock to execute
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script is shown below:
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+TaskSetup {
+ "Running 'TaskSetup' for task $context.Peek().currentTaskName"
+}
+
+ Description
+ -----------
+ The script above produces the following output:
+ Running 'TaskSetup' for task Clean
+Executing task, Clean...
+Running 'TaskSetup' for task Compile
+Executing task, Compile...
+Running 'TaskSetup' for task Test
+Executing task, Test...
+
+Build Succeeded
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ Include
+
+
+
+ Properties
+
+
+
+ Invoke-psake
+
+
+
+ FormatTaskName
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ Framework
+
+ Sets the version of the .NET framework you want to use during build.
+
+
+
+
+
+
+
+
+
+ This function will accept a string containing version of the .NET framework to use during build. Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x64', '4.5', '4.5x86', '4.5x64', '4.5.1', '4.5.1x86', '4.5.1x64'. Default is '3.5*', where x86 or x64 will be detected based on the bitness of the PowerShell process.
+
+
+
+ Framework
+
+ framework
+ string
+
+
+
+
+
+ framework
+
+ Version of the .NET framework to use during build.
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+Framework "4.0"
+
+Task default -depends Compile
+
+Task Compile -depends Clean {
+ msbuild /version
+}
+
+ Description
+ -----------
+ The script above will output detailed version of msbuid v4
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ Include
+
+
+
+ Properties
+
+
+
+ Invoke-psake
+
+
+
+ FormatTaskName
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+
+
+
+
+ FormatTaskName
+
+ This function allows you to change how psake renders the task name during a build.
+
+
+
+
+
+
+
+
+
+ This function takes either a string which represents a format string (formats using the -f format operator see “help about_operators”) or it can accept a script block that has a single parameter that is the name of the task that will be executed.
+
+
+
+ FormatTaskName
+
+ format
+ String or ScriptBlock
+
+
+
+
+
+ format
+
+ A format string or a scriptblock to execute
+
+ String or ScriptBlock
+
+ String or ScriptBlock
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script that uses a format string is shown below:
+
+Task default -depends TaskA, TaskB, TaskC
+
+FormatTaskName "-------- {0} --------"
+
+Task TaskA {
+ "TaskA is executing"
+}
+
+Task TaskB {
+ "TaskB is executing"
+}
+
+Task TaskC {
+ "TaskC is executing"
+}
+
+ Description
+ -----------
+ The script above produces the following output:
+ -------- TaskA --------
+TaskA is executing
+-------- TaskB --------
+TaskB is executing
+-------- TaskC --------
+TaskC is executing
+
+Build Succeeded!
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 2 --------------
+
+ C:\PS>
+
+ A sample build script that uses a ScriptBlock is shown below:
+
+Task default -depends TaskA, TaskB, TaskC
+
+FormatTaskName {
+ param($taskName)
+ write-host "Executing Task: $taskName" -foregroundcolor blue
+}
+
+Task TaskA {
+ "TaskA is executing"
+}
+
+Task TaskB {
+ "TaskB is executing"
+}
+
+Task TaskC {
+ "TaskC is executing"
+}
+
+ Description
+ -----------
+ The preceding example uses the scriptblock parameter to the FormatTaskName function to render each task name in the color blue.
+ Note: the $taskName parameter is arbitrary it could be named anything
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ Include
+
+
+
+ Properties
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+
+ Get-PSakeScriptTasks
+
+ Returns meta data about all the tasks defined in the provided psake script.
+
+
+
+
+ Get
+ PSakeScriptTasks
+
+
+
+ Returns meta data about all the tasks defined in the provided psake script.
+
+
+
+ Get-PSakeScriptTasks
+
+ buildFile
+
+ The path to the psake build script to read the tasks from.
+
+ String
+
+
+ InformationAction
+
+
+
+ ActionPreference
+
+
+ InformationVariable
+
+
+
+ String
+
+
+
+
+
+ buildFile
+
+ The path to the psake build script to read the tasks from.
+
+ String
+
+ String
+
+
+ 'psakefile.ps1'
+
+
+ InformationAction
+
+
+
+ ActionPreference
+
+ ActionPreference
+
+
+
+
+
+ InformationVariable
+
+
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Include
+
+ Include the functions or code of another powershell script file into the current build script's scope
+
+
+
+
+
+
+
+
+
+ A build script may declare an "includes" function which allows you to define a file containing powershell code to be included and added to the scope of the currently running build script. Code from such file will be executed after code from build script.
+
+
+
+ Include
+
+ fileNamePathToInclude
+ String
+
+
+
+
+
+ fileNamePathToInclude
+
+ A string containing the path and name of the powershell file to include
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script is shown below:
+
+Include ".\build_utils.ps1"
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+ Description
+ -----------
+ The script above includes all the functions and variables defined in the ".\build_utils.ps1" script into the current build script's scope
+ Note: You can have more than 1 "Include" function defined in the build script
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ FormatTaskName
+
+
+
+ Properties
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ Properties
+
+ Define a scriptblock that contains assignments to variables that will be available to all tasks in the build script
+
+
+
+
+
+
+
+
+
+ A build script may declare a "Properies" function which allows you to define variables that will be available to all the "Task" functions in the build script.
+
+
+
+ Properties
+
+ properties
+ ScriptBlock
+
+
+
+
+
+ properties
+
+ The script block containing all the variable assignment statements
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script is shown below:
+
+Properties {
+ $build_dir = "c:\build"
+ $connection_string = "datasource=localhost;initial catalog=northwind;integrated security=sspi"
+}
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+ Description
+ -----------
+ Note: You can have more than 1 "Properties" function defined in the build script
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ FormatTaskName
+
+
+
+ Include
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ Task
+
+ Defines a build task to be executed by psake
+
+
+
+
+
+
+
+
+
+ This function creates a 'task' object that will be used by the psake engine to execute a build task. Note: There must be at least one task called 'default' in the build script
+
+
+
+ Task
+
+ Name
+ String
+
+
+ Action
+ ScriptBlock
+
+
+ PreAction
+ ScriptBlock
+
+
+ PostAction
+ ScriptBlock
+
+
+ Precondition
+ ScriptBlock
+
+
+ Postcondition
+ ScriptBlock
+
+
+ ContinueOnError
+ Boolean
+
+
+ Depends
+ String[]
+
+
+ RequiredVariables
+ String[]
+
+
+ Description
+ String[]
+
+
+
+
+
+ Name
+
+ The name of the task
+
+ String
+
+ String
+
+
+
+
+
+ Action
+
+ A scriptblock containing the statements to execute for the task.
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+ PreAction
+
+ A scriptblock to be executed before the 'Action' scriptblock. Note: This parameter is ignored if the 'Action' scriptblock is not defined.
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+ PostAction
+
+ A scriptblock to be executed after the 'Action' scriptblock. Note: This parameter is ignored if the 'Action' scriptblock is not defined.
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+ Precondition
+
+ A scriptblock that is executed to determine if the task is executed or skipped. This scriptblock should return $true or $false
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+ Postcondition
+
+ A scriptblock that is executed to determine if the task completed its job correctly. An exception is thrown if the scriptblock returns $false.
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+ ContinueOnError
+
+ If this switch parameter is set then the task will not cause the build to fail when an exception is thrown by the task
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Depends
+
+ An array of task names that this task depends on. These tasks will be executed before the current task is executed.
+
+ String[]
+
+ String[]
+
+
+
+
+
+ RequiredVariables
+
+ An array of names of variables that must be set to run this task.
+
+ String[]
+
+ String[]
+
+
+
+
+
+ Description
+
+ A description of the task.
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script is shown below:
+
+Task default -Depends Test
+
+Task Test -Depends Compile, Clean {
+ "This is a test"
+}
+
+Task Compile -Depends Clean {
+ "Compile"
+}
+
+Task Clean {
+ "Clean"
+}
+
+The 'default' task is required and should not contain an 'Action' parameter.
+It uses the 'Depends' parameter to specify that 'Test' is a dependency
+
+The 'Test' task uses the 'Depends' parameter to specify that 'Compile' and 'Clean' are dependencies
+The 'Compile' task depends on the 'Clean' task.
+
+Note:
+The 'Action' parameter is defaulted to the script block following the 'Clean' task.
+
+An equivalent 'Test' task is shown below:
+
+Task Test -Depends Compile, Clean -Action {
+ $testMessage
+}
+
+The output for the above sample build script is shown below:
+Executing task, Clean...
+Clean
+Executing task, Compile...
+Compile
+Executing task, Test...
+This is a test
+
+Build Succeeded!
+
+----------------------------------------------------------------------
+Build Time Report
+----------------------------------------------------------------------
+Name Duration
+---- --------
+Clean 00:00:00.0065614
+Compile 00:00:00.0133268
+Test 00:00:00.0225964
+Total: 00:00:00.0782496
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+ FormatTaskName
+
+
+
+ Include
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ Assert
+
+ Helper function for "Design by Contract" assertion checking.
+
+
+
+
+
+
+
+
+
+ This is a helper function that makes the code less noisy by eliminating many of the "if" statements that are normally required to verify assumptions in the code.
+
+
+
+ Assert
+
+ conditionToCheck
+ Boolean
+
+
+ failureMessage
+ String
+
+
+
+
+
+ conditionToCheck
+
+ The boolean condition to evaluate
+
+ Boolean
+
+ Boolean
+
+
+
+
+
+ failureMessage
+
+ The error message used for the exception if the conditionToCheck parameter is false
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ Assert $false "This always throws an exception"
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 2 --------------
+
+ C:\PS>
+
+ Assert ( ($i % 2) -eq 0 ) "$i is not an even number"
+
+ Description
+ -----------
+ This exmaple may throw an exception if $i is not an even number
+
+ Note:
+ It might be necessary to wrap the condition with paranthesis to force PS to evaluate the condition
+so that a boolean value is calculated and passed into the 'conditionToCheck' parameter.
+
+Example:
+ Assert 1 -eq 2 "1 doesn't equal 2"
+
+PS will pass 1 into the condtionToCheck variable and PS will look for a parameter called "eq" and
+throw an exception with the following message "A parameter cannot be found that matches parameter name 'eq'"
+
+The solution is to wrap the condition in () so that PS will evaluate it first.
+
+ Assert (1 -eq 2) "1 doesn't equal 2"
+
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ FormatTaskName
+
+
+
+ Include
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Properties
+
+
+
+
+ Framework
+
+
+
+
+
+
+ Exec
+
+ Helper function for executing command-line programs.
+
+
+
+
+
+
+
+
+
+ This is a helper function that runs a scriptblock and checks the PS variable $lastexitcode to see if an error occcured. If an error is detected then an exception is thrown. This function allows you to run command-line programs without having to explicitly check fthe $lastexitcode variable.
+
+
+
+ Exec
+
+ cmd
+ ScriptBlock
+
+
+ errorMessage
+ String
+
+
+
+
+
+ cmd
+
+ The scriptblock to execute. This scriptblock will typically contain the command-line invocation.
+
+ ScriptBlock
+
+ Boolean
+
+
+
+
+
+ failureMessage
+
+ The error message used for the exception that is thrown.
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ exec { svn info $repository_trunk } "Error executing SVN. Please verify SVN command-line client is installed"
+
+ This example calls the svn command-line client.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Assert
+
+
+
+ FormatTaskName
+
+
+
+ Include
+
+
+
+ Invoke-psake
+
+
+
+ Properties
+
+
+
+ Task
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+
+ Framework
+
+
+
+
+
+
+ Invoke-Task
+
+ Executes another task in the current build script.
+
+
+
+
+
+
+
+
+
+ This is a function that will allow you to invoke a Task from within another Task in the current build script.
+
+
+
+ Invoke-Task
+
+ taskName
+ String
+
+
+
+
+
+ taskName
+
+ The name of the task to execute.
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ Invoke-Task "Compile"
+
+ This example calls the "Compile" task.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Assert
+
+
+
+ Exec
+
+
+
+ FormatTaskName
+
+
+
+ Include
+
+
+
+ Invoke-psake
+
+
+
+ Properties
+
+
+
+ Task
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Framework
+
+
+
+
+
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/checkvariables.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/checkvariables.ps1
new file mode 100644
index 0000000..0d6b0b1
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/checkvariables.ps1
@@ -0,0 +1,33 @@
+Properties {
+ $x = 1
+ $y = 2
+}
+
+FormatTaskName "[{0}]"
+
+Task default -Depends Verify
+
+Task Verify -Description "This task verifies psake's variables" {
+
+ Assert (Test-Path 'variable:\psake') "psake variable was not exported from module"
+
+ Assert ($psake.ContainsKey("version")) "psake variable does not contain 'version'"
+ Assert ($psake.ContainsKey("context")) "psake variable does not contain 'context'"
+ Assert ($psake.ContainsKey("build_success")) "psake variable does not contain 'build_success'"
+ Assert ($psake.ContainsKey("build_script_file")) "psake variable does not contain 'build_script_file'"
+ Assert ($psake.ContainsKey("build_script_dir")) "psake variable does not contain 'build_script_dir'"
+
+ Assert (![string]::IsNullOrEmpty($psake.version)) '$psake.version was null or empty'
+ Assert ($psake.context -ne $null) '$psake.context was null'
+ Assert (!$psake.build_success) '$psake.build_success should be $false'
+ Assert ($psake.build_script_file -ne $null) '$psake.build_script_file was null'
+ Assert ($psake.build_script_file.Name -eq "checkvariables.ps1") ("psake variable: {0} was not equal to 'checkvariables.ps1'" -f $psake.build_script_file.Name)
+ Assert (![string]::IsNullOrEmpty($psake.build_script_dir)) '$psake.build_script_dir was null or empty'
+
+ Assert ($psake.context.Peek().tasks.Count -ne 0) "psake context variable 'tasks' had length zero"
+ Assert ($psake.context.Peek().properties.Count -ne 0) "psake context variable 'properties' had length zero"
+ Assert ($psake.context.Peek().includes.Count -eq 0) "psake context variable 'includes' should have had length zero"
+ Assert ($psake.context.Peek().config -ne $null) "psake context variable 'config' was null"
+
+ Assert ($psake.context.Peek().currentTaskName -eq "Verify") 'psake variable: $currentTaskName was not set correctly'
+}
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/continueonerror.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/continueonerror.ps1
new file mode 100644
index 0000000..9679a4d
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/continueonerror.ps1
@@ -0,0 +1,14 @@
+Task default -Depends TaskA
+
+Task TaskA -Depends TaskB {
+ "Task - A"
+}
+
+Task TaskB -Depends TaskC -ContinueOnError {
+ "Task - B"
+ throw "I failed on purpose!"
+}
+
+Task TaskC {
+ "Task - C"
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/default.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/default.ps1
new file mode 100644
index 0000000..4657bea
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/default.ps1
@@ -0,0 +1,23 @@
+properties {
+ $testMessage = 'Executed Test!'
+ $compileMessage = 'Executed Compile!'
+ $cleanMessage = 'Executed Clean!'
+}
+
+task default -depends Test
+
+task Test -depends Compile, Clean {
+ $testMessage
+}
+
+task Compile -depends Clean {
+ $compileMessage
+}
+
+task Clean {
+ $cleanMessage
+}
+
+task ? -Description "Helper to display task info" {
+ Write-Documentation
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/formattaskname_scriptblock.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/formattaskname_scriptblock.ps1
new file mode 100644
index 0000000..3ec3b96
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/formattaskname_scriptblock.ps1
@@ -0,0 +1,24 @@
+properties {
+ $testMessage = 'Executed Test!'
+ $compileMessage = 'Executed Compile!'
+ $cleanMessage = 'Executed Clean!'
+}
+
+task default -depends Test
+
+formatTaskName {
+ param($taskName)
+ write-host $taskName -foregroundcolor Green
+}
+
+task Test -depends Compile, Clean {
+ $testMessage
+}
+
+task Compile -depends Clean {
+ $compileMessage
+}
+
+task Clean {
+ $cleanMessage
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/formattaskname_string.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/formattaskname_string.ps1
new file mode 100644
index 0000000..f9b5dce
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/formattaskname_string.ps1
@@ -0,0 +1,21 @@
+properties {
+ $testMessage = 'Executed Test!'
+ $compileMessage = 'Executed Compile!'
+ $cleanMessage = 'Executed Clean!'
+}
+
+task default -depends Test
+
+formatTaskName "-------{0}-------"
+
+task Test -depends Compile, Clean {
+ $testMessage
+}
+
+task Compile -depends Clean {
+ $compileMessage
+}
+
+task Clean {
+ $cleanMessage
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/msbuild40.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/msbuild40.ps1
new file mode 100644
index 0000000..2298e42
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/msbuild40.ps1
@@ -0,0 +1,8 @@
+Framework "4.0"
+# Framework "4.0x64"
+
+task default -depends ShowMsBuildVersion
+
+task ShowMsBuildVersion {
+ msbuild /version
+}
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/nested.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/nested.ps1
new file mode 100644
index 0000000..d7f27b4
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/nested.ps1
@@ -0,0 +1,17 @@
+Properties {
+ $x = 1
+}
+
+Task default -Depends RunNested1, RunNested2, CheckX
+
+Task RunNested1 {
+ Invoke-psake .\nested\nested1.ps1
+}
+
+Task RunNested2 {
+ Invoke-psake .\nested\nested2.ps1
+}
+
+Task CheckX{
+ Assert ($x -eq 1) '$x was not 1'
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/nested/nested1.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/nested/nested1.ps1
new file mode 100644
index 0000000..78d99a3
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/nested/nested1.ps1
@@ -0,0 +1,9 @@
+Properties {
+ $x = 100
+}
+
+Task default -Depends Nested1CheckX
+
+Task Nested1CheckX{
+ Assert ($x -eq 100) '$x was not 100'
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/nested/nested2.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/nested/nested2.ps1
new file mode 100644
index 0000000..c5a244b
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/nested/nested2.ps1
@@ -0,0 +1,9 @@
+Properties {
+ $x = 200
+}
+
+Task default -Depends Nested2CheckX
+
+Task Nested2CheckX{
+ Assert ($x -eq 200) '$x was not 200'
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/paralleltasks.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/paralleltasks.ps1
new file mode 100644
index 0000000..24a401f
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/paralleltasks.ps1
@@ -0,0 +1,20 @@
+Task ParallelTask1 {
+ "ParallelTask1"
+}
+
+Task ParallelTask2 {
+ "ParallelTask2"
+}
+
+Task ParallelNested1andNested2 {
+ $jobArray = @()
+ @("ParallelTask1", "ParallelTask2") | ForEach-Object {
+ $jobArray += Start-Job {
+ param($scriptFile, $taskName)
+ Invoke-psake $scriptFile -taskList $taskName
+ } -ArgumentList $psake.build_script_file.FullName, $_
+ }
+ Wait-Job $jobArray | Receive-Job
+}
+
+Task default -depends ParallelNested1andNested2
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/parameters.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/parameters.ps1
new file mode 100644
index 0000000..c087615
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/parameters.ps1
@@ -0,0 +1,9 @@
+properties {
+ $my_property = $p1 + $p2
+}
+
+task default -depends TestParams
+
+task TestParams {
+ Assert ($my_property -ne $null) "`$my_property should not be null. Run with -parameters @{'p1' = 'v1'; 'p2' = 'v2'}"
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/passingParametersString/build.Release.Version.bat b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/passingParametersString/build.Release.Version.bat
new file mode 100644
index 0000000..a48c126
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/passingParametersString/build.Release.Version.bat
@@ -0,0 +1,3 @@
+powershell -Command "& {Import-Module .\..\..\psake.psm1; Invoke-psake .\parameters.ps1 -parameters @{"buildConfiguration"='Release';} }"
+
+Pause
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/passingParametersString/parameters.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/passingParametersString/parameters.ps1
new file mode 100644
index 0000000..937d644
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/passingParametersString/parameters.ps1
@@ -0,0 +1,22 @@
+properties {
+ $buildOutputPath = ".\bin\$buildConfiguration"
+}
+
+task default -depends DoRelease
+
+task DoRelease {
+ Assert ("$buildConfiguration" -ne $null) "buildConfiguration should not have been null"
+ Assert ("$buildConfiguration" -eq 'Release') "buildConfiguration=[$buildConfiguration] should have been 'Release'"
+
+ Write-Host ""
+ Write-Host ""
+ Write-Host ""
+ Write-Host -NoNewline "Would build output into path "
+ Write-Host -NoNewline -ForegroundColor Green "$buildOutputPath"
+ Write-Host -NoNewline " for build configuration "
+ Write-Host -ForegroundColor Green "$buildConfiguration"
+ Write-Host -NoNewline "."
+ Write-Host ""
+ Write-Host ""
+ Write-Host ""
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/preandpostaction.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/preandpostaction.ps1
new file mode 100644
index 0000000..fcb36e6
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/preandpostaction.ps1
@@ -0,0 +1,13 @@
+task default -depends Test
+
+task Test -depends Compile, Clean -PreAction {"Pre-Test"} -Action {
+ "Test"
+} -PostAction {"Post-Test"}
+
+task Compile -depends Clean {
+ "Compile"
+}
+
+task Clean {
+ "Clean"
+}
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/preandpostcondition.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/preandpostcondition.ps1
new file mode 100644
index 0000000..ce855fb
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/preandpostcondition.ps1
@@ -0,0 +1,18 @@
+properties {
+ $runTaskA = $false
+ $taskBSucceded = $true
+}
+
+task default -depends TaskC
+
+task TaskA -precondition { $runTaskA -eq $true } {
+ "TaskA executed"
+}
+
+task TaskB -postcondition { $taskBSucceded -eq $true } {
+ "TaskB executed"
+}
+
+task TaskC -depends TaskA,TaskB {
+ "TaskC executed."
+}
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/properties.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/properties.ps1
new file mode 100644
index 0000000..ccbb3ec
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/properties.ps1
@@ -0,0 +1,13 @@
+properties {
+ $x = $null
+ $y = $null
+ $z = $null
+}
+
+task default -depends TestProperties
+
+task TestProperties {
+ Assert ($x -ne $null) "x should not be null. Run with -properties @{'x' = '1'; 'y' = '2'}"
+ Assert ($y -ne $null) "y should not be null. Run with -properties @{'x' = '1'; 'y' = '2'}"
+ Assert ($z -eq $null) "z should be null"
+}
\ No newline at end of file
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/requiredvariables.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/requiredvariables.ps1
new file mode 100644
index 0000000..d9922bb
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/requiredvariables.ps1
@@ -0,0 +1,14 @@
+properties {
+ $x = $null
+ $y = $null
+ $z = $null
+}
+
+task default -depends TestRequiredVariables
+
+# you can put arguments to task in multiple lines using `
+task TestRequiredVariables `
+ -description "This task shows how to make a variable required to run task. Run this script with -properties @{x = 1; y = 2; z = 3}" `
+ -requiredVariables x, y, z `
+{
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/tasksetupandteardown.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/tasksetupandteardown.ps1
new file mode 100644
index 0000000..be0834a
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/examples/tasksetupandteardown.ps1
@@ -0,0 +1,17 @@
+TaskSetup {
+ "Executing task setup"
+}
+
+TaskTearDown {
+ "Executing task tear down"
+}
+
+Task default -depends TaskB
+
+Task TaskA {
+ "TaskA executed"
+}
+
+Task TaskB -depends TaskA {
+ "TaskB executed"
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/CleanupEnvironment.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/CleanupEnvironment.ps1
new file mode 100644
index 0000000..7d970f6
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/CleanupEnvironment.ps1
@@ -0,0 +1,12 @@
+function CleanupEnvironment {
+ if ($psake.context.Count -gt 0) {
+ $currentContext = $psake.context.Peek()
+ [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
+ $env:PATH = $currentContext.originalEnvPath
+ Set-Location $currentContext.originalDirectory
+ $global:ErrorActionPreference = $currentContext.originalErrorActionPreference
+ $psake.LoadedTaskModules = @{}
+ $psake.ReferenceTasks = @{}
+ [void] $psake.context.Pop()
+ }
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/ConfigureBuildEnvironment.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/ConfigureBuildEnvironment.ps1
new file mode 100644
index 0000000..6233477
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/ConfigureBuildEnvironment.ps1
@@ -0,0 +1,198 @@
+
+function ConfigureBuildEnvironment {
+ if (!(Test-Path Variable:\IsWindows) -or $IsWindows) {
+ $framework = $psake.context.peek().config.framework
+ if ($framework -cmatch '^((?:\d+\.\d+)(?:\.\d+){0,1})(x86|x64){0,1}$') {
+ $versionPart = $matches[1]
+ $bitnessPart = $matches[2]
+ }
+ else {
+ throw ($msgs.error_invalid_framework -f $framework)
+ }
+ $versions = $null
+ $buildToolsVersions = $null
+ switch ($versionPart) {
+ '1.0' {
+ $versions = @('v1.0.3705')
+ }
+ '1.1' {
+ $versions = @('v1.1.4322')
+ }
+ '1.1.0' {
+ $versions = @()
+ }
+ '2.0' {
+ $versions = @('v2.0.50727')
+ }
+ '2.0.0' {
+ $versions = @()
+ }
+ '3.0' {
+ $versions = @('v2.0.50727')
+ }
+ '3.5' {
+ $versions = @('v3.5', 'v2.0.50727')
+ }
+ '4.0' {
+ $versions = @('v4.0.30319')
+ }
+ {($_ -eq '4.5') -or ($_ -eq '4.5.1') -or ($_ -eq '4.5.2')} {
+ $versions = @('v4.0.30319')
+ $buildToolsVersions = @('16.0', '15.0', '14.0', '12.0')
+ }
+ {($_ -eq '4.6') -or ($_ -eq '4.6.1') -or ($_ -eq '4.6.2')} {
+ $versions = @('v4.0.30319')
+ $buildToolsVersions = @('16.0', '15.0', '14.0')
+ }
+ {($_ -eq '4.7') -or ($_ -eq '4.7.1') -or ($_ -eq '4.7.2')} {
+ $versions = @('v4.0.30319')
+ $buildToolsVersions = @('16.0', '15.0')
+ }
+
+ default {
+ throw ($msgs.error_unknown_framework -f $versionPart, $framework)
+ }
+ }
+
+ $bitness = 'Framework'
+ if ($versionPart -ne '1.0' -and $versionPart -ne '1.1') {
+ switch ($bitnessPart) {
+ 'x86' {
+ $bitness = 'Framework'
+ $buildToolsKey = 'MSBuildToolsPath32'
+ }
+ 'x64' {
+ $bitness = 'Framework64'
+ $buildToolsKey = 'MSBuildToolsPath'
+ }
+ { [string]::IsNullOrEmpty($_) } {
+ $ptrSize = [System.IntPtr]::Size
+ switch ($ptrSize) {
+ 4 {
+ $bitness = 'Framework'
+ $buildToolsKey = 'MSBuildToolsPath32'
+ }
+ 8 {
+ $bitness = 'Framework64'
+ $buildToolsKey = 'MSBuildToolsPath'
+ }
+ default {
+ throw ($msgs.error_unknown_pointersize -f $ptrSize)
+ }
+ }
+ }
+ default {
+ throw ($msgs.error_unknown_bitnesspart -f $bitnessPart, $framework)
+ }
+ }
+ }
+
+ $frameworkDirs = @()
+ if ($null -ne $buildToolsVersions) {
+ foreach($ver in $buildToolsVersions) {
+ if ($ver -eq "15.0") {
+ if ($null -eq (Get-Module -Name VSSetup)) {
+ if ($null -eq (Get-Module -Name VSSetup -ListAvailable)) {
+ WriteColoredOutput ($msgs.warning_missing_vsssetup_module -f $ver) -foregroundcolor Yellow
+ continue
+ }
+
+ Import-Module VSSetup
+ }
+
+ # borrowed from nightroman https://github.com/nightroman/Invoke-Build
+ if ($vsInstances = Get-VSSetupInstance) {
+ $vs = @($vsInstances | Select-VSSetupInstance -Version '[15.0,)' -Require Microsoft.Component.MSBuild)
+ if ($vs) {
+ if ($buildToolsKey -eq 'MSBuildToolsPath32') {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin
+ }
+ else {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin\amd64
+ }
+ }
+
+ $vs = @($vsInstances | Select-VSSetupInstance -Version '[15.0,)' -Product Microsoft.VisualStudio.Product.BuildTools)
+ if ($vs) {
+ if ($buildToolsKey -eq 'MSBuildToolsPath32') {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin
+ }
+ else {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin\amd64
+ }
+ }
+ }
+ else {
+ if (!($root = ${env:ProgramFiles(x86)})) {$root = $env:ProgramFiles}
+ if (Test-Path -LiteralPath "$root\Microsoft Visual Studio\2017") {
+ if ($buildToolsKey -eq 'MSBuildToolsPath32') {
+ $rp = @(Resolve-Path "$root\Microsoft Visual Studio\2017\*\MSBuild\15.0\Bin" -ErrorAction SilentlyContinue)
+ }
+ else {
+ $rp = @(Resolve-Path "$root\Microsoft Visual Studio\2017\*\MSBuild\15.0\Bin\amd64" -ErrorAction SilentlyContinue)
+ }
+
+ if ($rp) {
+ $frameworkDirs += $rp[-1].ProviderPath
+ }
+ }
+ }
+ }
+ elseif ($ver -eq "16.0") {
+ if ($null -eq (Get-Module -Name VSSetup)) {
+ if ($null -eq (Get-Module -Name VSSetup -ListAvailable)) {
+ WriteColoredOutput ($msgs.warning_missing_vsssetup_module -f $ver) -foregroundcolor Yellow
+ continue
+ }
+
+ Import-Module VSSetup
+ }
+
+ # borrowed from nightroman https://github.com/nightroman/Invoke-Build
+ if ($vsInstances = Get-VSSetupInstance) {
+ $vs = @($vsInstances | Select-VSSetupInstance -Version '[16.0,)' -Require Microsoft.Component.MSBuild)
+ if ($vs) {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\Current\Bin
+ }
+
+ $vs = @($vsInstances | Select-VSSetupInstance -Version '[16.0,)' -Product Microsoft.VisualStudio.Product.BuildTools)
+ if ($vs) {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\Current\Bin
+ }
+ }
+ else {
+ if (!($root = ${env:ProgramFiles(x86)})) {$root = $env:ProgramFiles}
+ if (Test-Path -LiteralPath "$root\Microsoft Visual Studio\2019") {
+ $rp = @(Resolve-Path "$root\Microsoft Visual Studio\2019\*\MSBuild\Current\Bin" -ErrorAction SilentlyContinue)
+ if ($rp) {
+ $frameworkDirs += $rp[-1].ProviderPath
+ }
+ }
+ }
+ }
+ elseif (Test-Path "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\$ver") {
+ $frameworkDirs += (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\$ver" -Name $buildToolsKey).$buildToolsKey
+ }
+ }
+ }
+
+ $frameworkDirs = $frameworkDirs + @($versions | ForEach-Object { "$env:windir\Microsoft.NET\$bitness\$_\" })
+ for ($i = 0; $i -lt $frameworkDirs.Count; $i++) {
+ $dir = $frameworkDirs[$i]
+ if ($dir -Match "\$\(Registry:HKEY_LOCAL_MACHINE(.*?)@(.*)\)") {
+ $key = "HKLM:" + $matches[1]
+ $name = $matches[2]
+ $dir = (Get-ItemProperty -Path $key -Name $name).$name
+ $frameworkDirs[$i] = $dir
+ }
+ }
+
+ $frameworkDirs | ForEach-Object { Assert (test-path $_ -pathType Container) ($msgs.error_no_framework_install_dir_found -f $_)}
+
+ $env:PATH = ($frameworkDirs -join ";") + ";$env:PATH"
+ }
+
+ # if any error occurs in a PS function then "stop" processing immediately
+ # this does not effect any external programs that return a non-zero exit code
+ $global:ErrorActionPreference = "Stop"
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/CreateConfigurationForNewContext.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/CreateConfigurationForNewContext.ps1
new file mode 100644
index 0000000..cbe91f4
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/CreateConfigurationForNewContext.ps1
@@ -0,0 +1,28 @@
+function CreateConfigurationForNewContext {
+ param(
+ [string] $buildFile,
+ [string] $framework
+ )
+
+ $previousConfig = GetCurrentConfigurationOrDefault
+
+ $config = new-object psobject -property @{
+ buildFileName = $previousConfig.buildFileName;
+ framework = $previousConfig.framework;
+ taskNameFormat = $previousConfig.taskNameFormat;
+ verboseError = $previousConfig.verboseError;
+ coloredOutput = $previousConfig.coloredOutput;
+ modules = $previousConfig.modules;
+ moduleScope = $previousConfig.moduleScope;
+ }
+
+ if ($framework) {
+ $config.framework = $framework;
+ }
+
+ if ($buildFile) {
+ $config.buildFileName = $buildFile;
+ }
+
+ return $config
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/ExecuteInBuildFileScope.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/ExecuteInBuildFileScope.ps1
new file mode 100644
index 0000000..4be547b
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/ExecuteInBuildFileScope.ps1
@@ -0,0 +1,56 @@
+function ExecuteInBuildFileScope {
+ param([string]$buildFile, $module, [scriptblock]$sb)
+
+ # Execute the build file to set up the tasks and defaults
+ Assert (test-path $buildFile -pathType Leaf) ($msgs.error_build_file_not_found -f $buildFile)
+
+ $psake.build_script_file = get-item $buildFile
+ $psake.build_script_dir = $psake.build_script_file.DirectoryName
+ $psake.build_success = $false
+
+ # Create a new psake context
+ $psake.context.push(
+ @{
+ "taskSetupScriptBlock" = {}
+ "taskTearDownScriptBlock" = {}
+ "executedTasks" = new-object System.Collections.Stack
+ "callStack" = new-object System.Collections.Stack
+ "originalEnvPath" = $env:PATH
+ "originalDirectory" = get-location
+ "originalErrorActionPreference" = $global:ErrorActionPreference
+ "tasks" = @{}
+ "aliases" = @{}
+ "properties" = new-object System.Collections.Stack
+ "includes" = new-object System.Collections.Queue
+ "config" = CreateConfigurationForNewContext $buildFile $framework
+ }
+ )
+
+ # Load in the psake configuration (or default)
+ LoadConfiguration $psake.build_script_dir
+
+ set-location $psake.build_script_dir
+
+ # Import any modules declared in the build script
+ LoadModules
+
+ $frameworkOldValue = $framework
+
+ . $psake.build_script_file.FullName
+
+ $currentContext = $psake.context.Peek()
+
+ if ($framework -ne $frameworkOldValue) {
+ writecoloredoutput $msgs.warning_deprecated_framework_variable -foregroundcolor Yellow
+ $currentContext.config.framework = $framework
+ }
+
+ ConfigureBuildEnvironment
+
+ while ($currentContext.includes.Count -gt 0) {
+ $includeFilename = $currentContext.includes.Dequeue()
+ . $includeFilename
+ }
+
+ & $sb $currentContext $module
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/FormatErrorMessage.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/FormatErrorMessage.ps1
new file mode 100644
index 0000000..657aa72
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/FormatErrorMessage.ps1
@@ -0,0 +1,26 @@
+function FormatErrorMessage
+{
+ [CmdletBinding()]
+ param(
+ [Parameter(ValueFromPipeline=$true)]
+ $ErrorRecord = $Error[0]
+ )
+
+ $currentConfig = GetCurrentConfigurationOrDefault
+ if ($currentConfig.verboseError) {
+ $error_message = "{0}: An Error Occurred. See Error Details Below: $($script:nl)" -f (Get-Date)
+ $error_message += ("-" * 70) + $script:nl
+ $error_message += "Error: {0}$($script:nl)" -f (ResolveError $ErrorRecord -Short)
+ $error_message += ("-" * 70) + $script:nl
+ $error_message += ResolveError $ErrorRecord
+ $error_message += ("-" * 70) + $script:nl
+ $error_message += "Script Variables" + $script:nl
+ $error_message += ("-" * 70) + $script:nl
+ $error_message += get-variable -scope script | format-table | out-string
+ } else {
+ # ($_ | Out-String) gets error messages with source information included.
+ $error_message = "Error: {0}: $($script:nl){1}" -f (Get-Date), (ResolveError $ErrorRecord -Short)
+}
+
+ $error_message
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/Get-DefaultBuildFile.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/Get-DefaultBuildFile.ps1
new file mode 100644
index 0000000..5413208
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/Get-DefaultBuildFile.ps1
@@ -0,0 +1,17 @@
+# Attempt to find the default build file given the config_default of
+# buildFileName and legacyBuildFileName. If neither exist optionally
+# return the buildFileName or $null
+function Get-DefaultBuildFile {
+ param(
+ [boolean] $UseDefaultIfNoneExist = $true
+ )
+
+ if (test-path $psake.config_default.buildFileName -pathType Leaf) {
+ Write-Output $psake.config_default.buildFileName
+ } elseif (test-path $psake.config_default.legacyBuildFileName -pathType Leaf) {
+ Write-Warning "The default configuration file of default.ps1 is deprecated. Please use psakefile.ps1"
+ Write-Output $psake.config_default.legacyBuildFileName
+ } elseif ($UseDefaultIfNoneExist) {
+ Write-Output $psake.config_default.buildFileName
+ }
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/GetCurrentConfigurationOrDefault.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/GetCurrentConfigurationOrDefault.ps1
new file mode 100644
index 0000000..ae0fa4f
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/GetCurrentConfigurationOrDefault.ps1
@@ -0,0 +1,7 @@
+function GetCurrentConfigurationOrDefault() {
+ if ($psake.context.count -gt 0) {
+ return $psake.context.peek().config
+ } else {
+ return $psake.config_default
+ }
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/GetTasksFromContext.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/GetTasksFromContext.ps1
new file mode 100644
index 0000000..5764962
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/GetTasksFromContext.ps1
@@ -0,0 +1,15 @@
+function GetTasksFromContext($currentContext) {
+
+ $docs = $currentContext.tasks.Keys | foreach-object {
+
+ $task = $currentContext.tasks.$_
+ new-object PSObject -property @{
+ Name = $task.Name;
+ Alias = $task.Alias;
+ Description = $task.Description;
+ DependsOn = $task.DependsOn;
+ }
+ }
+
+ return $docs
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/LoadConfiguration.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/LoadConfiguration.ps1
new file mode 100644
index 0000000..7cdcd28
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/LoadConfiguration.ps1
@@ -0,0 +1,31 @@
+function LoadConfiguration {
+ <#
+ .SYNOPSIS
+ Load psake-config.ps1 file
+ .DESCRIPTION
+ Load psake-config.ps1 if present in the directory of the current build script.
+ If that file doesn't exist, load the default psake-config.ps1 file from the module directory.
+ #>
+ param(
+ [string]$configdir = (Split-Path -Path $PSScriptRoot -Parent)
+ )
+
+ $configFilePath = Join-Path -Path $configdir -ChildPath $script:psakeConfigFile
+ $defaultConfigFilePath = Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -ChildPath $script:psakeConfigFile
+
+ if (Test-Path -LiteralPath $configFilePath -PathType Leaf) {
+ $configFileToLoad = $configFilePath
+ } elseIf (Test-Path -LiteralPath $defaultConfigFilePath -PathType Leaf) {
+ $configFileToLoad = $defaultConfigFilePath
+ } else {
+ throw 'Cannot find psake-config.ps1'
+ }
+
+ try {
+ [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
+ $config = GetCurrentConfigurationOrDefault
+ . $configFileToLoad
+ } catch {
+ throw 'Error Loading Configuration from {0}: {1}' -f $configFileToLoad, $_
+ }
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/LoadModules.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/LoadModules.ps1
new file mode 100644
index 0000000..7182b1f
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/LoadModules.ps1
@@ -0,0 +1,21 @@
+function LoadModules {
+ $currentConfig = $psake.context.peek().config
+ if ($currentConfig.modules) {
+
+ $scope = $currentConfig.moduleScope
+
+ $global = [string]::Equals($scope, "global", [StringComparison]::CurrentCultureIgnoreCase)
+
+ $currentConfig.modules | ForEach-Object {
+ resolve-path $_ | ForEach-Object {
+ "Loading module: $_"
+ $module = Import-Module $_ -passthru -DisableNameChecking -global:$global
+ if (!$module) {
+ throw ($msgs.error_loading_module -f $_.Name)
+ }
+ }
+ }
+
+ ""
+ }
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/ResolveError.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/ResolveError.ps1
new file mode 100644
index 0000000..3f697ba
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/ResolveError.ps1
@@ -0,0 +1,62 @@
+# borrowed from Jeffrey Snover http://blogs.msdn.com/powershell/archive/2006/12/07/resolve-error.aspx
+# modified to better handle SQL errors
+function ResolveError
+{
+ [CmdletBinding()]
+ param(
+ [Parameter(ValueFromPipeline=$true)]
+ $ErrorRecord=$Error[0],
+ [Switch]
+ $Short
+ )
+
+ process {
+ if ($_ -eq $null) { $_ = $ErrorRecord }
+ $ex = $_.Exception
+
+ if (-not $Short) {
+ $error_message = "$($script:nl)ErrorRecord:{0}ErrorRecord.InvocationInfo:{1}Exception:$($script:nl){2}"
+ $formatted_errorRecord = $_ | format-list * -force | out-string
+ $formatted_invocationInfo = $_.InvocationInfo | format-list * -force | out-string
+ $formatted_exception = ''
+
+ $i = 0
+ while ($null -ne $ex) {
+ $i++
+ $formatted_exception += ("$i" * 70) + $script:nl +
+ ($ex | format-list * -force | out-string) + $script:nl
+ $ex = $ex | SelectObjectWithDefault -Name 'InnerException' -Value $null
+ }
+
+ return $error_message -f $formatted_errorRecord, $formatted_invocationInfo, $formatted_exception
+ }
+
+ $lastException = @()
+ while ($null -ne $ex) {
+ $lastMessage = $ex | SelectObjectWithDefault -Name 'Message' -Value ''
+ $lastException += ($lastMessage -replace $script:nl, '')
+ if ($ex -is [Data.SqlClient.SqlException]) {
+ $lastException += "(Line [$($ex.LineNumber)] " +
+ "Procedure [$($ex.Procedure)] Class [$($ex.Class)] " +
+ " Number [$($ex.Number)] State [$($ex.State)] )"
+ }
+ $ex = $ex | SelectObjectWithDefault -Name 'InnerException' -Value $null
+ }
+ $shortException = $lastException -join ' --> '
+
+ $header = $null
+ $header = (($_.InvocationInfo |
+ SelectObjectWithDefault -Name 'PositionMessage' -Value '') -replace $script:nl, ' '),
+ ($_ | SelectObjectWithDefault -Name 'Message' -Value ''),
+ ($_ | SelectObjectWithDefault -Name 'Exception' -Value '') |
+ Where-Object { -not [String]::IsNullOrEmpty($_) } |
+ Select-Object -First 1
+
+ $delimiter = ''
+ if ((-not [String]::IsNullOrEmpty($header)) -and
+ (-not [String]::IsNullOrEmpty($shortException)))
+ { $delimiter = ' [<<==>>] ' }
+
+ return "$($header)$($delimiter)Exception: $($shortException)"
+ }
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/SelectObjectWithDefault.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/SelectObjectWithDefault.ps1
new file mode 100644
index 0000000..f60af9d
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/SelectObjectWithDefault.ps1
@@ -0,0 +1,23 @@
+function SelectObjectWithDefault
+{
+ [CmdletBinding()]
+ param(
+ [Parameter(ValueFromPipeline=$true)]
+ [PSObject]
+ $InputObject,
+ [string]
+ $Name,
+ $Value
+ )
+
+ process {
+ if ($_ -eq $null) { $Value }
+ elseif ($_ | Get-Member -Name $Name) {
+ $_.$Name
+ }
+ elseif (($_ -is [Hashtable]) -and ($_.Keys -contains $Name)) {
+ $_.$Name
+ }
+ else { $Value }
+ }
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/Test-ModuleVersion.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/Test-ModuleVersion.ps1
new file mode 100644
index 0000000..c1c9fb5
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/Test-ModuleVersion.ps1
@@ -0,0 +1,107 @@
+<#
+.SYNOPSIS
+ Validate that the version of a module passed in via the $currentVersion
+ parameter is valid based on the criteria specified by the following
+ parameters.
+.DESCRIPTION
+ This function is used to determine whether or not a given module is within
+ the version bounds specified by the parameters passed in. Psake will use
+ this information to determine if the module it has found will contain the
+ proper version of the shared task it has been asked to import.
+
+ This function should allow bounds that are only on the lower limit, only on
+ the upper, within a range, or if no bounds are supplied, the current module
+ will be accepted without question.
+.PARAMETER currentVersion
+ The version of the module in the current session to be subjected to comparison
+.PARAMETER minimumVersion
+ The lower bound of the version that will be accepted. This comparison should
+ be inclusive, meaning an input version greater than or equal to this version
+ should be accepted.
+.PARAMETER maximumVersion
+ The upper bound of the version that will be accepted. This comparison should
+ be inclusive, meaning an input version less than or equal to this version
+ should be accepted.
+.PARAMETER lessThanVersion
+ The upper bound of the version that will be accepted. This comparison should
+ be exlusive. Meaning an input version that is less than only, not equal to
+ this version, will be accepted.
+.INPUTS
+ A $currentVersion of type [System.Version] or a convertable string.
+ A set of version criteria, each of type [System.Version] or a convertable string.
+.OUTPUTS
+ boolean - Pass/Fail
+#>
+function Test-ModuleVersion {
+ [CmdletBinding()]
+ param (
+ [string]$currentVersion,
+ [string]$minimumVersion,
+ [string]$maximumVersion,
+ [string]$lessThanVersion
+ )
+
+ begin {
+ }
+
+ process {
+ $result = $true
+
+ # If no version is specified simply return true and allow the module to pass.
+ if("$minimumVersion$maximumVersion$lessthanVersion" -eq ''){
+ return $true
+ }
+
+ # Single integer values cannot be converted to type system.version.
+ # We convert to a string, and if there is a single character we know that
+ # we need to add a '.0' to the integer to make it convertable to a version.
+ if(![string]::IsNullOrEmpty($currentVersion)) {
+ if($currentVersion.ToString().Length -eq 1) {
+ [version]$currentVersion = "$currentVersion.0"
+ } else {
+ [version]$currentVersion = $currentVersion
+ }
+ }
+
+ if(![string]::IsNullOrEmpty($minimumVersion)) {
+ if($minimumVersion.ToString().Length -eq 1){
+ [version]$minimumVersion = "$minimumVersion.0"
+ } else {
+ [version]$minimumVersion = $minimumVersion
+ }
+
+ if($currentVersion.CompareTo($minimumVersion) -lt 0){
+ $result = $false
+ }
+ }
+
+ if(![string]::IsNullOrEmpty($maximumVersion)) {
+ if($maximumVersion.ToString().Length -eq 1) {
+ [version]$maximumVersion = "$maximumVersion.0"
+ } else {
+ [version]$maximumVersion = $maximumVersion
+ }
+
+ if ($currentVersion.CompareTo($maximumVersion) -gt 0) {
+ $result = $false
+ }
+ }
+
+ if(![string]::IsNullOrEmpty($lessThanVersion)) {
+ if($lessThanVersion.ToString().Length -eq 1) {
+ [version]$lessThanVersion = "$lessThanVersion.0"
+ } else {
+ [version]$lessThanVersion = $lessThanVersion
+ }
+
+ if($currentVersion.CompareTo($lessThanVersion) -ge 0) {
+ $result = $false
+ }
+ }
+
+ Write-Output $result
+ }
+
+ end {
+ }
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/WriteColoredOutput.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/WriteColoredOutput.ps1
new file mode 100644
index 0000000..5c33ec6
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/WriteColoredOutput.ps1
@@ -0,0 +1,20 @@
+function WriteColoredOutput {
+ param(
+ [string] $message,
+ [System.ConsoleColor] $foregroundcolor
+ )
+
+ $currentConfig = GetCurrentConfigurationOrDefault
+ if ($currentConfig.coloredOutput -eq $true) {
+ if (($null -ne $Host.UI) -and ($null -ne $Host.UI.RawUI) -and ($null -ne $Host.UI.RawUI.ForegroundColor)) {
+ $previousColor = $Host.UI.RawUI.ForegroundColor
+ $Host.UI.RawUI.ForegroundColor = $foregroundcolor
+ }
+ }
+
+ $message
+
+ if ($null -ne $previousColor) {
+ $Host.UI.RawUI.ForegroundColor = $previousColor
+ }
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/WriteDocumentation.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/WriteDocumentation.ps1
new file mode 100644
index 0000000..a131e54
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/WriteDocumentation.ps1
@@ -0,0 +1,26 @@
+function WriteDocumentation($showDetailed) {
+
+ $currentContext = $psake.context.Peek()
+
+ if ($currentContext.tasks.default) {
+ $defaultTaskDependencies = $currentContext.tasks.default.DependsOn
+ } else {
+ $defaultTaskDependencies = @()
+ }
+
+ $docs = GetTasksFromContext $currentContext |
+ Where-Object {$_.Name -ne 'default'} |
+ ForEach-Object {
+ $isDefault = $null
+ if ($defaultTaskDependencies -contains $_.Name) {
+ $isDefault = $true
+ }
+ return Add-Member -InputObject $_ 'Default' $isDefault -PassThru
+ }
+
+ if ($showDetailed) {
+ $docs | Sort-Object 'Name' | format-list -property Name,Alias,Description,@{Label="Depends On";Expression={$_.DependsOn -join ', '}},Default
+ } else {
+ $docs | Sort-Object 'Name' | format-table -autoSize -wrap -property Name,Alias,@{Label="Depends On";Expression={$_.DependsOn -join ', '}},Default,Description
+ }
+ }
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/WriteTaskTimeSummary.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/WriteTaskTimeSummary.ps1
new file mode 100644
index 0000000..732a2d6
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/private/WriteTaskTimeSummary.ps1
@@ -0,0 +1,34 @@
+function WriteTaskTimeSummary($invokePsakeDuration) {
+ if ($psake.context.count -gt 0) {
+ $currentContext = $psake.context.Peek()
+ if ($currentContext.config.taskNameFormat -is [ScriptBlock]) {
+ & $currentContext.config.taskNameFormat "Build Time Report"
+ } elseif ($currentContext.config.taskNameFormat -ne "Executing {0}") {
+ $currentContext.config.taskNameFormat -f "Build Time Report"
+ }
+ else {
+ "-" * 70
+ "Build Time Report"
+ "-" * 70
+ }
+ $list = @()
+ while ($currentContext.executedTasks.Count -gt 0) {
+ $taskKey = $currentContext.executedTasks.Pop()
+ $task = $currentContext.tasks.$taskKey
+ if ($taskKey -eq "default") {
+ continue
+ }
+ $list += new-object PSObject -property @{
+ Name = $task.Name;
+ Duration = $task.Duration.ToString("hh\:mm\:ss\.fff")
+ }
+ }
+ [Array]::Reverse($list)
+ $list += new-object PSObject -property @{
+ Name = "Total:";
+ Duration = $invokePsakeDuration.ToString("hh\:mm\:ss\.fff")
+ }
+ # using "out-string | where-object" to filter out the blank line that format-table prepends
+ $list | format-table -autoSize -property Name,Duration | out-string -stream | where-object { $_ }
+ }
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake
new file mode 100644
index 0000000..e2cbfc5
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake
@@ -0,0 +1,12 @@
+#!/usr/bin/env sh
+
+# Use greadlink on macOS.
+if [ "$(uname)" = "Darwin" ]; then
+ which greadlink > /dev/null || {
+ printf 'GNU readlink not found\n'
+ exit 1
+ }
+ alias readlink="greadlink"
+fi
+
+pwsh -NoProfile -Command "& $(dirname "$(readlink -f -- "$0")")/psake.ps1 $@"
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake-config.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake-config.ps1
new file mode 100644
index 0000000..2c5001f
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake-config.ps1
@@ -0,0 +1,22 @@
+<#
+-------------------------------------------------------------------
+Defaults
+-------------------------------------------------------------------
+$config.buildFileName="psakefile.ps1"
+$config.legacyBuildFileName="default.ps1"
+$config.framework = "4.0"
+$config.taskNameFormat="Executing {0}"
+$config.verboseError=$false
+$config.coloredOutput = $true
+$config.modules=$null
+
+-------------------------------------------------------------------
+Load modules from .\modules folder and from file my_module.psm1
+-------------------------------------------------------------------
+$config.modules=(".\modules\*.psm1",".\my_module.psm1")
+
+-------------------------------------------------------------------
+Use scriptblock for taskNameFormat
+-------------------------------------------------------------------
+$config.taskNameFormat= { param($taskName) "Executing $taskName at $(get-date)" }
+#>
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake.cmd b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake.cmd
new file mode 100644
index 0000000..634314e
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake.cmd
@@ -0,0 +1,14 @@
+@echo off
+rem Helper script for those who want to run psake from cmd.exe
+rem Example run from cmd.exe:
+rem psake "psakefile.ps1" "BuildHelloWord" "4.0"
+
+if '%1'=='/?' goto help
+if '%1'=='-help' goto help
+if '%1'=='-h' goto help
+
+powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\psake.ps1' %*"
+exit /B %errorlevel%
+
+:help
+powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\psake.ps1' -help"
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake.ps1
new file mode 100644
index 0000000..0fe9e6f
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake.ps1
@@ -0,0 +1,71 @@
+# Helper script for those who want to run psake without importing the module.
+# Example run from PowerShell:
+# .\psake.ps1 "psakefile.ps1" "BuildHelloWord" "4.0"
+
+# Must match parameter definitions for psake.psm1/invoke-psake
+# otherwise named parameter binding fails
+[cmdletbinding()]
+param(
+ [Parameter(Position = 0, Mandatory = $false)]
+ [string]$buildFile,
+
+ [Parameter(Position = 1, Mandatory = $false)]
+ [string[]]$taskList = @(),
+
+ [Parameter(Position = 2, Mandatory = $false)]
+ [string]$framework,
+
+ [Parameter(Position = 3, Mandatory = $false)]
+ [switch]$docs = $false,
+
+ [Parameter(Position = 4, Mandatory = $false)]
+ [System.Collections.Hashtable]$parameters = @{},
+
+ [Parameter(Position = 5, Mandatory = $false)]
+ [System.Collections.Hashtable]$properties = @{},
+
+ [Parameter(Position = 6, Mandatory = $false)]
+ [alias("init")]
+ [scriptblock]$initialization = {},
+
+ [Parameter(Position = 7, Mandatory = $false)]
+ [switch]$nologo = $false,
+
+ [Parameter(Position = 8, Mandatory = $false)]
+ [switch]$help = $false,
+
+ [Parameter(Position = 9, Mandatory = $false)]
+ [string]$scriptPath,
+
+ [Parameter(Position = 10, Mandatory = $false)]
+ [switch]$detailedDocs = $false,
+
+ [Parameter(Position = 11, Mandatory = $false)]
+ [switch]$notr = $false
+)
+
+# setting $scriptPath here, not as default argument, to support calling as "powershell -File psake.ps1"
+if (-not $scriptPath) {
+ $scriptPath = $(Split-Path -Path $MyInvocation.MyCommand.path -Parent)
+}
+
+# '[p]sake' is the same as 'psake' but $Error is not polluted
+Remove-Module -Name [p]sake -Verbose:$false
+Import-Module -Name (Join-Path -Path $scriptPath -ChildPath 'psake.psd1') -Verbose:$false
+if ($help) {
+ Get-Help -Name Invoke-psake -Full
+ return
+}
+
+if ($buildFile -and (-not (Test-Path -Path $buildFile))) {
+ $absoluteBuildFile = (Join-Path -Path $scriptPath -ChildPath $buildFile)
+ if (Test-path -Path $absoluteBuildFile) {
+ $buildFile = $absoluteBuildFile
+ }
+}
+
+Invoke-psake $buildFile $taskList $framework $docs $parameters $properties $initialization $nologo $detailedDocs $notr
+
+if (!$psake.build_success) {
+ exit 1
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake.psd1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake.psd1
new file mode 100644
index 0000000..ab339f2
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake.psd1
@@ -0,0 +1,33 @@
+@{
+ RootModule = 'psake.psm1'
+ ModuleVersion = '4.8.0'
+ GUID = 'cfb53216-072f-4a46-8975-ff7e6bda05a5'
+ Author = 'James Kovacs'
+ Copyright = 'Copyright (c) 2010-18 James Kovacs, Damian Hickey, Brandon Olin, and Contributors'
+ PowerShellVersion = '3.0'
+ Description = 'psake is a build automation tool written in PowerShell.'
+ FunctionsToExport = @(
+ 'Invoke-psake'
+ 'Invoke-Task'
+ 'Get-PSakeScriptTasks'
+ 'Task'
+ 'Properties'
+ 'Include'
+ 'FormatTaskName'
+ 'TaskSetup'
+ 'TaskTearDown'
+ 'Framework'
+ 'Assert'
+ 'Exec'
+ )
+ VariablesToExport = 'psake'
+ PrivateData = @{
+ PSData = @{
+ ReleaseNotes = 'https://raw.githubusercontent.com/psake/psake/master/CHANGELOG.md'
+ LicenseUri = 'https://raw.githubusercontent.com/psake/psake/master/license.txt'
+ ProjectUri = 'https://github.com/psake/psake'
+ Tags = @('Build', 'Task')
+ IconUri = 'https://raw.githubusercontent.com/psake/graphics/master/png/psake-single-icon-teal-bg-256x256.png'
+ }
+ }
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake.psm1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake.psm1
new file mode 100644
index 0000000..1d5f008
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/psake.psm1
@@ -0,0 +1,112 @@
+# psake
+# Copyright (c) 2012 James Kovacs
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+#Requires -Version 2.0
+
+if ($PSVersionTable.PSVersion.Major -ge 3) {
+ $script:IgnoreError = 'Ignore'
+} else {
+ $script:IgnoreError = 'SilentlyContinue'
+}
+
+$script:nl = [System.Environment]::NewLine
+
+# Dot source public/private functions
+$dotSourceParams = @{
+ Filter = '*.ps1'
+ Recurse = $true
+ ErrorAction = 'Stop'
+}
+$public = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -ChildPath 'public') @dotSourceParams )
+$private = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -ChildPath 'private/*.ps1') @dotSourceParams)
+foreach ($import in @($public + $private)) {
+ try {
+ . $import.FullName
+ } catch {
+ throw "Unable to dot source [$($import.FullName)]"
+ }
+}
+
+DATA msgs {
+ convertfrom-stringdata @'
+ error_invalid_task_name = Task name should not be null or empty string.
+ error_task_name_does_not_exist = Task {0} does not exist.
+ error_circular_reference = Circular reference found for task {0}.
+ error_missing_action_parameter = Action parameter must be specified when using PreAction or PostAction parameters for task {0}.
+ error_corrupt_callstack = Call stack was corrupt. Expected {0}, but got {1}.
+ error_invalid_framework = Invalid .NET Framework version, {0} specified.
+ error_unknown_framework = Unknown .NET Framework version, {0} specified in {1}.
+ error_unknown_pointersize = Unknown pointer size ({0}) returned from System.IntPtr.
+ error_unknown_bitnesspart = Unknown .NET Framework bitness, {0}, specified in {1}.
+ error_unknown_module = Unable to find module [{0}].
+ error_no_framework_install_dir_found = No .NET Framework installation directory found at {0}.
+ error_bad_command = Error executing command {0}.
+ error_default_task_cannot_have_action = 'default' task cannot specify an action.
+ error_shared_task_cannot_have_action = '{0} references a shared task from module {1} and cannot have an action.
+ error_duplicate_task_name = Task {0} has already been defined.
+ error_duplicate_alias_name = Alias {0} has already been defined.
+ error_invalid_include_path = Unable to include {0}. File not found.
+ error_build_file_not_found = Could not find the build file {0}.
+ error_no_default_task = 'default' task required.
+ error_loading_module = Error loading module {0}.
+ warning_deprecated_framework_variable = Warning: Using global variable $framework to set .NET framework version used is deprecated. Instead use Framework function or configuration file psake-config.ps1.
+ warning_missing_vsssetup_module = Warning: Cannot find build tools version {0} without the module VSSetup. You can install this module with the command: Install-Module VSSetup -Scope CurrentUser
+ required_variable_not_set = Variable {0} must be set to run task {1}.
+ postcondition_failed = Postcondition failed for task {0}.
+ precondition_was_false = Precondition was false, not executing task {0}.
+ continue_on_error = Error in task {0}. {1}
+ psake_success = psake succeeded executing {0}
+'@
+}
+
+Import-LocalizedData -BindingVariable msgs -FileName messages.psd1 -ErrorAction $script:IgnoreError
+
+$scriptDir = Split-Path $MyInvocation.MyCommand.Path
+$manifestPath = Join-Path $scriptDir psake.psd1
+$manifest = Test-ModuleManifest -Path $manifestPath -WarningAction SilentlyContinue
+
+$script:psakeConfigFile = 'psake-config.ps1'
+
+$script:psake = @{}
+
+$psake.version = $manifest.Version.ToString()
+$psake.context = new-object system.collections.stack # holds onto the current state of all variables
+$psake.run_by_psake_build_tester = $false # indicates that build is being run by psake-BuildTester
+$psake.LoadedTaskModules = @{}
+$psake.ReferenceTasks = @{}
+$psake.config_default = new-object psobject -property @{
+ buildFileName = "psakefile.ps1"
+ legacyBuildFileName = "default.ps1"
+ framework = "4.0"
+ taskNameFormat = "Executing {0}"
+ verboseError = $false
+ coloredOutput = $true
+ modules = $null
+ moduleScope = ""
+} # contains default configuration, can be overridden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script
+
+$psake.build_success = $false # indicates that the current build was successful
+$psake.build_script_file = $null # contains a System.IO.FileInfo for the current build script
+$psake.build_script_dir = "" # contains a string with fully-qualified path to current build script
+$psake.error_message = $null # contains the error message which caused the script to fail
+
+LoadConfiguration
+
+export-modulemember -function $public.BaseName -variable psake
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Assert.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Assert.ps1
new file mode 100644
index 0000000..471e561
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Assert.ps1
@@ -0,0 +1,71 @@
+function Assert {
+ <#
+ .SYNOPSIS
+ Helper function for "Design by Contract" assertion checking.
+
+ .DESCRIPTION
+ This is a helper function that makes the code less noisy by eliminating many of the "if" statements that are normally required to verify assumptions in the code.
+
+ .PARAMETER conditionToCheck
+ The boolean condition to evaluate
+
+ .PARAMETER failureMessage
+ The error message used for the exception if the conditionToCheck parameter is false
+
+ .EXAMPLE
+ C:\PS>Assert $false "This always throws an exception"
+
+ Example of an assertion that will always fail.
+
+ .EXAMPLE
+ C:\PS>Assert ( ($i % 2) -eq 0 ) "$i is not an even number"
+
+ This exmaple may throw an exception if $i is not an even number
+
+ Note:
+ It might be necessary to wrap the condition with paranthesis to force PS to evaluate the condition
+ so that a boolean value is calculated and passed into the 'conditionToCheck' parameter.
+
+ Example:
+ Assert 1 -eq 2 "1 doesn't equal 2"
+
+ PS will pass 1 into the condtionToCheck variable and PS will look for a parameter called "eq" and
+ throw an exception with the following message "A parameter cannot be found that matches parameter name 'eq'"
+
+ The solution is to wrap the condition in () so that PS will evaluate it first.
+
+ Assert (1 -eq 2) "1 doesn't equal 2"
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ $conditionToCheck,
+
+ [Parameter(Mandatory = $true)]
+ [string]$failureMessage
+ )
+
+ if (-not $conditionToCheck) {
+ throw ('Assert: {0}' -f $failureMessage)
+ }
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Exec.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Exec.ps1
new file mode 100644
index 0000000..52e8c85
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Exec.ps1
@@ -0,0 +1,109 @@
+function Exec {
+ <#
+ .SYNOPSIS
+ Helper function for executing command-line programs.
+
+ .DESCRIPTION
+ This is a helper function that runs a scriptblock and checks the PS variable $lastexitcode to see if an error occcured.
+ If an error is detected then an exception is thrown.
+ This function allows you to run command-line programs without having to explicitly check fthe $lastexitcode variable.
+
+ .PARAMETER cmd
+ The scriptblock to execute. This scriptblock will typically contain the command-line invocation.
+
+ .PARAMETER errorMessage
+ The error message to display if the external command returned a non-zero exit code.
+
+ .PARAMETER maxRetries
+ The maximum number of times to retry the command before failing.
+
+ .PARAMETER retryTriggerErrorPattern
+ If the external command raises an exception, match the exception against this regex to determine if the command can be retried.
+ If a match is found, the command will be retried provided [maxRetries] has not been reached.
+
+ .PARAMETER workingDirectory
+ The working directory to set before running the external command.
+
+ .EXAMPLE
+ exec { svn info $repository_trunk } "Error executing SVN. Please verify SVN command-line client is installed"
+
+ This example calls the svn command-line client.
+ .LINK
+ Assert
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ .LINK
+ Properties
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [scriptblock]$cmd,
+
+ [string]$errorMessage = ($msgs.error_bad_command -f $cmd),
+
+ [int]$maxRetries = 0,
+
+ [string]$retryTriggerErrorPattern = $null,
+
+ [string]$workingDirectory = $null
+ )
+
+ if ($workingDirectory) {
+ Push-Location -Path $workingDirectory
+ }
+
+ $tryCount = 1
+
+ do {
+ try {
+ $global:lastexitcode = 0
+ & $cmd
+ if ($global:lastexitcode -ne 0) {
+ throw "Exec: $errorMessage"
+ }
+ break
+ }
+ catch [Exception] {
+ if ($tryCount -gt $maxRetries) {
+ throw $_
+ }
+
+ if ($retryTriggerErrorPattern -ne $null) {
+ $isMatch = [regex]::IsMatch($_.Exception.Message, $retryTriggerErrorPattern)
+
+ if ($isMatch -eq $false) {
+ throw $_
+ }
+ }
+
+ "Try $tryCount failed, retrying again in 1 second..."
+
+ $tryCount++
+
+ [System.Threading.Thread]::Sleep([System.TimeSpan]::FromSeconds(1))
+ }
+ finally {
+ if ($workingDirectory) {
+ Pop-Location
+ }
+ }
+ }
+ while ($true)
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/FormatTaskName.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/FormatTaskName.ps1
new file mode 100644
index 0000000..a8be633
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/FormatTaskName.ps1
@@ -0,0 +1,95 @@
+function FormatTaskName {
+ <#
+ .SYNOPSIS
+ This function allows you to change how psake renders the task name during a build.
+
+ .DESCRIPTION
+ This function takes either a string which represents a format string (formats using the -f format operator see "help about_operators") or it can accept a script block that has a single parameter that is the name of the task that will be executed.
+
+ .PARAMETER format
+ A format string or a scriptblock to execute
+
+ .EXAMPLE
+ A sample build script that uses a format string is shown below:
+
+ Task default -depends TaskA, TaskB, TaskC
+
+ FormatTaskName "-------- {0} --------"
+
+ Task TaskA {
+ "TaskA is executing"
+ }
+
+ Task TaskB {
+ "TaskB is executing"
+ }
+
+ Task TaskC {
+ "TaskC is executing"
+
+ -----------
+ The script above produces the following output:
+
+ -------- TaskA --------
+ TaskA is executing
+ -------- TaskB --------
+ TaskB is executing
+ -------- TaskC --------
+ TaskC is executing
+
+ Build Succeeded!
+ .EXAMPLE
+ A sample build script that uses a ScriptBlock is shown below:
+
+ Task default -depends TaskA, TaskB, TaskC
+
+ FormatTaskName {
+ param($taskName)
+ write-host "Executing Task: $taskName" -foregroundcolor blue
+ }
+
+ Task TaskA {
+ "TaskA is executing"
+ }
+
+ Task TaskB {
+ "TaskB is executing"
+ }
+
+ Task TaskC {
+ "TaskC is executing"
+ }
+
+ -----------
+ The above example uses the scriptblock parameter to the FormatTaskName function to render each task name in the color blue.
+
+ Note: the $taskName parameter is arbitrary, it could be named anything.
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ $format
+ )
+
+ $psake.context.Peek().config.taskNameFormat = $format
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Framework.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Framework.ps1
new file mode 100644
index 0000000..304bb06
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Framework.ps1
@@ -0,0 +1,55 @@
+function Framework {
+ <#
+ .SYNOPSIS
+ Sets the version of the .NET framework you want to use during build.
+
+ .DESCRIPTION
+ This function will accept a string containing version of the .NET framework to use during build.
+ Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x64', '4.5', '4.5x86', '4.5x64', '4.5.1', '4.5.1x86', '4.5.1x64'.
+ Default is '3.5*', where x86 or x64 will be detected based on the bitness of the PowerShell process.
+
+ .PARAMETER framework
+ Version of the .NET framework to use during build.
+
+ .EXAMPLE
+ Framework "4.0"
+
+ Task default -depends Compile
+
+ Task Compile -depends Clean {
+ msbuild /version
+ }
+
+ -----------
+ The script above will output detailed version of msbuid v4
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$framework
+ )
+
+ $psake.context.Peek().config.framework = $framework
+
+ ConfigureBuildEnvironment
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Get-PSakeScriptTasks.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Get-PSakeScriptTasks.ps1
new file mode 100644
index 0000000..e0f8f96
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Get-PSakeScriptTasks.ps1
@@ -0,0 +1,45 @@
+function Get-PSakeScriptTasks {
+ <#
+ .SYNOPSIS
+ Returns meta data about all the tasks defined in the provided psake script.
+
+ .DESCRIPTION
+ Returns meta data about all the tasks defined in the provided psake script.
+
+ .PARAMETER buildFile
+ The path to the psake build script to read the tasks from.
+
+ .EXAMPLE
+ PS C:\>Get-PSakeScriptTasks -buildFile '.\build.ps1'
+
+ DependsOn Alias Name Description
+ --------- ----- ---- -----------
+ {} Compile
+ {} Clean
+ {Test} Default
+ {Clean, Compile} Test
+
+ Gets the psake tasks contained in the 'build.ps1' file.
+
+ .LINK
+ Invoke-psake
+ #>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseSingularNouns', '')]
+ [CmdletBinding()]
+ param(
+ [string]$buildFile
+ )
+
+ if (-not $buildFile) {
+ $buildFile = $psake.config_default.buildFileName
+ }
+
+ try {
+ ExecuteInBuildFileScope $buildFile $MyInvocation.MyCommand.Module {
+ param($currentContext, $module)
+ return GetTasksFromContext $currentContext
+ }
+ } finally {
+ CleanupEnvironment
+ }
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Include.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Include.ps1
new file mode 100644
index 0000000..3c163fe
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Include.ps1
@@ -0,0 +1,64 @@
+function Include {
+ <#
+ .SYNOPSIS
+ Include the functions or code of another powershell script file into the current build script's scope
+
+ .DESCRIPTION
+ A build script may declare an "includes" function which allows you to define a file containing powershell code to be included
+ and added to the scope of the currently running build script. Code from such file will be executed after code from build script.
+
+ .PARAMETER fileNamePathToInclude
+ A string containing the path and name of the powershell file to include
+
+ .EXAMPLE
+ A sample build script is shown below:
+
+ Include ".\build_utils.ps1"
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ -----------
+ The script above includes all the functions and variables defined in the ".\build_utils.ps1" script into the current build script's scope
+
+ Note: You can have more than 1 "Include" function defined in the build script.
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$fileNamePathToInclude
+ )
+
+ Assert (test-path $fileNamePathToInclude -pathType Leaf) ($msgs.error_invalid_include_path -f $fileNamePathToInclude)
+
+ $psake.context.Peek().includes.Enqueue((Resolve-Path $fileNamePathToInclude));
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Invoke-Task.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Invoke-Task.ps1
new file mode 100644
index 0000000..e441170
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Invoke-Task.ps1
@@ -0,0 +1,158 @@
+function Invoke-Task {
+ <#
+ .SYNOPSIS
+ Executes another task in the current build script.
+
+ .DESCRIPTION
+ This is a function that will allow you to invoke a Task from within another Task in the current build script.
+
+ .PARAMETER taskName
+ The name of the task to execute.
+
+ .EXAMPLE
+ Invoke-Task "Compile"
+
+ This example calls the "Compile" task.
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$taskName
+ )
+
+ Assert $taskName ($msgs.error_invalid_task_name)
+
+ $taskKey = $taskName.ToLower()
+
+ $currentContext = $psake.context.Peek()
+
+ if ($currentContext.aliases.Contains($taskKey)) {
+ $taskName = $currentContext.aliases.$taskKey.Name
+ $taskKey = $taskName.ToLower()
+ }
+
+ Assert ($currentContext.tasks.Contains($taskKey)) ($msgs.error_task_name_does_not_exist -f $taskName)
+
+ if ($currentContext.executedTasks.Contains($taskKey)) { return }
+
+ Assert (!$currentContext.callStack.Contains($taskKey)) ($msgs.error_circular_reference -f $taskName)
+
+ $currentContext.callStack.Push($taskKey)
+
+ $task = $currentContext.tasks.$taskKey
+
+ $precondition_is_valid = & $task.Precondition
+
+ if (!$precondition_is_valid) {
+ WriteColoredOutput ($msgs.precondition_was_false -f $taskName) -foregroundcolor Cyan
+ } else {
+ if ($taskKey -ne 'default') {
+
+ if ($task.PreAction -or $task.PostAction) {
+ Assert ($null -ne $task.Action) ($msgs.error_missing_action_parameter -f $taskName)
+ }
+
+ if ($task.Action) {
+
+ $stopwatch = new-object System.Diagnostics.Stopwatch
+
+ try {
+ foreach($childTask in $task.DependsOn) {
+ Invoke-Task $childTask
+ }
+ $stopwatch.Start()
+
+ $currentContext.currentTaskName = $taskName
+
+ try {
+ & $currentContext.taskSetupScriptBlock @($task)
+ try {
+ if ($task.PreAction) {
+ & $task.PreAction
+ }
+
+ if ($currentContext.config.taskNameFormat -is [ScriptBlock]) {
+ $taskHeader = & $currentContext.config.taskNameFormat $taskName
+ } else {
+ $taskHeader = $currentContext.config.taskNameFormat -f $taskName
+ }
+ WriteColoredOutput $taskHeader -foregroundcolor Cyan
+
+ foreach ($variable in $task.requiredVariables) {
+ Assert ((Test-Path "variable:$variable") -and ($null -ne (Get-Variable $variable).Value)) ($msgs.required_variable_not_set -f $variable, $taskName)
+ }
+
+ & $task.Action
+ } finally {
+ if ($task.PostAction) {
+ & $task.PostAction
+ }
+ }
+ } catch {
+ # want to catch errors here _before_ we invoke TaskTearDown
+ # so that TaskTearDown reliably gets the Task-scoped
+ # success/fail/error context.
+ $task.Success = $false
+ $task.ErrorMessage = $_
+ $task.ErrorDetail = $_ | Out-String
+ $task.ErrorFormatted = FormatErrorMessage $_
+
+ throw $_ # pass this up the chain; cleanup is handled higher int he stack
+ } finally {
+ & $currentContext.taskTearDownScriptBlock $task
+ }
+ } catch {
+ if ($task.ContinueOnError) {
+ "-"*70
+ WriteColoredOutput ($msgs.continue_on_error -f $taskName,$_) -foregroundcolor Yellow
+ "-"*70
+ [void]$currentContext.callStack.Pop()
+ } else {
+ throw $_
+ }
+ } finally {
+ $task.Duration = $stopwatch.Elapsed
+ }
+ } else {
+ # no action was specified but we still execute all the dependencies
+ foreach($childTask in $task.DependsOn) {
+ Invoke-Task $childTask
+ }
+ }
+ } else {
+ foreach($childTask in $task.DependsOn) {
+ Invoke-Task $childTask
+ }
+ }
+
+ Assert (& $task.Postcondition) ($msgs.postcondition_failed -f $taskName)
+ }
+
+ $poppedTaskKey = $currentContext.callStack.Pop()
+ Assert ($poppedTaskKey -eq $taskKey) ($msgs.error_corrupt_callstack -f $taskKey,$poppedTaskKey)
+
+ $currentContext.executedTasks.Push($taskKey)
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Invoke-psake.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Invoke-psake.ps1
new file mode 100644
index 0000000..b9119db
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Invoke-psake.ps1
@@ -0,0 +1,336 @@
+function Invoke-psake {
+ <#
+ .SYNOPSIS
+ Runs a psake build script.
+
+ .DESCRIPTION
+ This function runs a psake build script
+
+ .PARAMETER buildFile
+ The path to the psake build script to execute
+
+ .PARAMETER taskList
+ A comma-separated list of task names to execute
+
+ .PARAMETER framework
+ The version of the .NET framework you want to use during build. You can append x86 or x64 to force a specific framework.
+ If not specified, x86 or x64 will be detected based on the bitness of the PowerShell process.
+ Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x64', '4.5', '4.5x86', '4.5x64', '4.5.1', '4.5.1x86', '4.5.1x64'
+
+ .PARAMETER docs
+ Prints a list of tasks and their descriptions
+
+ .PARAMETER parameters
+ A hashtable containing parameters to be passed into the current build script.
+ These parameters will be processed before the 'Properties' function of the script is processed.
+ This means you can access parameters from within the 'Properties' function!
+
+ .PARAMETER properties
+ A hashtable containing properties to be passed into the current build script.
+ These properties will override matching properties that are found in the 'Properties' function of the script.
+
+ .PARAMETER initialization
+ Parameter description
+
+ .PARAMETER nologo
+ Do not display the startup banner and copyright message.
+
+ .PARAMETER detailedDocs
+ Prints a more descriptive list of tasks and their descriptions.
+
+ .PARAMETER notr
+ Do not display the time report.
+
+ .EXAMPLE
+ Invoke-psake
+
+ Runs the 'default' task in the '.build.ps1' build script
+
+ .EXAMPLE
+ Invoke-psake '.\build.ps1' Tests,Package
+
+ Runs the 'Tests' and 'Package' tasks in the '.build.ps1' build script
+
+ .EXAMPLE
+ Invoke-psake Tests
+
+ This example will run the 'Tests' tasks in the 'psakefile.ps1' build script. The 'psakefile.ps1' is assumed to be in the current directory.
+
+ .EXAMPLE
+ Invoke-psake 'Tests, Package'
+
+ This example will run the 'Tests' and 'Package' tasks in the 'psakefile.ps1' build script. The 'psakefile.ps1' is assumed to be in the current directory.
+
+ .EXAMPLE
+ Invoke-psake .\build.ps1 -docs
+
+ Prints a report of all the tasks and their dependencies and descriptions and then exits
+
+ .EXAMPLE
+ Invoke-psake .\parameters.ps1 -parameters @{"p1"="v1";"p2"="v2"}
+
+ Runs the build script called 'parameters.ps1' and passes in parameters 'p1' and 'p2' with values 'v1' and 'v2'
+
+ Here's the .\parameters.ps1 build script:
+
+ properties {
+ $my_property = $p1 + $p2
+ }
+
+ task default -depends TestParams
+
+ task TestParams {
+ Assert ($my_property -ne $null) '$my_property should not be null'
+ }
+
+ Notice how you can refer to the parameters that were passed into the script from within the "properties" function.
+ The value of the $p1 variable should be the string "v1" and the value of the $p2 variable should be "v2".
+
+ .EXAMPLE
+ Invoke-psake .\properties.ps1 -properties @{"x"="1";"y"="2"}
+
+ Runs the build script called 'properties.ps1' and passes in parameters 'x' and 'y' with values '1' and '2'
+
+ This feature allows you to override existing properties in your build script.
+
+ Here's the .\properties.ps1 build script:
+
+ properties {
+ $x = $null
+ $y = $null
+ $z = $null
+ }
+
+ task default -depends TestProperties
+
+ task TestProperties {
+ Assert ($x -ne $null) "x should not be null"
+ Assert ($y -ne $null) "y should not be null"
+ Assert ($z -eq $null) "z should be null"
+ }
+
+ .NOTES
+ ---- Exceptions ----
+
+ If there is an exception thrown during the running of a build script psake will set the '$psake.build_success' variable to $false.
+ To detect failue outside PowerShell (for example by build server), finish PowerShell process with non-zero exit code when '$psake.build_success' is $false.
+ Calling psake from 'cmd.exe' with 'psake.cmd' will give you that behaviour.
+
+ ---- $psake variable ----
+
+ When the psake module is loaded a variable called $psake is created which is a hashtable
+ containing some variables:
+
+ $psake.version # contains the current version of psake
+ $psake.context # holds onto the current state of all variables
+ $psake.run_by_psake_build_tester # indicates that build is being run by psake-BuildTester
+ $psake.config_default # contains default configuration
+ # can be overriden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script
+ $psake.build_success # indicates that the current build was successful
+ $psake.build_script_file # contains a System.IO.FileInfo for the current build script
+ $psake.build_script_dir # contains the fully qualified path to the current build script
+ $psake.error_message # contains the error message which caused the script to fail
+
+ You should see the following when you display the contents of the $psake variable right after importing psake
+
+ PS projects:\psake\> Import-Module .\psake.psm1
+ PS projects:\psake\> $psake
+
+ Name Value
+ ---- -----
+ run_by_psake_build_tester False
+ version 4.2
+ build_success False
+ build_script_file
+ build_script_dir
+ config_default @{framework=3.5; ...
+ context {}
+ error_message
+
+ After a build is executed the following $psake values are updated: build_script_file, build_script_dir, build_success
+
+ PS projects:\psake\> Invoke-psake .\examples\psakefile.ps1
+ Executing task: Clean
+ Executed Clean!
+ Executing task: Compile
+ Executed Compile!
+ Executing task: Test
+ Executed Test!
+
+ Build Succeeded!
+
+ ----------------------------------------------------------------------
+ Build Time Report
+ ----------------------------------------------------------------------
+ Name Duration
+ ---- --------
+ Clean 00:00:00.0798486
+ Compile 00:00:00.0869948
+ Test 00:00:00.0958225
+ Total: 00:00:00.2712414
+
+ PS projects:\psake\> $psake
+
+ Name Value
+ ---- -----
+ build_script_file YOUR_PATH\examples\psakefile.ps1
+ run_by_psake_build_tester False
+ build_script_dir YOUR_PATH\examples
+ context {}
+ version 4.2
+ build_success True
+ config_default @{framework=3.5; ...
+ error_message
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ .LINK
+ Properties
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Position = 0, Mandatory = $false)]
+ [string]$buildFile,
+
+ [Parameter(Position = 1, Mandatory = $false)]
+ [string[]]$taskList = @(),
+
+ [Parameter(Position = 2, Mandatory = $false)]
+ [string]$framework,
+
+ [Parameter(Position = 3, Mandatory = $false)]
+ [switch]$docs = $false,
+
+ [Parameter(Position = 4, Mandatory = $false)]
+ [hashtable]$parameters = @{},
+
+ [Parameter(Position = 5, Mandatory = $false)]
+ [hashtable]$properties = @{},
+
+ [Parameter(Position = 6, Mandatory = $false)]
+ [alias("init")]
+ [scriptblock]$initialization = {},
+
+ [Parameter(Position = 7, Mandatory = $false)]
+ [switch]$nologo,
+
+ [Parameter(Position = 8, Mandatory = $false)]
+ [switch]$detailedDocs,
+
+ [Parameter(Position = 9, Mandatory = $false)]
+ [switch]$notr # disable time report
+ )
+
+ try {
+ if (-not $nologo) {
+ "psake version {0}$($script:nl)Copyright (c) 2010-2018 James Kovacs & Contributors$($script:nl)" -f $psake.version
+ }
+ if (!$buildFile) {
+ $buildFile = Get-DefaultBuildFile
+ }
+ elseif (!(Test-Path $buildFile -PathType Leaf) -and ($null -ne (Get-DefaultBuildFile -UseDefaultIfNoneExist $false))) {
+ # If the default file exists and the given "buildfile" isn't found assume that the given
+ # $buildFile is actually the target Tasks to execute in the $config.buildFileName script.
+ $taskList = $buildFile.Split(', ')
+ $buildFile = Get-DefaultBuildFile
+ }
+
+ $psake.error_message = $null
+
+ ExecuteInBuildFileScope $buildFile $MyInvocation.MyCommand.Module {
+ param($currentContext, $module)
+
+ $stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
+
+ if ($docs -or $detailedDocs) {
+ WriteDocumentation($detailedDocs)
+ return
+ }
+
+ try {
+ foreach ($key in $parameters.keys) {
+ if (test-path "variable:\$key") {
+ set-item -path "variable:\$key" -value $parameters.$key -WhatIf:$false -Confirm:$false | out-null
+ } else {
+ new-item -path "variable:\$key" -value $parameters.$key -WhatIf:$false -Confirm:$false | out-null
+ }
+ }
+ } catch {
+ WriteColoredOutput "Parameter '$key' is null" -foregroundcolor Red
+ throw
+ }
+
+ # The initial dot (.) indicates that variables initialized/modified in the propertyBlock are available in the parent scope.
+ while ($currentContext.properties.Count -gt 0) {
+ $propertyBlock = $currentContext.properties.Pop()
+ . $propertyBlock
+ }
+
+ foreach ($key in $properties.keys) {
+ if (test-path "variable:\$key") {
+ set-item -path "variable:\$key" -value $properties.$key -WhatIf:$false -Confirm:$false | out-null
+ }
+ }
+
+ # Simple dot sourcing will not work. We have to force the script block into our
+ # module's scope in order to initialize variables properly.
+ . $module $initialization
+
+ # Execute the list of tasks or the default task
+ if ($taskList) {
+ foreach ($task in $taskList) {
+ invoke-task $task
+ }
+ } elseif ($currentContext.tasks.default) {
+ invoke-task default
+ } else {
+ throw $msgs.error_no_default_task
+ }
+
+ $successMsg = $msgs.psake_success -f $buildFile
+ WriteColoredOutput ("$($script:nl)${successMsg}$($script:nl)") -foregroundcolor Green
+
+ $stopwatch.Stop()
+ if (-not $notr) {
+ WriteTaskTimeSummary $stopwatch.Elapsed
+ }
+ }
+
+ $psake.build_success = $true
+
+ } catch {
+ $psake.build_success = $false
+ $psake.error_message = FormatErrorMessage $_
+
+ # if we are running in a nested scope (i.e. running a psake script from a psake script) then we need to re-throw the exception
+ # so that the parent script will fail otherwise the parent script will report a successful build
+ $inNestedScope = ($psake.context.count -gt 1)
+ if ( $inNestedScope ) {
+ throw $_
+ } else {
+ if (!$psake.run_by_psake_build_tester) {
+ WriteColoredOutput $psake.error_message -foregroundcolor Red
+ }
+ }
+ } finally {
+ CleanupEnvironment
+ }
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Properties.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Properties.ps1
new file mode 100644
index 0000000..0d4776b
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Properties.ps1
@@ -0,0 +1,61 @@
+function Properties {
+ <#
+ .SYNOPSIS
+ Define a scriptblock that contains assignments to variables that will be available to all tasks in the build script
+
+ .DESCRIPTION
+ A build script may declare a "Properies" function which allows you to define variables that will be available to all the "Task" functions in the build script.
+
+ .PARAMETER properties
+ The script block containing all the variable assignment statements
+
+ .EXAMPLE
+ A sample build script is shown below:
+
+ Properties {
+ $build_dir = "c:\build"
+ $connection_string = "datasource=localhost;initial catalog=northwind;integrated security=sspi"
+ }
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ Note: You can have more than one "Properties" function defined in the build script.
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [scriptblock]$properties
+ )
+
+ $psake.context.Peek().properties.Push($properties)
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Task.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Task.ps1
new file mode 100644
index 0000000..8a31084
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/Task.ps1
@@ -0,0 +1,331 @@
+function Task {
+ <#
+ .SYNOPSIS
+ Defines a build task to be executed by psake
+
+ .DESCRIPTION
+ This function creates a 'task' object that will be used by the psake engine to execute a build task.
+ Note: There must be at least one task called 'default' in the build script
+
+ .PARAMETER name
+ The name of the task
+
+ .PARAMETER action
+ A scriptblock containing the statements to execute for the task.
+
+ .PARAMETER preaction
+ A scriptblock to be executed before the 'Action' scriptblock.
+ Note: This parameter is ignored if the 'Action' scriptblock is not defined.
+
+ .PARAMETER postaction
+ A scriptblock to be executed after the 'Action' scriptblock.
+ Note: This parameter is ignored if the 'Action' scriptblock is not defined.
+
+ .PARAMETER precondition
+ A scriptblock that is executed to determine if the task is executed or skipped.
+ This scriptblock should return $true or $false
+
+ .PARAMETER postcondition
+ A scriptblock that is executed to determine if the task completed its job correctly.
+ An exception is thrown if the scriptblock returns $false.
+
+ .PARAMETER continueOnError
+ If this switch parameter is set then the task will not cause the build to fail when an exception is thrown by the task
+
+ .PARAMETER depends
+ An array of task names that this task depends on.
+ These tasks will be executed before the current task is executed.
+
+ .PARAMETER requiredVariables
+ An array of names of variables that must be set to run this task.
+
+ .PARAMETER description
+ A description of the task.
+
+ .PARAMETER alias
+ An alternate name for the task.
+
+ .PARAMETER FromModule
+ Load in the task from the specified PowerShell module.
+
+ .PARAMETER requiredVersion
+ The specific version of a module to load the task from
+
+ .PARAMETER minimumVersion
+ The minimum (inclusive) version of the PowerShell module to load in the task from.
+
+ .PARAMETER maximumVersion
+ The maximum (inclusive) version of the PowerShell module to load in the task from.
+
+ .PARAMETER lessThanVersion
+ The version of the PowerShell module to load in the task from that should not be met or exceeded. eg -lessThanVersion 2.0.0 will reject anything 2.0.0 or higher, allowing any module in the 1.x.x series.
+
+ .EXAMPLE
+ A sample build script is shown below:
+
+ Task default -Depends Test
+
+ Task Test -Depends Compile, Clean {
+ "This is a test"
+ }
+
+ Task Compile -Depends Clean {
+ "Compile"
+ }
+
+ Task Clean {
+ "Clean"
+ }
+
+ The 'default' task is required and should not contain an 'Action' parameter.
+ It uses the 'Depends' parameter to specify that 'Test' is a dependency
+
+ The 'Test' task uses the 'Depends' parameter to specify that 'Compile' and 'Clean' are dependencies
+ The 'Compile' task depends on the 'Clean' task.
+
+ Note:
+ The 'Action' parameter is defaulted to the script block following the 'Clean' task.
+
+ An equivalent 'Test' task is shown below:
+
+ Task Test -Depends Compile, Clean -Action {
+ $testMessage
+ }
+
+ The output for the above sample build script is shown below:
+
+ Executing task, Clean...
+ Clean
+ Executing task, Compile...
+ Compile
+ Executing task, Test...
+ This is a test
+
+ Build Succeeded!
+
+ ----------------------------------------------------------------------
+ Build Time Report
+ ----------------------------------------------------------------------
+ Name Duration
+ ---- --------
+ Clean 00:00:00.0065614
+ Compile 00:00:00.0133268
+ Test 00:00:00.0225964
+ Total: 00:00:00.0782496
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding(DefaultParameterSetName = 'Normal')]
+ param(
+ [Parameter(Mandatory = $true, Position = 0)]
+ [string]$name,
+
+ [Parameter(Position = 1)]
+ [scriptblock]$action = $null,
+
+ [Parameter(Position = 2)]
+ [scriptblock]$preaction = $null,
+
+ [Parameter(Position = 3)]
+ [scriptblock]$postaction = $null,
+
+ [Parameter(Position = 4)]
+ [scriptblock]$precondition = {$true},
+
+ [Parameter(Position = 5)]
+ [scriptblock]$postcondition = {$true},
+
+ [Parameter(Position = 6)]
+ [switch]$continueOnError,
+
+ [ValidateNotNull()]
+ [Parameter(Position = 7)]
+ [string[]]$depends = @(),
+
+ [ValidateNotNull()]
+ [Parameter(Position = 8)]
+ [string[]]$requiredVariables = @(),
+
+ [Parameter(Position = 9)]
+ [string]$description = $null,
+
+ [Parameter(Position = 10)]
+ [string]$alias = $null,
+
+ [parameter(Mandatory = $true, ParameterSetName = 'SharedTask', Position = 11)]
+ [ValidateNotNullOrEmpty()]
+ [string]$FromModule,
+
+ [Alias('Version')]
+ [parameter(ParameterSetName = 'SharedTask', Position = 12)]
+ [string]$requiredVersion,
+
+ [parameter(ParameterSetName = 'SharedTask', Position = 13)]
+ [string]$minimumVersion,
+
+ [parameter(ParameterSetName = 'SharedTask', Position = 14)]
+ [string]$maximumVersion,
+
+ [parameter(ParameterSetName = 'SharedTask', Position = 15)]
+ [string]$lessThanVersion
+ )
+
+ function CreateTask {
+ @{
+ Name = $Name
+ DependsOn = $depends
+ PreAction = $preaction
+ Action = $action
+ PostAction = $postaction
+ Precondition = $precondition
+ Postcondition = $postcondition
+ ContinueOnError = $continueOnError
+ Description = $description
+ Duration = [System.TimeSpan]::Zero
+ RequiredVariables = $requiredVariables
+ Alias = $alias
+ Success = $true # let's be optimistic
+ ErrorMessage = $null
+ ErrorDetail = $null
+ ErrorFormatted = $null
+ }
+ }
+
+ # Default tasks have no action
+ if ($name -eq 'default') {
+ Assert (!$action) ($msgs.error_shared_task_cannot_have_action)
+ }
+
+ # Shared tasks have no action
+ if ($PSCmdlet.ParameterSetName -eq 'SharedTask') {
+ Assert (!$action) ($msgs.error_shared_task_cannot_have_action -f $Name, $FromModule)
+ }
+
+ $currentContext = $psake.context.Peek()
+
+ # Dot source the shared task module to load in its tasks
+ if ($PSCmdlet.ParameterSetName -eq 'SharedTask') {
+ $testModuleParams = @{
+ minimumVersion = $minimumVersion
+ maximumVersion = $maximumVersion
+ lessThanVersion = $lessThanVersion
+ }
+
+ if(![string]::IsNullOrEmpty($requiredVersion)){
+ $testModuleParams.minimumVersion = $requiredVersion
+ $testModuleParams.maximumVersion = $requiredVersion
+ }
+
+ if ($taskModule = Get-Module -Name $FromModule) {
+ # Use the task module that is already loaded into the session
+ $testModuleParams.currentVersion = $taskModule.Version
+ $taskModule = Where-Object -InputObject $taskModule -FilterScript {Test-ModuleVersion @testModuleParams}
+ } else {
+ # Find the module
+ $getModuleParams = @{
+ ListAvailable = $true
+ Name = $FromModule
+ ErrorAction = 'Ignore'
+ Verbose = $false
+ }
+ $taskModule = Get-Module @getModuleParams |
+ Where-Object -FilterScript {Test-ModuleVersion -currentVersion $_.Version @testModuleParams} |
+ Sort-Object -Property Version -Descending |
+ Select-Object -First 1
+ }
+
+ # This task references a task from a module
+ # This reference task "could" include extra data about the task such as
+ # additional dependOn, aliase, etc.
+ # Store this task to the side so after we load the real task, we can combine
+ # this extra data if nesessary
+ $referenceTask = CreateTask
+ Assert (-not $psake.ReferenceTasks.ContainsKey($referenceTask.Name)) ($msgs.error_duplicate_task_name -f $referenceTask.Name)
+ $referenceTaskKey = $referenceTask.Name.ToLower()
+ $psake.ReferenceTasks.Add($referenceTaskKey, $referenceTask)
+
+ # Load in tasks from shared module into staging area
+ Assert ($null -ne $taskModule) ($msgs.error_unknown_module -f $FromModule)
+ $psakeFilePath = Join-Path -Path $taskModule.ModuleBase -ChildPath 'psakeFile.ps1'
+ if (-not $psake.LoadedTaskModules.ContainsKey($psakeFilePath)) {
+ Write-Debug -Message "Loading tasks from task module [$psakeFilePath]"
+ . $psakeFilePath
+ $psake.LoadedTaskModules.Add($psakeFilePath, $null)
+ }
+ } else {
+ # Create new task object
+ $newTask = CreateTask
+ $taskKey = $newTask.Name.ToLower()
+
+ # If this task was referenced from a parent build script
+ # check to see if that reference task has extra data to add
+ $refTask = $psake.ReferenceTasks.$taskKey
+ if ($refTask) {
+
+ # Override the preaction
+ if ($refTask.PreAction -ne $newTask.PreAction) {
+ $newTask.PreAction = $refTask.PreAction
+ }
+
+ # Override the postaction
+ if ($refTask.PostAction -ne $newTask.PostAction) {
+ $newTask.PostAction = $refTask.PostAction
+ }
+
+ # Override the precondition
+ if ($refTask.PreCondition -ne $newTask.PreCondition) {
+ $newTask.PreCondition = $refTask.PreCondition
+ }
+
+ # Override the postcondition
+ if ($refTask.PostCondition -ne $newTask.PostCondition) {
+ $newTask.PostCondition = $refTask.PostCondition
+ }
+
+ # Override the continueOnError
+ if ($refTask.ContinueOnError) {
+ $newTask.ContinueOnError = $refTask.ContinueOnError
+ }
+
+ # Override the depends
+ if ($refTask.DependsOn.Count -gt 0 -and (Compare-Object -ReferenceObject $refTask.DependsOn -DifferenceObject $newTask.DependsOn)) {
+ $newTask.DependsOn = $refTask.DependsOn
+ }
+
+ # Override the requiredVariables
+ if ($refTask.RequiredVariables.Count -gt 0 -and (Compare-Object -ReferenceObject.RequiredVariables -DifferenceObject $newTask.RequiredVariables)) {
+ $newTask.RequiredVariables += $refTask.RequiredVariables
+ }
+ }
+
+ # Add the task to the context
+ Assert (-not $currentContext.tasks.ContainsKey($taskKey)) ($msgs.error_duplicate_task_name -f $taskKey)
+ Write-Debug "Adding task [$taskKey)]"
+ $currentContext.tasks.$taskKey = $newTask
+
+ if ($alias) {
+ $aliasKey = $alias.ToLower()
+ Assert (-not $currentContext.aliases.ContainsKey($aliasKey)) ($msgs.error_duplicate_alias_name -f $alias)
+ $currentContext.aliases.$aliasKey = $newTask
+ }
+ }
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/TaskSetup.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/TaskSetup.ps1
new file mode 100644
index 0000000..50da9f2
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/TaskSetup.ps1
@@ -0,0 +1,102 @@
+function TaskSetup {
+ <#
+ .SYNOPSIS
+ Adds a scriptblock that will be executed before each task
+
+ .DESCRIPTION
+ This function will accept a scriptblock that will be executed before each task in the build script.
+
+ The scriptblock accepts an optional parameter which describes the Task being setup.
+
+ .PARAMETER setup
+ A scriptblock to execute
+
+ .EXAMPLE
+ A sample build script is shown below:
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ TaskSetup {
+ "Running 'TaskSetup' for task $context.Peek().currentTaskName"
+ }
+
+ The script above produces the following output:
+
+ Running 'TaskSetup' for task Clean
+ Executing task, Clean...
+ Running 'TaskSetup' for task Compile
+ Executing task, Compile...
+ Running 'TaskSetup' for task Test
+ Executing task, Test...
+
+ Build Succeeded
+
+ .EXAMPLE
+ A sample build script showing access to the Task context is shown below:
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ TaskSetup {
+ param($task)
+
+ "Running 'TaskSetup' for task $($task.Name)"
+ }
+
+ The script above produces the following output:
+
+ Running 'TaskSetup' for task Clean
+ Executing task, Clean...
+ Running 'TaskSetup' for task Compile
+ Executing task, Compile...
+ Running 'TaskSetup' for task Test
+ Executing task, Test...
+
+ Build Succeeded
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [scriptblock]$setup
+ )
+
+ $psake.context.Peek().taskSetupScriptBlock = $setup
+}
diff --git a/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/TaskTearDown.ps1 b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/TaskTearDown.ps1
new file mode 100644
index 0000000..b45a589
--- /dev/null
+++ b/src/Newbe.Mahua.Plugin.Agent/buildScripts/psake/4.8.0/public/TaskTearDown.ps1
@@ -0,0 +1,107 @@
+
+function TaskTearDown {
+ <#
+ .SYNOPSIS
+ Adds a scriptblock to the build that will be executed after each task
+
+ .DESCRIPTION
+ This function will accept a scriptblock that will be executed after each task in the build script.
+
+ The scriptblock accepts an optional parameter which describes the Task being torn down.
+
+ .PARAMETER teardown
+ A scriptblock to execute
+
+ .EXAMPLE
+ A sample build script is shown below:
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ TaskTearDown {
+ "Running 'TaskTearDown' for task $context.Peek().currentTaskName"
+ }
+
+ The script above produces the following output:
+
+ Executing task, Clean...
+ Running 'TaskTearDown' for task Clean
+ Executing task, Compile...
+ Running 'TaskTearDown' for task Compile
+ Executing task, Test...
+ Running 'TaskTearDown' for task Test
+
+ Build Succeeded
+
+ .EXAMPLE
+ A sample build script demonstrating access to the task context is shown below:
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ TaskTearDown {
+ param($task)
+
+ if ($task.Success) {
+ "Running 'TaskTearDown' for task $($task.Name) - success!"
+ } else {
+ "Running 'TaskTearDown' for task $($task.Name) - failed: $($task.ErrorMessage)"
+ }
+ }
+
+ The script above produces the following output:
+
+ Executing task, Clean...
+ Running 'TaskTearDown' for task Clean - success!
+ Executing task, Compile...
+ Running 'TaskTearDown' for task Compile - success!
+ Executing task, Test...
+ Running 'TaskTearDown' for task Test - success!
+
+ Build Succeeded
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [scriptblock]$teardown
+ )
+
+ $psake.context.Peek().taskTearDownScriptBlock = $teardown
+}
diff --git a/src/build.bat b/src/build.bat
index 03646e3..70e8e84 100644
--- a/src/build.bat
+++ b/src/build.bat
@@ -1,4 +1,4 @@
@echo off
%~d0
cd %~dp0
-powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "& {if(-not (Get-Module -ListAvailable VSSetup)){Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser;Install-Module -Name VSSetup -Scope CurrentUser -Force;}if(-not (Get-Module -ListAvailable psake)){Install-Module -Name psake -RequiredVersion 4.7.4 -Scope CurrentUser -Force;} invoke-psake .\build.ps1 %*; if ($global:lastexitcode -and $global:lastexitcode -ne 0) {write-host "ERROR CODE: $global:lastexitcode" -fore RED; exit $global:lastexitcode} }"
+powershell -NoProfile -NonInteractive -ExecutionPolicy unrestricted -Command "& {import-module .\buildScripts\psake\4.8.0\psake.psd1;import-module .\buildScripts\VSSetup\2.2.5\VSSetup.psd1;invoke-psake .\build.ps1 %*; if ($global:lastexitcode -and $global:lastexitcode -ne 0) {write-host "ERROR CODE: $global:lastexitcode" -fore RED; exit $global:lastexitcode} }"
\ No newline at end of file
diff --git a/src/build.ps1 b/src/build.ps1
index d24e4c7..30f63e4 100644
--- a/src/build.ps1
+++ b/src/build.ps1
@@ -1,4 +1,4 @@
-Framework 4.6
+Framework "4.6x86"
properties {
$rootNow = Resolve-Path .
$deployMode = "Debug"
diff --git a/src/buildScripts/VSSetup/2.2.5/.signature.p7s b/src/buildScripts/VSSetup/2.2.5/.signature.p7s
new file mode 100644
index 0000000..d643662
Binary files /dev/null and b/src/buildScripts/VSSetup/2.2.5/.signature.p7s differ
diff --git a/src/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.Configuration.Interop.dll b/src/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.Configuration.Interop.dll
new file mode 100644
index 0000000..24277b0
Binary files /dev/null and b/src/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.Configuration.Interop.dll differ
diff --git a/src/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.PowerShell.dll b/src/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.PowerShell.dll
new file mode 100644
index 0000000..c7a85ff
Binary files /dev/null and b/src/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.PowerShell.dll differ
diff --git a/src/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.PowerShell.dll-Help.xml b/src/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.PowerShell.dll-Help.xml
new file mode 100644
index 0000000..73f5c2b
--- /dev/null
+++ b/src/buildScripts/VSSetup/2.2.5/Microsoft.VisualStudio.Setup.PowerShell.dll-Help.xml
@@ -0,0 +1,379 @@
+
+
+
+
+ Get-VSSetupInstance
+ Get
+ VSSetupInstance
+
+ Enumerates instances of Visual Studio and related products.
+
+
+
+ Enumerates instances of Visual Studio and related products. By default, instances with fatal errors are not returned by you can pass `-All` to enumerate them as well.
+
+
+
+ Get-VSSetupInstance
+
+ All
+
+ Enumerate all instances of Visual Studio - even those with fatal errors.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Prerelease
+
+ Also show prereleases / previews. By default, only releases are shown.
+
+
+ SwitchParameter
+
+
+ False
+
+
+
+ Get-VSSetupInstance
+
+ LiteralPath
+
+ The path to the product installation directory. Wildcards are not supported.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+
+ Get-VSSetupInstance
+
+ Path
+
+ The path to the product installation directory. Wildcards are supported.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+
+
+
+ All
+
+ Enumerate all instances of Visual Studio - even those with fatal errors.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ LiteralPath
+
+ The path to the product installation directory. Wildcards are not supported.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+ Path
+
+ The path to the product installation directory. Wildcards are supported.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+ Prerelease
+
+ Also show prereleases / previews. By default, only releases are shown.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+
+
+
+ System.String[]
+
+
+ One or more paths to product installation directories.
+
+
+
+
+
+
+ Microsoft.VisualStudio.Setup.Instance
+
+
+ Information about each instance enumerated.
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Example 1 --------------------------
+ PS C:\> Get-VSSetupInstance -All
+
+ Enumerates all instances of Visual Studio and related products even if a fatal error was raised during the last operation.
+
+
+
+ -------------------------- Example 2 --------------------------
+ PS C:\> Get-VSSetupInstance 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community'
+
+ Gets the instance for the product installed to the given directory.
+
+
+
+
+
+ Online Version:
+ https://github.com/Microsoft/vssetup.powershell/raw/master/docs/VSSetup/Get-VSSetupInstance.md
+
+
+
+
+
+ Select-VSSetupInstance
+ Select
+ VSSetupInstance
+
+ Selects instances of Visual Studio and related products based on criteria.
+
+
+
+ You can specify zero or more products (by default, Visual Studio Community, Professional, and Enterprise are selected) to find, along with zero or more workloads that all are required by any instances enumerated. Additionally, you can specify a version range to limit the results or request the latest instance. All criteria are combined to return the best instance or instances for your needs.
+
+
+
+ Select-VSSetupInstance
+
+ Instance
+
+ One or more instances from which to select.
+
+ Instance[]
+
+ Instance[]
+
+
+ None
+
+
+ Latest
+
+ Select the most recently installed instance with the highest version (within the optional `-Version` range).
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Product
+
+ One or more products to select. Wildcards are supported.
+
+ String[]
+
+ String[]
+
+
+ Microsoft.VisualStudio.Product.Community, Microsoft.VisualStudio.Product.Professional, Microsoft.VisualStudio.Product.Enterprise
+
+
+ Require
+
+ One or more workloads or components to select. All requirements specified must be met. Wildcards are not supported.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+ RequireAny
+
+ Change the behavior of -Require such that any one or more requirements specified must be met.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Version
+
+ A version range to limit results. A single version like '15.0' is equivalent to '[15.0,)', which means versions 15.0 and newer are in range. You can also specify versions like '[15.0,16.0)' to limit results to Visual Studio 2017 only (15.x).
+
+ String
+
+ String
+
+
+ None
+
+
+
+
+
+ Instance
+
+ One or more instances from which to select.
+
+ Instance[]
+
+ Instance[]
+
+
+ None
+
+
+ Latest
+
+ Select the most recently installed instance with the highest version (within the optional `-Version` range).
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ Product
+
+ One or more products to select. Wildcards are supported.
+
+ String[]
+
+ String[]
+
+
+ Microsoft.VisualStudio.Product.Community, Microsoft.VisualStudio.Product.Professional, Microsoft.VisualStudio.Product.Enterprise
+
+
+ Require
+
+ One or more workloads or components to select. All requirements specified must be met. Wildcards are not supported.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+ RequireAny
+
+ Change the behavior of -Require such that any one or more requirements specified must be met.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ Version
+
+ A version range to limit results. A single version like '15.0' is equivalent to '[15.0,)', which means versions 15.0 and newer are in range. You can also specify versions like '[15.0,16.0)' to limit results to Visual Studio 2017 only (15.x).
+
+ String
+
+ String
+
+
+ None
+
+
+
+
+
+ Microsoft.VisualStudio.Setup.Instance[]
+
+
+ One or more instances from which to select.
+
+
+
+
+
+
+ Microsoft.VisualStudio.Setup.Instance
+
+
+ Zero or more instances that met specified criteria.
+
+
+
+
+
+
+
+
+
+
+ -------------------------- Example 1 --------------------------
+ PS C:\> Get-VSSetupInstance | Select-VSSetupInstance -Latest
+
+ Select the most-recently installed instance of the highest version of Visual Studio Community, Professional, or Enterprise installed.
+
+
+
+ -------------------------- Example 2 --------------------------
+ PS C:\> Get-VSSetupInstance | Select-VSSetupInstance -Product * -Require 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64'
+
+ Selects any product with the native Visual C++ compilers installed.
+
+
+
+
+
+ Online Version:
+ https://github.com/Microsoft/vssetup.powershell/raw/master/docs/VSSetup/Select-VSSetupInstance.md
+
+
+
+
\ No newline at end of file
diff --git a/src/buildScripts/VSSetup/2.2.5/PSGetModuleInfo.xml b/src/buildScripts/VSSetup/2.2.5/PSGetModuleInfo.xml
new file mode 100644
index 0000000..d6a486a
Binary files /dev/null and b/src/buildScripts/VSSetup/2.2.5/PSGetModuleInfo.xml differ
diff --git a/src/buildScripts/VSSetup/2.2.5/VSSetup.psd1 b/src/buildScripts/VSSetup/2.2.5/VSSetup.psd1
new file mode 100644
index 0000000..f9dcece
--- /dev/null
+++ b/src/buildScripts/VSSetup/2.2.5/VSSetup.psd1
@@ -0,0 +1,225 @@
+# Copyright (C) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT license. See LICENSE.txt in the project root for license information.
+@{
+GUID = '440e8fb1-19c4-4d39-8f75-37424bc4265a'
+Author = 'Microsoft Corporation'
+CompanyName = 'Microsoft Corporation'
+Copyright = 'Copyright (C) Microsoft Corporation. All rights reserved.'
+Description = 'Visual Studio Setup PowerShell Module'
+ModuleVersion = '2.2.5'
+PowerShellVersion = '2.0'
+CLRVersion = '2.0'
+ModuleToProcess = 'VSSetup.psm1'
+NestedModules = 'Microsoft.VisualStudio.Setup.PowerShell.dll'
+RequiredAssemblies = @(
+ 'Microsoft.VisualStudio.Setup.PowerShell.dll',
+ 'Microsoft.VisualStudio.Setup.Configuration.Interop.dll'
+)
+CmdletsToExport = @(
+ 'Get-VSSetupInstance'
+ 'Select-VSSetupInstance'
+)
+TypesToProcess = 'VSSetup.types.ps1xml'
+PrivateData = @{
+ PSData = @{
+ ProjectUri = 'https://github.com/Microsoft/vssetup.powershell'
+ LicenseUri = 'https://github.com/Microsoft/vssetup.powershell/raw/4eb2842ded/LICENSE.txt'
+ Prerelease = ''
+ }
+}
+}
+
+# SIG # Begin signature block
+# MIIj6QYJKoZIhvcNAQcCoIIj2j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ature block
diff --git a/src/buildScripts/VSSetup/2.2.5/VSSetup.psm1 b/src/buildScripts/VSSetup/2.2.5/VSSetup.psm1
new file mode 100644
index 0000000..0be88e6
--- /dev/null
+++ b/src/buildScripts/VSSetup/2.2.5/VSSetup.psm1
@@ -0,0 +1,203 @@
+# Copyright (C) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT license. See LICENSE.txt in the project root for license information.
+
+$ExecutionContext.SessionState.PSVariable.Set(
+ (New-Object 'Microsoft.VisualStudio.Setup.PowerShell.VersionTable')
+)
+
+Export-ModuleMember -Cmdlet * -Variable VSSetupVersionTable
+
+# SIG # Begin signature block
+# MIIj7AYJKoZIhvcNAQcCoIIj3TCCI9kCAQExDzANBglghkgBZQMEAgEFADB5Bgor
+# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
+# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBRpWOUSMrGsv71
+# RYVhmjuoascdEN5KPsaasJJu+hyc16CCDYMwggYBMIID6aADAgECAhMzAAAAxOmJ
+# +HqBUOn/AAAAAADEMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
+# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
+# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
+# bmcgUENBIDIwMTEwHhcNMTcwODExMjAyMDI0WhcNMTgwODExMjAyMDI0WjB0MQsw
+# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u
+# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy
+# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK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7+yYbEPmwTIlL9dhDi+hpTciQRzGX
+# 7f/ZFV9Ej8OuCNFoOXmyK7yyXnvspeuEeA2w9tAN9s76LVe54TIxfFRN/omwHUUC
+# +olxQ1ujUBEPp43iEhXSXiwzSGaKUWTRuihFrByuLI1tNNJCzSBgSMwB4M2LGUqH
+# 1ZTd7qM96KPytyjHBbRg22S8IcaPh8w705g2WJcy/VdKz15cNNcFKd2tSQNaPasB
+# 96NdkRho2xkc0MCDogNqSAb2tVprq/7C7wvXObvPoZ3j3BI+DujJI4wb2dnuiT7o
+# RF/O9LJKe7vZ8iNVSeFR497mpSJB6BoPyvpD9td5gZI=
+# SIG # End signature block
diff --git a/src/buildScripts/VSSetup/2.2.5/VSSetup.types.ps1xml b/src/buildScripts/VSSetup/2.2.5/VSSetup.types.ps1xml
new file mode 100644
index 0000000..dfba79d
--- /dev/null
+++ b/src/buildScripts/VSSetup/2.2.5/VSSetup.types.ps1xml
@@ -0,0 +1,261 @@
+
+
+
+ Microsoft.VisualStudio.Setup.Instance
+
+
+ PSStandardMembers
+
+
+ DefaultDisplayProperty
+ InstanceId
+
+
+ DefaultKeyPropertySet
+
+ InstanceId
+
+
+
+ DefaultDisplayPropertySet
+
+ InstanceId
+ DisplayName
+ InstallationVersion
+ InstallationPath
+ InstallDate
+
+
+
+
+
+
+ Microsoft.VisualStudio.Setup.PowerShell.InstanceAdapter
+
+
+
+ Microsoft.VisualStudio.Setup.PackageReference
+
+
+ PSStandardMembers
+
+
+ DefaultDisplayProperty
+ Id
+
+
+ DefaultKeyPropertySet
+
+ UniqueId
+
+
+
+ DefaultDisplayPropertySet
+
+ Id
+ Version
+ Chip
+ Language
+ Branch
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/buildScripts/VSSetup/2.2.5/about_VSSetup.help.txt b/src/buildScripts/VSSetup/2.2.5/about_VSSetup.help.txt
new file mode 100644
index 0000000..864b5c2
--- /dev/null
+++ b/src/buildScripts/VSSetup/2.2.5/about_VSSetup.help.txt
@@ -0,0 +1,46 @@
+TOPIC
+ about_vssetup
+
+SHORT DESCRIPTION
+ Enumerate and select instances of Visual Studio.
+
+LONG DESCRIPTION
+ Visual Studio 2017 introduced a new setup engine capable of installing
+ multiple instances of Visual Studio and other products in the Visual Studio
+ family. This module provides commands to enumerate those instances and
+ select instances that meet your criteria. For example, in a development
+ environment you might have a script that finds an instance of Visual Studio
+ with the the Managed Desktop workload for writing projects targeting the
+ .NET Framework. See below for more examples.
+
+VARIABLES
+ You can get the version of this module or of the query API the module uses
+ from the `$VSSetupVersionTable` variable.
+
+ PS> $VSSetupVersionTable
+
+ Name Value
+ ---- -----
+ QueryVersion 1.15.23.19330
+ ModuleVersion 2.1.2.4917
+
+EXAMPLES
+ You can enumerate all instances - even those with errors that require a
+ repair - with the following command.
+
+ Get-VSSetupInstance -All
+
+ If you want to select all launchable instances of Visual Studio products
+ that have the Managed Desktop workload, use the following command.
+
+ Get-VSSetupInstance | Get-VSSetupInstance `
+ -Require 'Microsoft.VisualStudio.Workload.ManagedDesktop'
+
+ You can also get the instance for an installation directory if you want to
+ discover more about what is installed to that directory.
+
+ Get-VSSetupInstance 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community'
+
+SEE ALSO
+ https://github.com/Microsoft/vssetup.powershell
+
diff --git a/src/buildScripts/VSSetup/2.2.5/tools/LICENSE.txt b/src/buildScripts/VSSetup/2.2.5/tools/LICENSE.txt
new file mode 100644
index 0000000..d4edbae
--- /dev/null
+++ b/src/buildScripts/VSSetup/2.2.5/tools/LICENSE.txt
@@ -0,0 +1,8 @@
+The MIT License (MIT)
+Copyright (C) Microsoft Corporation. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/src/buildScripts/psake/4.8.0/PSGetModuleInfo.xml b/src/buildScripts/psake/4.8.0/PSGetModuleInfo.xml
new file mode 100644
index 0000000..fd22fed
Binary files /dev/null and b/src/buildScripts/psake/4.8.0/PSGetModuleInfo.xml differ
diff --git a/src/buildScripts/psake/4.8.0/en-US/psake.psm1-help.xml.old b/src/buildScripts/psake/4.8.0/en-US/psake.psm1-help.xml.old
new file mode 100644
index 0000000..d67c446
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/en-US/psake.psm1-help.xml.old
@@ -0,0 +1,2265 @@
+
+
+
+
+ Invoke-psake
+
+ Runs a psake build script.
+
+
+
+
+ Invoke
+ psake
+
+
+
+ This function runs a psake build script
+
+
+
+ Invoke-psake
+
+ buildFile
+ String
+
+
+ taskList
+ String[]
+
+
+ framework
+ String
+
+
+ docs
+ SwitchParameter
+
+
+ parameters
+ Hashtable
+
+
+ properties
+ Hashtable
+
+
+ nologo
+ SwitchParameter
+
+
+ notr
+ SwitchParameter
+
+
+
+
+
+ buildFile
+
+ The path to the psake build script to execute
+
+ String
+
+ String
+
+
+ 'psakefile.ps1'
+
+
+ taskList
+
+ A comma-separated list of task names to execute
+
+ String[]
+
+ String[]
+
+
+
+
+
+ framework
+
+ The version of the .NET framework you want to use during build. You can append x86 or x64 to force a specific framework. If not specified, x86 or x64 will be detected based on the bitness of the PowerShell process.
+Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x64', '4.5', '4.5x86', '4.5x64', '4.5.1', '4.5.1x86', '4.5.1x64'
+
+ String
+
+ String
+
+
+ '3.5'
+
+
+ docs
+
+ Prints a list of tasks and their descriptions
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ parameters
+
+ A hashtable containing parameters to be passed into the current build script. These parameters will be processed before the 'Properties' function of the script is processed. This means you can access parameters from within the 'Properties' function!
+
+
+ Hashtable
+
+ Hashtable
+
+
+
+
+
+ properties
+
+ A hashtable containing properties to be passed into the current build script. These properties will override matching properties that are found in the 'Properties' function of the script.
+
+ Hashtable
+
+ Hashtable
+
+
+
+
+
+ nologo
+
+ Do not display the startup banner and copyright message.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ notr
+
+ Do not display the time report.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ---- Exceptions ----
+ If there is an exception thrown during the running of a build script psake will set the '$psake.build_success' variable to $false. To detect failue outside PowerShell (for example by build server), finish PowerShell process with non-zero exit code when '$psake.build_success' is $false. Calling psake from 'cmd.exe' with 'psake.cmd' will give you that behaviour.
+
+
+
+ ---- $psake variable ----
+ When the psake module is loaded a variable called $psake is created which is a hashtable
+containing some variables:
+
+$psake.version # contains the current version of psake
+$psake.context # holds onto the current state of all variables
+$psake.run_by_psake_build_tester # indicates that build is being run by psake-BuildTester
+$psake.config_default # contains default configuration
+ # can be overriden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script
+$psake.build_success # indicates that the current build was successful
+$psake.build_script_file # contains a System.IO.FileInfo for the current build script
+$psake.build_script_dir # contains the fully qualified path to the current build script
+
+You should see the following when you display the contents of the $psake variable right after importing psake
+
+PS projects:\psake> Import-Module .\psake.psm1
+PS projects:\psake> $psake
+
+Name Value
+---- -----
+run_by_psake_build_tester False
+version 4.2
+build_success False
+build_script_file
+build_script_dir
+config_default @{framework=3.5; ...
+context {}
+
+After a build is executed the following $psake values are updated: build_script_file, build_script_dir, build_success
+
+PS projects:\psake> Invoke-psake .\examples\psakefile.ps1
+Executing task: Clean
+Executed Clean!
+Executing task: Compile
+Executed Compile!
+Executing task: Test
+Executed Test!
+
+Build Succeeded!
+
+----------------------------------------------------------------------
+Build Time Report
+----------------------------------------------------------------------
+Name Duration
+---- --------
+Clean 00:00:00.0798486
+Compile 00:00:00.0869948
+Test 00:00:00.0958225
+Total: 00:00:00.2712414
+
+PS projects:\psake> $psake
+
+Name Value
+---- -----
+build_script_file YOUR_PATH\examples\psakefile.ps1
+run_by_psake_build_tester False
+build_script_dir YOUR_PATH\examples
+context {}
+version 4.2
+build_success True
+config_default @{framework=3.5; ...
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ Invoke-psake
+
+ Description
+ -----------
+ Runs the 'default' task in the '.build.ps1' build script
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 2 --------------
+
+ C:\PS>
+
+ Invoke-psake '.\build.ps1' Tests,Package
+
+ Description
+ -----------
+ Runs the 'Tests' and 'Package' tasks in the '.build.ps1' build script
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 3 --------------
+
+ C:\PS>
+
+ Invoke-psake Tests
+
+ Description
+ -----------
+ This example will run the 'Tests' tasks in the 'psakefile.ps1' build script. The 'psakefile.ps1' is assumed to be in the current directory.
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 4 --------------
+
+ C:\PS>
+
+ Invoke-psake 'Tests, Package'
+
+ Description
+ -----------
+ This example will run the 'Tests' and 'Package' tasks in the 'psakefile.ps1' build script. The 'psakefile.ps1' is assumed to be in the current directory.
+ NOTE: The quotes around the list of tasks to execute is required if you want to execute more than 1 task.
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 5 --------------
+
+ C:\PS>
+
+ Invoke-psake .\build.ps1 -docs
+
+ Description
+ -----------
+ Prints a report of all the tasks and their dependencies and descriptions and then exits
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 6 --------------
+
+ C:\PS>
+
+ Invoke-psake .\parameters.ps1 -parameters @{"p1"="v1";"p2"="v2"}
+
+ Description
+ -----------
+ Runs the build script called 'parameters.ps1' and passes in parameters 'p1' and 'p2' with values 'v1' and 'v2'
+ Here's the .\parameters.ps1 build script:
+
+
+ properties {
+ $my_property = $p1 + $p2
+}
+
+task default -depends TestParams
+
+task TestParams {
+ Assert ($my_property -ne $null) '$my_property should not be null'
+}
+
+ Notice how you can refer to the parameters that were passed into the script from within the “properties” function. The value of the $p1 variable should be the string “v1” and the value of the $p2 variable should be “v2”.
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 7 --------------
+
+ C:\PS>
+
+ Invoke-psake .\properties.ps1 -properties @{"x"="1";"y"="2"}
+
+ Description
+ -----------
+ Runs the build script called 'properties.ps1' and passes in parameters 'x' and 'y' with values '1' and '2'
+ This feature allows you to over-ride existing properties in your build script.
+
+ Here's the .\properties.ps1 build script
+ properties {
+ $x = $null
+ $y = $null
+ $z = $null
+}
+
+task default -depends TestProperties
+
+task TestProperties {
+ Assert ($x -ne $null) "x should not be null"
+ Assert ($y -ne $null) "y should not be null"
+ Assert ($z -eq $null) "z should be null"
+}
+
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ Include
+
+
+
+ Properties
+
+
+
+ FormatTaskName
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ TaskTearDown
+
+ Adds a scriptblock to the build that will be executed after each task
+
+
+
+
+
+
+
+
+
+ This function will accept a scriptblock that will be executed after each
+task in the build script.
+
+
+
+ TaskTearDown
+
+ teardown
+ ScriptBlock
+
+
+
+
+
+ teardown
+
+ A scriptblock to execute
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script is shown below:
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+TaskTearDown {
+ "Running 'TaskTearDown' for task $context.Peek().currentTaskName"
+}
+
+ Description
+ -----------
+ The script above produces the following output:
+ Executing task, Clean...
+Running 'TaskTearDown' for task Clean
+Executing task, Compile...
+Running 'TaskTearDown' for task Compile
+Executing task, Test...
+Running 'TaskTearDown' for task Test
+
+Build Succeeded
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ Include
+
+
+
+ Properties
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ TaskSetup
+
+ Adds a scriptblock that will be executed before each task
+
+
+
+
+
+
+
+
+
+ This function will accept a scriptblock that will be executed before each
+task in the build script.
+
+
+
+ TaskSetup
+
+ setup
+ ScriptBlock
+
+
+
+
+
+ setup
+
+ A scriptblock to execute
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script is shown below:
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+TaskSetup {
+ "Running 'TaskSetup' for task $context.Peek().currentTaskName"
+}
+
+ Description
+ -----------
+ The script above produces the following output:
+ Running 'TaskSetup' for task Clean
+Executing task, Clean...
+Running 'TaskSetup' for task Compile
+Executing task, Compile...
+Running 'TaskSetup' for task Test
+Executing task, Test...
+
+Build Succeeded
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ Include
+
+
+
+ Properties
+
+
+
+ Invoke-psake
+
+
+
+ FormatTaskName
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ Framework
+
+ Sets the version of the .NET framework you want to use during build.
+
+
+
+
+
+
+
+
+
+ This function will accept a string containing version of the .NET framework to use during build. Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x64', '4.5', '4.5x86', '4.5x64', '4.5.1', '4.5.1x86', '4.5.1x64'. Default is '3.5*', where x86 or x64 will be detected based on the bitness of the PowerShell process.
+
+
+
+ Framework
+
+ framework
+ string
+
+
+
+
+
+ framework
+
+ Version of the .NET framework to use during build.
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+Framework "4.0"
+
+Task default -depends Compile
+
+Task Compile -depends Clean {
+ msbuild /version
+}
+
+ Description
+ -----------
+ The script above will output detailed version of msbuid v4
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ Include
+
+
+
+ Properties
+
+
+
+ Invoke-psake
+
+
+
+ FormatTaskName
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+
+
+
+
+ FormatTaskName
+
+ This function allows you to change how psake renders the task name during a build.
+
+
+
+
+
+
+
+
+
+ This function takes either a string which represents a format string (formats using the -f format operator see “help about_operators”) or it can accept a script block that has a single parameter that is the name of the task that will be executed.
+
+
+
+ FormatTaskName
+
+ format
+ String or ScriptBlock
+
+
+
+
+
+ format
+
+ A format string or a scriptblock to execute
+
+ String or ScriptBlock
+
+ String or ScriptBlock
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script that uses a format string is shown below:
+
+Task default -depends TaskA, TaskB, TaskC
+
+FormatTaskName "-------- {0} --------"
+
+Task TaskA {
+ "TaskA is executing"
+}
+
+Task TaskB {
+ "TaskB is executing"
+}
+
+Task TaskC {
+ "TaskC is executing"
+}
+
+ Description
+ -----------
+ The script above produces the following output:
+ -------- TaskA --------
+TaskA is executing
+-------- TaskB --------
+TaskB is executing
+-------- TaskC --------
+TaskC is executing
+
+Build Succeeded!
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 2 --------------
+
+ C:\PS>
+
+ A sample build script that uses a ScriptBlock is shown below:
+
+Task default -depends TaskA, TaskB, TaskC
+
+FormatTaskName {
+ param($taskName)
+ write-host "Executing Task: $taskName" -foregroundcolor blue
+}
+
+Task TaskA {
+ "TaskA is executing"
+}
+
+Task TaskB {
+ "TaskB is executing"
+}
+
+Task TaskC {
+ "TaskC is executing"
+}
+
+ Description
+ -----------
+ The preceding example uses the scriptblock parameter to the FormatTaskName function to render each task name in the color blue.
+ Note: the $taskName parameter is arbitrary it could be named anything
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ Include
+
+
+
+ Properties
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+
+ Get-PSakeScriptTasks
+
+ Returns meta data about all the tasks defined in the provided psake script.
+
+
+
+
+ Get
+ PSakeScriptTasks
+
+
+
+ Returns meta data about all the tasks defined in the provided psake script.
+
+
+
+ Get-PSakeScriptTasks
+
+ buildFile
+
+ The path to the psake build script to read the tasks from.
+
+ String
+
+
+ InformationAction
+
+
+
+ ActionPreference
+
+
+ InformationVariable
+
+
+
+ String
+
+
+
+
+
+ buildFile
+
+ The path to the psake build script to read the tasks from.
+
+ String
+
+ String
+
+
+ 'psakefile.ps1'
+
+
+ InformationAction
+
+
+
+ ActionPreference
+
+ ActionPreference
+
+
+
+
+
+ InformationVariable
+
+
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Include
+
+ Include the functions or code of another powershell script file into the current build script's scope
+
+
+
+
+
+
+
+
+
+ A build script may declare an "includes" function which allows you to define a file containing powershell code to be included and added to the scope of the currently running build script. Code from such file will be executed after code from build script.
+
+
+
+ Include
+
+ fileNamePathToInclude
+ String
+
+
+
+
+
+ fileNamePathToInclude
+
+ A string containing the path and name of the powershell file to include
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script is shown below:
+
+Include ".\build_utils.ps1"
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+ Description
+ -----------
+ The script above includes all the functions and variables defined in the ".\build_utils.ps1" script into the current build script's scope
+ Note: You can have more than 1 "Include" function defined in the build script
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ FormatTaskName
+
+
+
+ Properties
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ Properties
+
+ Define a scriptblock that contains assignments to variables that will be available to all tasks in the build script
+
+
+
+
+
+
+
+
+
+ A build script may declare a "Properies" function which allows you to define variables that will be available to all the "Task" functions in the build script.
+
+
+
+ Properties
+
+ properties
+ ScriptBlock
+
+
+
+
+
+ properties
+
+ The script block containing all the variable assignment statements
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script is shown below:
+
+Properties {
+ $build_dir = "c:\build"
+ $connection_string = "datasource=localhost;initial catalog=northwind;integrated security=sspi"
+}
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+ Description
+ -----------
+ Note: You can have more than 1 "Properties" function defined in the build script
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ FormatTaskName
+
+
+
+ Include
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ Task
+
+ Defines a build task to be executed by psake
+
+
+
+
+
+
+
+
+
+ This function creates a 'task' object that will be used by the psake engine to execute a build task. Note: There must be at least one task called 'default' in the build script
+
+
+
+ Task
+
+ Name
+ String
+
+
+ Action
+ ScriptBlock
+
+
+ PreAction
+ ScriptBlock
+
+
+ PostAction
+ ScriptBlock
+
+
+ Precondition
+ ScriptBlock
+
+
+ Postcondition
+ ScriptBlock
+
+
+ ContinueOnError
+ Boolean
+
+
+ Depends
+ String[]
+
+
+ RequiredVariables
+ String[]
+
+
+ Description
+ String[]
+
+
+
+
+
+ Name
+
+ The name of the task
+
+ String
+
+ String
+
+
+
+
+
+ Action
+
+ A scriptblock containing the statements to execute for the task.
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+ PreAction
+
+ A scriptblock to be executed before the 'Action' scriptblock. Note: This parameter is ignored if the 'Action' scriptblock is not defined.
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+ PostAction
+
+ A scriptblock to be executed after the 'Action' scriptblock. Note: This parameter is ignored if the 'Action' scriptblock is not defined.
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+ Precondition
+
+ A scriptblock that is executed to determine if the task is executed or skipped. This scriptblock should return $true or $false
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+ Postcondition
+
+ A scriptblock that is executed to determine if the task completed its job correctly. An exception is thrown if the scriptblock returns $false.
+
+ ScriptBlock
+
+ ScriptBlock
+
+
+
+
+
+ ContinueOnError
+
+ If this switch parameter is set then the task will not cause the build to fail when an exception is thrown by the task
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+
+
+
+ Depends
+
+ An array of task names that this task depends on. These tasks will be executed before the current task is executed.
+
+ String[]
+
+ String[]
+
+
+
+
+
+ RequiredVariables
+
+ An array of names of variables that must be set to run this task.
+
+ String[]
+
+ String[]
+
+
+
+
+
+ Description
+
+ A description of the task.
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ A sample build script is shown below:
+
+Task default -Depends Test
+
+Task Test -Depends Compile, Clean {
+ "This is a test"
+}
+
+Task Compile -Depends Clean {
+ "Compile"
+}
+
+Task Clean {
+ "Clean"
+}
+
+The 'default' task is required and should not contain an 'Action' parameter.
+It uses the 'Depends' parameter to specify that 'Test' is a dependency
+
+The 'Test' task uses the 'Depends' parameter to specify that 'Compile' and 'Clean' are dependencies
+The 'Compile' task depends on the 'Clean' task.
+
+Note:
+The 'Action' parameter is defaulted to the script block following the 'Clean' task.
+
+An equivalent 'Test' task is shown below:
+
+Task Test -Depends Compile, Clean -Action {
+ $testMessage
+}
+
+The output for the above sample build script is shown below:
+Executing task, Clean...
+Clean
+Executing task, Compile...
+Compile
+Executing task, Test...
+This is a test
+
+Build Succeeded!
+
+----------------------------------------------------------------------
+Build Time Report
+----------------------------------------------------------------------
+Name Duration
+---- --------
+Clean 00:00:00.0065614
+Compile 00:00:00.0133268
+Test 00:00:00.0225964
+Total: 00:00:00.0782496
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties
+
+
+
+ FormatTaskName
+
+
+
+ Include
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Assert
+
+
+
+ Framework
+
+
+
+
+
+
+
+ Assert
+
+ Helper function for "Design by Contract" assertion checking.
+
+
+
+
+
+
+
+
+
+ This is a helper function that makes the code less noisy by eliminating many of the "if" statements that are normally required to verify assumptions in the code.
+
+
+
+ Assert
+
+ conditionToCheck
+ Boolean
+
+
+ failureMessage
+ String
+
+
+
+
+
+ conditionToCheck
+
+ The boolean condition to evaluate
+
+ Boolean
+
+ Boolean
+
+
+
+
+
+ failureMessage
+
+ The error message used for the exception if the conditionToCheck parameter is false
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ Assert $false "This always throws an exception"
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 2 --------------
+
+ C:\PS>
+
+ Assert ( ($i % 2) -eq 0 ) "$i is not an even number"
+
+ Description
+ -----------
+ This exmaple may throw an exception if $i is not an even number
+
+ Note:
+ It might be necessary to wrap the condition with paranthesis to force PS to evaluate the condition
+so that a boolean value is calculated and passed into the 'conditionToCheck' parameter.
+
+Example:
+ Assert 1 -eq 2 "1 doesn't equal 2"
+
+PS will pass 1 into the condtionToCheck variable and PS will look for a parameter called "eq" and
+throw an exception with the following message "A parameter cannot be found that matches parameter name 'eq'"
+
+The solution is to wrap the condition in () so that PS will evaluate it first.
+
+ Assert (1 -eq 2) "1 doesn't equal 2"
+
+
+
+
+
+
+
+
+
+
+
+
+ Task
+
+
+
+ FormatTaskName
+
+
+
+ Include
+
+
+
+ Invoke-psake
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Properties
+
+
+
+
+ Framework
+
+
+
+
+
+
+ Exec
+
+ Helper function for executing command-line programs.
+
+
+
+
+
+
+
+
+
+ This is a helper function that runs a scriptblock and checks the PS variable $lastexitcode to see if an error occcured. If an error is detected then an exception is thrown. This function allows you to run command-line programs without having to explicitly check fthe $lastexitcode variable.
+
+
+
+ Exec
+
+ cmd
+ ScriptBlock
+
+
+ errorMessage
+ String
+
+
+
+
+
+ cmd
+
+ The scriptblock to execute. This scriptblock will typically contain the command-line invocation.
+
+ ScriptBlock
+
+ Boolean
+
+
+
+
+
+ failureMessage
+
+ The error message used for the exception that is thrown.
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ exec { svn info $repository_trunk } "Error executing SVN. Please verify SVN command-line client is installed"
+
+ This example calls the svn command-line client.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Assert
+
+
+
+ FormatTaskName
+
+
+
+ Include
+
+
+
+ Invoke-psake
+
+
+
+ Properties
+
+
+
+ Task
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+
+ Framework
+
+
+
+
+
+
+ Invoke-Task
+
+ Executes another task in the current build script.
+
+
+
+
+
+
+
+
+
+ This is a function that will allow you to invoke a Task from within another Task in the current build script.
+
+
+
+ Invoke-Task
+
+ taskName
+ String
+
+
+
+
+
+ taskName
+
+ The name of the task to execute.
+
+ String
+
+ String
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------- EXAMPLE 1 --------------
+
+ C:\PS>
+
+ Invoke-Task "Compile"
+
+ This example calls the "Compile" task.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Assert
+
+
+
+ Exec
+
+
+
+ FormatTaskName
+
+
+
+ Include
+
+
+
+ Invoke-psake
+
+
+
+ Properties
+
+
+
+ Task
+
+
+
+ TaskSetup
+
+
+
+ TaskTearDown
+
+
+
+ Framework
+
+
+
+
+
diff --git a/src/buildScripts/psake/4.8.0/examples/checkvariables.ps1 b/src/buildScripts/psake/4.8.0/examples/checkvariables.ps1
new file mode 100644
index 0000000..0d6b0b1
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/checkvariables.ps1
@@ -0,0 +1,33 @@
+Properties {
+ $x = 1
+ $y = 2
+}
+
+FormatTaskName "[{0}]"
+
+Task default -Depends Verify
+
+Task Verify -Description "This task verifies psake's variables" {
+
+ Assert (Test-Path 'variable:\psake') "psake variable was not exported from module"
+
+ Assert ($psake.ContainsKey("version")) "psake variable does not contain 'version'"
+ Assert ($psake.ContainsKey("context")) "psake variable does not contain 'context'"
+ Assert ($psake.ContainsKey("build_success")) "psake variable does not contain 'build_success'"
+ Assert ($psake.ContainsKey("build_script_file")) "psake variable does not contain 'build_script_file'"
+ Assert ($psake.ContainsKey("build_script_dir")) "psake variable does not contain 'build_script_dir'"
+
+ Assert (![string]::IsNullOrEmpty($psake.version)) '$psake.version was null or empty'
+ Assert ($psake.context -ne $null) '$psake.context was null'
+ Assert (!$psake.build_success) '$psake.build_success should be $false'
+ Assert ($psake.build_script_file -ne $null) '$psake.build_script_file was null'
+ Assert ($psake.build_script_file.Name -eq "checkvariables.ps1") ("psake variable: {0} was not equal to 'checkvariables.ps1'" -f $psake.build_script_file.Name)
+ Assert (![string]::IsNullOrEmpty($psake.build_script_dir)) '$psake.build_script_dir was null or empty'
+
+ Assert ($psake.context.Peek().tasks.Count -ne 0) "psake context variable 'tasks' had length zero"
+ Assert ($psake.context.Peek().properties.Count -ne 0) "psake context variable 'properties' had length zero"
+ Assert ($psake.context.Peek().includes.Count -eq 0) "psake context variable 'includes' should have had length zero"
+ Assert ($psake.context.Peek().config -ne $null) "psake context variable 'config' was null"
+
+ Assert ($psake.context.Peek().currentTaskName -eq "Verify") 'psake variable: $currentTaskName was not set correctly'
+}
\ No newline at end of file
diff --git a/src/buildScripts/psake/4.8.0/examples/continueonerror.ps1 b/src/buildScripts/psake/4.8.0/examples/continueonerror.ps1
new file mode 100644
index 0000000..9679a4d
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/continueonerror.ps1
@@ -0,0 +1,14 @@
+Task default -Depends TaskA
+
+Task TaskA -Depends TaskB {
+ "Task - A"
+}
+
+Task TaskB -Depends TaskC -ContinueOnError {
+ "Task - B"
+ throw "I failed on purpose!"
+}
+
+Task TaskC {
+ "Task - C"
+}
diff --git a/src/buildScripts/psake/4.8.0/examples/default.ps1 b/src/buildScripts/psake/4.8.0/examples/default.ps1
new file mode 100644
index 0000000..4657bea
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/default.ps1
@@ -0,0 +1,23 @@
+properties {
+ $testMessage = 'Executed Test!'
+ $compileMessage = 'Executed Compile!'
+ $cleanMessage = 'Executed Clean!'
+}
+
+task default -depends Test
+
+task Test -depends Compile, Clean {
+ $testMessage
+}
+
+task Compile -depends Clean {
+ $compileMessage
+}
+
+task Clean {
+ $cleanMessage
+}
+
+task ? -Description "Helper to display task info" {
+ Write-Documentation
+}
diff --git a/src/buildScripts/psake/4.8.0/examples/formattaskname_scriptblock.ps1 b/src/buildScripts/psake/4.8.0/examples/formattaskname_scriptblock.ps1
new file mode 100644
index 0000000..3ec3b96
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/formattaskname_scriptblock.ps1
@@ -0,0 +1,24 @@
+properties {
+ $testMessage = 'Executed Test!'
+ $compileMessage = 'Executed Compile!'
+ $cleanMessage = 'Executed Clean!'
+}
+
+task default -depends Test
+
+formatTaskName {
+ param($taskName)
+ write-host $taskName -foregroundcolor Green
+}
+
+task Test -depends Compile, Clean {
+ $testMessage
+}
+
+task Compile -depends Clean {
+ $compileMessage
+}
+
+task Clean {
+ $cleanMessage
+}
diff --git a/src/buildScripts/psake/4.8.0/examples/formattaskname_string.ps1 b/src/buildScripts/psake/4.8.0/examples/formattaskname_string.ps1
new file mode 100644
index 0000000..f9b5dce
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/formattaskname_string.ps1
@@ -0,0 +1,21 @@
+properties {
+ $testMessage = 'Executed Test!'
+ $compileMessage = 'Executed Compile!'
+ $cleanMessage = 'Executed Clean!'
+}
+
+task default -depends Test
+
+formatTaskName "-------{0}-------"
+
+task Test -depends Compile, Clean {
+ $testMessage
+}
+
+task Compile -depends Clean {
+ $compileMessage
+}
+
+task Clean {
+ $cleanMessage
+}
diff --git a/src/buildScripts/psake/4.8.0/examples/msbuild40.ps1 b/src/buildScripts/psake/4.8.0/examples/msbuild40.ps1
new file mode 100644
index 0000000..2298e42
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/msbuild40.ps1
@@ -0,0 +1,8 @@
+Framework "4.0"
+# Framework "4.0x64"
+
+task default -depends ShowMsBuildVersion
+
+task ShowMsBuildVersion {
+ msbuild /version
+}
\ No newline at end of file
diff --git a/src/buildScripts/psake/4.8.0/examples/nested.ps1 b/src/buildScripts/psake/4.8.0/examples/nested.ps1
new file mode 100644
index 0000000..d7f27b4
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/nested.ps1
@@ -0,0 +1,17 @@
+Properties {
+ $x = 1
+}
+
+Task default -Depends RunNested1, RunNested2, CheckX
+
+Task RunNested1 {
+ Invoke-psake .\nested\nested1.ps1
+}
+
+Task RunNested2 {
+ Invoke-psake .\nested\nested2.ps1
+}
+
+Task CheckX{
+ Assert ($x -eq 1) '$x was not 1'
+}
diff --git a/src/buildScripts/psake/4.8.0/examples/nested/nested1.ps1 b/src/buildScripts/psake/4.8.0/examples/nested/nested1.ps1
new file mode 100644
index 0000000..78d99a3
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/nested/nested1.ps1
@@ -0,0 +1,9 @@
+Properties {
+ $x = 100
+}
+
+Task default -Depends Nested1CheckX
+
+Task Nested1CheckX{
+ Assert ($x -eq 100) '$x was not 100'
+}
diff --git a/src/buildScripts/psake/4.8.0/examples/nested/nested2.ps1 b/src/buildScripts/psake/4.8.0/examples/nested/nested2.ps1
new file mode 100644
index 0000000..c5a244b
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/nested/nested2.ps1
@@ -0,0 +1,9 @@
+Properties {
+ $x = 200
+}
+
+Task default -Depends Nested2CheckX
+
+Task Nested2CheckX{
+ Assert ($x -eq 200) '$x was not 200'
+}
diff --git a/src/buildScripts/psake/4.8.0/examples/paralleltasks.ps1 b/src/buildScripts/psake/4.8.0/examples/paralleltasks.ps1
new file mode 100644
index 0000000..24a401f
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/paralleltasks.ps1
@@ -0,0 +1,20 @@
+Task ParallelTask1 {
+ "ParallelTask1"
+}
+
+Task ParallelTask2 {
+ "ParallelTask2"
+}
+
+Task ParallelNested1andNested2 {
+ $jobArray = @()
+ @("ParallelTask1", "ParallelTask2") | ForEach-Object {
+ $jobArray += Start-Job {
+ param($scriptFile, $taskName)
+ Invoke-psake $scriptFile -taskList $taskName
+ } -ArgumentList $psake.build_script_file.FullName, $_
+ }
+ Wait-Job $jobArray | Receive-Job
+}
+
+Task default -depends ParallelNested1andNested2
\ No newline at end of file
diff --git a/src/buildScripts/psake/4.8.0/examples/parameters.ps1 b/src/buildScripts/psake/4.8.0/examples/parameters.ps1
new file mode 100644
index 0000000..c087615
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/parameters.ps1
@@ -0,0 +1,9 @@
+properties {
+ $my_property = $p1 + $p2
+}
+
+task default -depends TestParams
+
+task TestParams {
+ Assert ($my_property -ne $null) "`$my_property should not be null. Run with -parameters @{'p1' = 'v1'; 'p2' = 'v2'}"
+}
diff --git a/src/buildScripts/psake/4.8.0/examples/passingParametersString/build.Release.Version.bat b/src/buildScripts/psake/4.8.0/examples/passingParametersString/build.Release.Version.bat
new file mode 100644
index 0000000..a48c126
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/passingParametersString/build.Release.Version.bat
@@ -0,0 +1,3 @@
+powershell -Command "& {Import-Module .\..\..\psake.psm1; Invoke-psake .\parameters.ps1 -parameters @{"buildConfiguration"='Release';} }"
+
+Pause
\ No newline at end of file
diff --git a/src/buildScripts/psake/4.8.0/examples/passingParametersString/parameters.ps1 b/src/buildScripts/psake/4.8.0/examples/passingParametersString/parameters.ps1
new file mode 100644
index 0000000..937d644
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/passingParametersString/parameters.ps1
@@ -0,0 +1,22 @@
+properties {
+ $buildOutputPath = ".\bin\$buildConfiguration"
+}
+
+task default -depends DoRelease
+
+task DoRelease {
+ Assert ("$buildConfiguration" -ne $null) "buildConfiguration should not have been null"
+ Assert ("$buildConfiguration" -eq 'Release') "buildConfiguration=[$buildConfiguration] should have been 'Release'"
+
+ Write-Host ""
+ Write-Host ""
+ Write-Host ""
+ Write-Host -NoNewline "Would build output into path "
+ Write-Host -NoNewline -ForegroundColor Green "$buildOutputPath"
+ Write-Host -NoNewline " for build configuration "
+ Write-Host -ForegroundColor Green "$buildConfiguration"
+ Write-Host -NoNewline "."
+ Write-Host ""
+ Write-Host ""
+ Write-Host ""
+}
diff --git a/src/buildScripts/psake/4.8.0/examples/preandpostaction.ps1 b/src/buildScripts/psake/4.8.0/examples/preandpostaction.ps1
new file mode 100644
index 0000000..fcb36e6
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/preandpostaction.ps1
@@ -0,0 +1,13 @@
+task default -depends Test
+
+task Test -depends Compile, Clean -PreAction {"Pre-Test"} -Action {
+ "Test"
+} -PostAction {"Post-Test"}
+
+task Compile -depends Clean {
+ "Compile"
+}
+
+task Clean {
+ "Clean"
+}
\ No newline at end of file
diff --git a/src/buildScripts/psake/4.8.0/examples/preandpostcondition.ps1 b/src/buildScripts/psake/4.8.0/examples/preandpostcondition.ps1
new file mode 100644
index 0000000..ce855fb
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/preandpostcondition.ps1
@@ -0,0 +1,18 @@
+properties {
+ $runTaskA = $false
+ $taskBSucceded = $true
+}
+
+task default -depends TaskC
+
+task TaskA -precondition { $runTaskA -eq $true } {
+ "TaskA executed"
+}
+
+task TaskB -postcondition { $taskBSucceded -eq $true } {
+ "TaskB executed"
+}
+
+task TaskC -depends TaskA,TaskB {
+ "TaskC executed."
+}
\ No newline at end of file
diff --git a/src/buildScripts/psake/4.8.0/examples/properties.ps1 b/src/buildScripts/psake/4.8.0/examples/properties.ps1
new file mode 100644
index 0000000..ccbb3ec
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/properties.ps1
@@ -0,0 +1,13 @@
+properties {
+ $x = $null
+ $y = $null
+ $z = $null
+}
+
+task default -depends TestProperties
+
+task TestProperties {
+ Assert ($x -ne $null) "x should not be null. Run with -properties @{'x' = '1'; 'y' = '2'}"
+ Assert ($y -ne $null) "y should not be null. Run with -properties @{'x' = '1'; 'y' = '2'}"
+ Assert ($z -eq $null) "z should be null"
+}
\ No newline at end of file
diff --git a/src/buildScripts/psake/4.8.0/examples/requiredvariables.ps1 b/src/buildScripts/psake/4.8.0/examples/requiredvariables.ps1
new file mode 100644
index 0000000..d9922bb
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/requiredvariables.ps1
@@ -0,0 +1,14 @@
+properties {
+ $x = $null
+ $y = $null
+ $z = $null
+}
+
+task default -depends TestRequiredVariables
+
+# you can put arguments to task in multiple lines using `
+task TestRequiredVariables `
+ -description "This task shows how to make a variable required to run task. Run this script with -properties @{x = 1; y = 2; z = 3}" `
+ -requiredVariables x, y, z `
+{
+}
diff --git a/src/buildScripts/psake/4.8.0/examples/tasksetupandteardown.ps1 b/src/buildScripts/psake/4.8.0/examples/tasksetupandteardown.ps1
new file mode 100644
index 0000000..be0834a
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/examples/tasksetupandteardown.ps1
@@ -0,0 +1,17 @@
+TaskSetup {
+ "Executing task setup"
+}
+
+TaskTearDown {
+ "Executing task tear down"
+}
+
+Task default -depends TaskB
+
+Task TaskA {
+ "TaskA executed"
+}
+
+Task TaskB -depends TaskA {
+ "TaskB executed"
+}
diff --git a/src/buildScripts/psake/4.8.0/private/CleanupEnvironment.ps1 b/src/buildScripts/psake/4.8.0/private/CleanupEnvironment.ps1
new file mode 100644
index 0000000..7d970f6
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/CleanupEnvironment.ps1
@@ -0,0 +1,12 @@
+function CleanupEnvironment {
+ if ($psake.context.Count -gt 0) {
+ $currentContext = $psake.context.Peek()
+ [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
+ $env:PATH = $currentContext.originalEnvPath
+ Set-Location $currentContext.originalDirectory
+ $global:ErrorActionPreference = $currentContext.originalErrorActionPreference
+ $psake.LoadedTaskModules = @{}
+ $psake.ReferenceTasks = @{}
+ [void] $psake.context.Pop()
+ }
+}
diff --git a/src/buildScripts/psake/4.8.0/private/ConfigureBuildEnvironment.ps1 b/src/buildScripts/psake/4.8.0/private/ConfigureBuildEnvironment.ps1
new file mode 100644
index 0000000..6233477
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/ConfigureBuildEnvironment.ps1
@@ -0,0 +1,198 @@
+
+function ConfigureBuildEnvironment {
+ if (!(Test-Path Variable:\IsWindows) -or $IsWindows) {
+ $framework = $psake.context.peek().config.framework
+ if ($framework -cmatch '^((?:\d+\.\d+)(?:\.\d+){0,1})(x86|x64){0,1}$') {
+ $versionPart = $matches[1]
+ $bitnessPart = $matches[2]
+ }
+ else {
+ throw ($msgs.error_invalid_framework -f $framework)
+ }
+ $versions = $null
+ $buildToolsVersions = $null
+ switch ($versionPart) {
+ '1.0' {
+ $versions = @('v1.0.3705')
+ }
+ '1.1' {
+ $versions = @('v1.1.4322')
+ }
+ '1.1.0' {
+ $versions = @()
+ }
+ '2.0' {
+ $versions = @('v2.0.50727')
+ }
+ '2.0.0' {
+ $versions = @()
+ }
+ '3.0' {
+ $versions = @('v2.0.50727')
+ }
+ '3.5' {
+ $versions = @('v3.5', 'v2.0.50727')
+ }
+ '4.0' {
+ $versions = @('v4.0.30319')
+ }
+ {($_ -eq '4.5') -or ($_ -eq '4.5.1') -or ($_ -eq '4.5.2')} {
+ $versions = @('v4.0.30319')
+ $buildToolsVersions = @('16.0', '15.0', '14.0', '12.0')
+ }
+ {($_ -eq '4.6') -or ($_ -eq '4.6.1') -or ($_ -eq '4.6.2')} {
+ $versions = @('v4.0.30319')
+ $buildToolsVersions = @('16.0', '15.0', '14.0')
+ }
+ {($_ -eq '4.7') -or ($_ -eq '4.7.1') -or ($_ -eq '4.7.2')} {
+ $versions = @('v4.0.30319')
+ $buildToolsVersions = @('16.0', '15.0')
+ }
+
+ default {
+ throw ($msgs.error_unknown_framework -f $versionPart, $framework)
+ }
+ }
+
+ $bitness = 'Framework'
+ if ($versionPart -ne '1.0' -and $versionPart -ne '1.1') {
+ switch ($bitnessPart) {
+ 'x86' {
+ $bitness = 'Framework'
+ $buildToolsKey = 'MSBuildToolsPath32'
+ }
+ 'x64' {
+ $bitness = 'Framework64'
+ $buildToolsKey = 'MSBuildToolsPath'
+ }
+ { [string]::IsNullOrEmpty($_) } {
+ $ptrSize = [System.IntPtr]::Size
+ switch ($ptrSize) {
+ 4 {
+ $bitness = 'Framework'
+ $buildToolsKey = 'MSBuildToolsPath32'
+ }
+ 8 {
+ $bitness = 'Framework64'
+ $buildToolsKey = 'MSBuildToolsPath'
+ }
+ default {
+ throw ($msgs.error_unknown_pointersize -f $ptrSize)
+ }
+ }
+ }
+ default {
+ throw ($msgs.error_unknown_bitnesspart -f $bitnessPart, $framework)
+ }
+ }
+ }
+
+ $frameworkDirs = @()
+ if ($null -ne $buildToolsVersions) {
+ foreach($ver in $buildToolsVersions) {
+ if ($ver -eq "15.0") {
+ if ($null -eq (Get-Module -Name VSSetup)) {
+ if ($null -eq (Get-Module -Name VSSetup -ListAvailable)) {
+ WriteColoredOutput ($msgs.warning_missing_vsssetup_module -f $ver) -foregroundcolor Yellow
+ continue
+ }
+
+ Import-Module VSSetup
+ }
+
+ # borrowed from nightroman https://github.com/nightroman/Invoke-Build
+ if ($vsInstances = Get-VSSetupInstance) {
+ $vs = @($vsInstances | Select-VSSetupInstance -Version '[15.0,)' -Require Microsoft.Component.MSBuild)
+ if ($vs) {
+ if ($buildToolsKey -eq 'MSBuildToolsPath32') {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin
+ }
+ else {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin\amd64
+ }
+ }
+
+ $vs = @($vsInstances | Select-VSSetupInstance -Version '[15.0,)' -Product Microsoft.VisualStudio.Product.BuildTools)
+ if ($vs) {
+ if ($buildToolsKey -eq 'MSBuildToolsPath32') {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin
+ }
+ else {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin\amd64
+ }
+ }
+ }
+ else {
+ if (!($root = ${env:ProgramFiles(x86)})) {$root = $env:ProgramFiles}
+ if (Test-Path -LiteralPath "$root\Microsoft Visual Studio\2017") {
+ if ($buildToolsKey -eq 'MSBuildToolsPath32') {
+ $rp = @(Resolve-Path "$root\Microsoft Visual Studio\2017\*\MSBuild\15.0\Bin" -ErrorAction SilentlyContinue)
+ }
+ else {
+ $rp = @(Resolve-Path "$root\Microsoft Visual Studio\2017\*\MSBuild\15.0\Bin\amd64" -ErrorAction SilentlyContinue)
+ }
+
+ if ($rp) {
+ $frameworkDirs += $rp[-1].ProviderPath
+ }
+ }
+ }
+ }
+ elseif ($ver -eq "16.0") {
+ if ($null -eq (Get-Module -Name VSSetup)) {
+ if ($null -eq (Get-Module -Name VSSetup -ListAvailable)) {
+ WriteColoredOutput ($msgs.warning_missing_vsssetup_module -f $ver) -foregroundcolor Yellow
+ continue
+ }
+
+ Import-Module VSSetup
+ }
+
+ # borrowed from nightroman https://github.com/nightroman/Invoke-Build
+ if ($vsInstances = Get-VSSetupInstance) {
+ $vs = @($vsInstances | Select-VSSetupInstance -Version '[16.0,)' -Require Microsoft.Component.MSBuild)
+ if ($vs) {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\Current\Bin
+ }
+
+ $vs = @($vsInstances | Select-VSSetupInstance -Version '[16.0,)' -Product Microsoft.VisualStudio.Product.BuildTools)
+ if ($vs) {
+ $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\Current\Bin
+ }
+ }
+ else {
+ if (!($root = ${env:ProgramFiles(x86)})) {$root = $env:ProgramFiles}
+ if (Test-Path -LiteralPath "$root\Microsoft Visual Studio\2019") {
+ $rp = @(Resolve-Path "$root\Microsoft Visual Studio\2019\*\MSBuild\Current\Bin" -ErrorAction SilentlyContinue)
+ if ($rp) {
+ $frameworkDirs += $rp[-1].ProviderPath
+ }
+ }
+ }
+ }
+ elseif (Test-Path "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\$ver") {
+ $frameworkDirs += (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\$ver" -Name $buildToolsKey).$buildToolsKey
+ }
+ }
+ }
+
+ $frameworkDirs = $frameworkDirs + @($versions | ForEach-Object { "$env:windir\Microsoft.NET\$bitness\$_\" })
+ for ($i = 0; $i -lt $frameworkDirs.Count; $i++) {
+ $dir = $frameworkDirs[$i]
+ if ($dir -Match "\$\(Registry:HKEY_LOCAL_MACHINE(.*?)@(.*)\)") {
+ $key = "HKLM:" + $matches[1]
+ $name = $matches[2]
+ $dir = (Get-ItemProperty -Path $key -Name $name).$name
+ $frameworkDirs[$i] = $dir
+ }
+ }
+
+ $frameworkDirs | ForEach-Object { Assert (test-path $_ -pathType Container) ($msgs.error_no_framework_install_dir_found -f $_)}
+
+ $env:PATH = ($frameworkDirs -join ";") + ";$env:PATH"
+ }
+
+ # if any error occurs in a PS function then "stop" processing immediately
+ # this does not effect any external programs that return a non-zero exit code
+ $global:ErrorActionPreference = "Stop"
+}
diff --git a/src/buildScripts/psake/4.8.0/private/CreateConfigurationForNewContext.ps1 b/src/buildScripts/psake/4.8.0/private/CreateConfigurationForNewContext.ps1
new file mode 100644
index 0000000..cbe91f4
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/CreateConfigurationForNewContext.ps1
@@ -0,0 +1,28 @@
+function CreateConfigurationForNewContext {
+ param(
+ [string] $buildFile,
+ [string] $framework
+ )
+
+ $previousConfig = GetCurrentConfigurationOrDefault
+
+ $config = new-object psobject -property @{
+ buildFileName = $previousConfig.buildFileName;
+ framework = $previousConfig.framework;
+ taskNameFormat = $previousConfig.taskNameFormat;
+ verboseError = $previousConfig.verboseError;
+ coloredOutput = $previousConfig.coloredOutput;
+ modules = $previousConfig.modules;
+ moduleScope = $previousConfig.moduleScope;
+ }
+
+ if ($framework) {
+ $config.framework = $framework;
+ }
+
+ if ($buildFile) {
+ $config.buildFileName = $buildFile;
+ }
+
+ return $config
+}
diff --git a/src/buildScripts/psake/4.8.0/private/ExecuteInBuildFileScope.ps1 b/src/buildScripts/psake/4.8.0/private/ExecuteInBuildFileScope.ps1
new file mode 100644
index 0000000..4be547b
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/ExecuteInBuildFileScope.ps1
@@ -0,0 +1,56 @@
+function ExecuteInBuildFileScope {
+ param([string]$buildFile, $module, [scriptblock]$sb)
+
+ # Execute the build file to set up the tasks and defaults
+ Assert (test-path $buildFile -pathType Leaf) ($msgs.error_build_file_not_found -f $buildFile)
+
+ $psake.build_script_file = get-item $buildFile
+ $psake.build_script_dir = $psake.build_script_file.DirectoryName
+ $psake.build_success = $false
+
+ # Create a new psake context
+ $psake.context.push(
+ @{
+ "taskSetupScriptBlock" = {}
+ "taskTearDownScriptBlock" = {}
+ "executedTasks" = new-object System.Collections.Stack
+ "callStack" = new-object System.Collections.Stack
+ "originalEnvPath" = $env:PATH
+ "originalDirectory" = get-location
+ "originalErrorActionPreference" = $global:ErrorActionPreference
+ "tasks" = @{}
+ "aliases" = @{}
+ "properties" = new-object System.Collections.Stack
+ "includes" = new-object System.Collections.Queue
+ "config" = CreateConfigurationForNewContext $buildFile $framework
+ }
+ )
+
+ # Load in the psake configuration (or default)
+ LoadConfiguration $psake.build_script_dir
+
+ set-location $psake.build_script_dir
+
+ # Import any modules declared in the build script
+ LoadModules
+
+ $frameworkOldValue = $framework
+
+ . $psake.build_script_file.FullName
+
+ $currentContext = $psake.context.Peek()
+
+ if ($framework -ne $frameworkOldValue) {
+ writecoloredoutput $msgs.warning_deprecated_framework_variable -foregroundcolor Yellow
+ $currentContext.config.framework = $framework
+ }
+
+ ConfigureBuildEnvironment
+
+ while ($currentContext.includes.Count -gt 0) {
+ $includeFilename = $currentContext.includes.Dequeue()
+ . $includeFilename
+ }
+
+ & $sb $currentContext $module
+}
diff --git a/src/buildScripts/psake/4.8.0/private/FormatErrorMessage.ps1 b/src/buildScripts/psake/4.8.0/private/FormatErrorMessage.ps1
new file mode 100644
index 0000000..657aa72
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/FormatErrorMessage.ps1
@@ -0,0 +1,26 @@
+function FormatErrorMessage
+{
+ [CmdletBinding()]
+ param(
+ [Parameter(ValueFromPipeline=$true)]
+ $ErrorRecord = $Error[0]
+ )
+
+ $currentConfig = GetCurrentConfigurationOrDefault
+ if ($currentConfig.verboseError) {
+ $error_message = "{0}: An Error Occurred. See Error Details Below: $($script:nl)" -f (Get-Date)
+ $error_message += ("-" * 70) + $script:nl
+ $error_message += "Error: {0}$($script:nl)" -f (ResolveError $ErrorRecord -Short)
+ $error_message += ("-" * 70) + $script:nl
+ $error_message += ResolveError $ErrorRecord
+ $error_message += ("-" * 70) + $script:nl
+ $error_message += "Script Variables" + $script:nl
+ $error_message += ("-" * 70) + $script:nl
+ $error_message += get-variable -scope script | format-table | out-string
+ } else {
+ # ($_ | Out-String) gets error messages with source information included.
+ $error_message = "Error: {0}: $($script:nl){1}" -f (Get-Date), (ResolveError $ErrorRecord -Short)
+}
+
+ $error_message
+}
diff --git a/src/buildScripts/psake/4.8.0/private/Get-DefaultBuildFile.ps1 b/src/buildScripts/psake/4.8.0/private/Get-DefaultBuildFile.ps1
new file mode 100644
index 0000000..5413208
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/Get-DefaultBuildFile.ps1
@@ -0,0 +1,17 @@
+# Attempt to find the default build file given the config_default of
+# buildFileName and legacyBuildFileName. If neither exist optionally
+# return the buildFileName or $null
+function Get-DefaultBuildFile {
+ param(
+ [boolean] $UseDefaultIfNoneExist = $true
+ )
+
+ if (test-path $psake.config_default.buildFileName -pathType Leaf) {
+ Write-Output $psake.config_default.buildFileName
+ } elseif (test-path $psake.config_default.legacyBuildFileName -pathType Leaf) {
+ Write-Warning "The default configuration file of default.ps1 is deprecated. Please use psakefile.ps1"
+ Write-Output $psake.config_default.legacyBuildFileName
+ } elseif ($UseDefaultIfNoneExist) {
+ Write-Output $psake.config_default.buildFileName
+ }
+}
diff --git a/src/buildScripts/psake/4.8.0/private/GetCurrentConfigurationOrDefault.ps1 b/src/buildScripts/psake/4.8.0/private/GetCurrentConfigurationOrDefault.ps1
new file mode 100644
index 0000000..ae0fa4f
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/GetCurrentConfigurationOrDefault.ps1
@@ -0,0 +1,7 @@
+function GetCurrentConfigurationOrDefault() {
+ if ($psake.context.count -gt 0) {
+ return $psake.context.peek().config
+ } else {
+ return $psake.config_default
+ }
+}
diff --git a/src/buildScripts/psake/4.8.0/private/GetTasksFromContext.ps1 b/src/buildScripts/psake/4.8.0/private/GetTasksFromContext.ps1
new file mode 100644
index 0000000..5764962
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/GetTasksFromContext.ps1
@@ -0,0 +1,15 @@
+function GetTasksFromContext($currentContext) {
+
+ $docs = $currentContext.tasks.Keys | foreach-object {
+
+ $task = $currentContext.tasks.$_
+ new-object PSObject -property @{
+ Name = $task.Name;
+ Alias = $task.Alias;
+ Description = $task.Description;
+ DependsOn = $task.DependsOn;
+ }
+ }
+
+ return $docs
+}
diff --git a/src/buildScripts/psake/4.8.0/private/LoadConfiguration.ps1 b/src/buildScripts/psake/4.8.0/private/LoadConfiguration.ps1
new file mode 100644
index 0000000..7cdcd28
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/LoadConfiguration.ps1
@@ -0,0 +1,31 @@
+function LoadConfiguration {
+ <#
+ .SYNOPSIS
+ Load psake-config.ps1 file
+ .DESCRIPTION
+ Load psake-config.ps1 if present in the directory of the current build script.
+ If that file doesn't exist, load the default psake-config.ps1 file from the module directory.
+ #>
+ param(
+ [string]$configdir = (Split-Path -Path $PSScriptRoot -Parent)
+ )
+
+ $configFilePath = Join-Path -Path $configdir -ChildPath $script:psakeConfigFile
+ $defaultConfigFilePath = Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -ChildPath $script:psakeConfigFile
+
+ if (Test-Path -LiteralPath $configFilePath -PathType Leaf) {
+ $configFileToLoad = $configFilePath
+ } elseIf (Test-Path -LiteralPath $defaultConfigFilePath -PathType Leaf) {
+ $configFileToLoad = $defaultConfigFilePath
+ } else {
+ throw 'Cannot find psake-config.ps1'
+ }
+
+ try {
+ [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')]
+ $config = GetCurrentConfigurationOrDefault
+ . $configFileToLoad
+ } catch {
+ throw 'Error Loading Configuration from {0}: {1}' -f $configFileToLoad, $_
+ }
+}
diff --git a/src/buildScripts/psake/4.8.0/private/LoadModules.ps1 b/src/buildScripts/psake/4.8.0/private/LoadModules.ps1
new file mode 100644
index 0000000..7182b1f
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/LoadModules.ps1
@@ -0,0 +1,21 @@
+function LoadModules {
+ $currentConfig = $psake.context.peek().config
+ if ($currentConfig.modules) {
+
+ $scope = $currentConfig.moduleScope
+
+ $global = [string]::Equals($scope, "global", [StringComparison]::CurrentCultureIgnoreCase)
+
+ $currentConfig.modules | ForEach-Object {
+ resolve-path $_ | ForEach-Object {
+ "Loading module: $_"
+ $module = Import-Module $_ -passthru -DisableNameChecking -global:$global
+ if (!$module) {
+ throw ($msgs.error_loading_module -f $_.Name)
+ }
+ }
+ }
+
+ ""
+ }
+}
diff --git a/src/buildScripts/psake/4.8.0/private/ResolveError.ps1 b/src/buildScripts/psake/4.8.0/private/ResolveError.ps1
new file mode 100644
index 0000000..3f697ba
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/ResolveError.ps1
@@ -0,0 +1,62 @@
+# borrowed from Jeffrey Snover http://blogs.msdn.com/powershell/archive/2006/12/07/resolve-error.aspx
+# modified to better handle SQL errors
+function ResolveError
+{
+ [CmdletBinding()]
+ param(
+ [Parameter(ValueFromPipeline=$true)]
+ $ErrorRecord=$Error[0],
+ [Switch]
+ $Short
+ )
+
+ process {
+ if ($_ -eq $null) { $_ = $ErrorRecord }
+ $ex = $_.Exception
+
+ if (-not $Short) {
+ $error_message = "$($script:nl)ErrorRecord:{0}ErrorRecord.InvocationInfo:{1}Exception:$($script:nl){2}"
+ $formatted_errorRecord = $_ | format-list * -force | out-string
+ $formatted_invocationInfo = $_.InvocationInfo | format-list * -force | out-string
+ $formatted_exception = ''
+
+ $i = 0
+ while ($null -ne $ex) {
+ $i++
+ $formatted_exception += ("$i" * 70) + $script:nl +
+ ($ex | format-list * -force | out-string) + $script:nl
+ $ex = $ex | SelectObjectWithDefault -Name 'InnerException' -Value $null
+ }
+
+ return $error_message -f $formatted_errorRecord, $formatted_invocationInfo, $formatted_exception
+ }
+
+ $lastException = @()
+ while ($null -ne $ex) {
+ $lastMessage = $ex | SelectObjectWithDefault -Name 'Message' -Value ''
+ $lastException += ($lastMessage -replace $script:nl, '')
+ if ($ex -is [Data.SqlClient.SqlException]) {
+ $lastException += "(Line [$($ex.LineNumber)] " +
+ "Procedure [$($ex.Procedure)] Class [$($ex.Class)] " +
+ " Number [$($ex.Number)] State [$($ex.State)] )"
+ }
+ $ex = $ex | SelectObjectWithDefault -Name 'InnerException' -Value $null
+ }
+ $shortException = $lastException -join ' --> '
+
+ $header = $null
+ $header = (($_.InvocationInfo |
+ SelectObjectWithDefault -Name 'PositionMessage' -Value '') -replace $script:nl, ' '),
+ ($_ | SelectObjectWithDefault -Name 'Message' -Value ''),
+ ($_ | SelectObjectWithDefault -Name 'Exception' -Value '') |
+ Where-Object { -not [String]::IsNullOrEmpty($_) } |
+ Select-Object -First 1
+
+ $delimiter = ''
+ if ((-not [String]::IsNullOrEmpty($header)) -and
+ (-not [String]::IsNullOrEmpty($shortException)))
+ { $delimiter = ' [<<==>>] ' }
+
+ return "$($header)$($delimiter)Exception: $($shortException)"
+ }
+}
diff --git a/src/buildScripts/psake/4.8.0/private/SelectObjectWithDefault.ps1 b/src/buildScripts/psake/4.8.0/private/SelectObjectWithDefault.ps1
new file mode 100644
index 0000000..f60af9d
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/SelectObjectWithDefault.ps1
@@ -0,0 +1,23 @@
+function SelectObjectWithDefault
+{
+ [CmdletBinding()]
+ param(
+ [Parameter(ValueFromPipeline=$true)]
+ [PSObject]
+ $InputObject,
+ [string]
+ $Name,
+ $Value
+ )
+
+ process {
+ if ($_ -eq $null) { $Value }
+ elseif ($_ | Get-Member -Name $Name) {
+ $_.$Name
+ }
+ elseif (($_ -is [Hashtable]) -and ($_.Keys -contains $Name)) {
+ $_.$Name
+ }
+ else { $Value }
+ }
+}
diff --git a/src/buildScripts/psake/4.8.0/private/Test-ModuleVersion.ps1 b/src/buildScripts/psake/4.8.0/private/Test-ModuleVersion.ps1
new file mode 100644
index 0000000..c1c9fb5
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/Test-ModuleVersion.ps1
@@ -0,0 +1,107 @@
+<#
+.SYNOPSIS
+ Validate that the version of a module passed in via the $currentVersion
+ parameter is valid based on the criteria specified by the following
+ parameters.
+.DESCRIPTION
+ This function is used to determine whether or not a given module is within
+ the version bounds specified by the parameters passed in. Psake will use
+ this information to determine if the module it has found will contain the
+ proper version of the shared task it has been asked to import.
+
+ This function should allow bounds that are only on the lower limit, only on
+ the upper, within a range, or if no bounds are supplied, the current module
+ will be accepted without question.
+.PARAMETER currentVersion
+ The version of the module in the current session to be subjected to comparison
+.PARAMETER minimumVersion
+ The lower bound of the version that will be accepted. This comparison should
+ be inclusive, meaning an input version greater than or equal to this version
+ should be accepted.
+.PARAMETER maximumVersion
+ The upper bound of the version that will be accepted. This comparison should
+ be inclusive, meaning an input version less than or equal to this version
+ should be accepted.
+.PARAMETER lessThanVersion
+ The upper bound of the version that will be accepted. This comparison should
+ be exlusive. Meaning an input version that is less than only, not equal to
+ this version, will be accepted.
+.INPUTS
+ A $currentVersion of type [System.Version] or a convertable string.
+ A set of version criteria, each of type [System.Version] or a convertable string.
+.OUTPUTS
+ boolean - Pass/Fail
+#>
+function Test-ModuleVersion {
+ [CmdletBinding()]
+ param (
+ [string]$currentVersion,
+ [string]$minimumVersion,
+ [string]$maximumVersion,
+ [string]$lessThanVersion
+ )
+
+ begin {
+ }
+
+ process {
+ $result = $true
+
+ # If no version is specified simply return true and allow the module to pass.
+ if("$minimumVersion$maximumVersion$lessthanVersion" -eq ''){
+ return $true
+ }
+
+ # Single integer values cannot be converted to type system.version.
+ # We convert to a string, and if there is a single character we know that
+ # we need to add a '.0' to the integer to make it convertable to a version.
+ if(![string]::IsNullOrEmpty($currentVersion)) {
+ if($currentVersion.ToString().Length -eq 1) {
+ [version]$currentVersion = "$currentVersion.0"
+ } else {
+ [version]$currentVersion = $currentVersion
+ }
+ }
+
+ if(![string]::IsNullOrEmpty($minimumVersion)) {
+ if($minimumVersion.ToString().Length -eq 1){
+ [version]$minimumVersion = "$minimumVersion.0"
+ } else {
+ [version]$minimumVersion = $minimumVersion
+ }
+
+ if($currentVersion.CompareTo($minimumVersion) -lt 0){
+ $result = $false
+ }
+ }
+
+ if(![string]::IsNullOrEmpty($maximumVersion)) {
+ if($maximumVersion.ToString().Length -eq 1) {
+ [version]$maximumVersion = "$maximumVersion.0"
+ } else {
+ [version]$maximumVersion = $maximumVersion
+ }
+
+ if ($currentVersion.CompareTo($maximumVersion) -gt 0) {
+ $result = $false
+ }
+ }
+
+ if(![string]::IsNullOrEmpty($lessThanVersion)) {
+ if($lessThanVersion.ToString().Length -eq 1) {
+ [version]$lessThanVersion = "$lessThanVersion.0"
+ } else {
+ [version]$lessThanVersion = $lessThanVersion
+ }
+
+ if($currentVersion.CompareTo($lessThanVersion) -ge 0) {
+ $result = $false
+ }
+ }
+
+ Write-Output $result
+ }
+
+ end {
+ }
+}
diff --git a/src/buildScripts/psake/4.8.0/private/WriteColoredOutput.ps1 b/src/buildScripts/psake/4.8.0/private/WriteColoredOutput.ps1
new file mode 100644
index 0000000..5c33ec6
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/WriteColoredOutput.ps1
@@ -0,0 +1,20 @@
+function WriteColoredOutput {
+ param(
+ [string] $message,
+ [System.ConsoleColor] $foregroundcolor
+ )
+
+ $currentConfig = GetCurrentConfigurationOrDefault
+ if ($currentConfig.coloredOutput -eq $true) {
+ if (($null -ne $Host.UI) -and ($null -ne $Host.UI.RawUI) -and ($null -ne $Host.UI.RawUI.ForegroundColor)) {
+ $previousColor = $Host.UI.RawUI.ForegroundColor
+ $Host.UI.RawUI.ForegroundColor = $foregroundcolor
+ }
+ }
+
+ $message
+
+ if ($null -ne $previousColor) {
+ $Host.UI.RawUI.ForegroundColor = $previousColor
+ }
+}
diff --git a/src/buildScripts/psake/4.8.0/private/WriteDocumentation.ps1 b/src/buildScripts/psake/4.8.0/private/WriteDocumentation.ps1
new file mode 100644
index 0000000..a131e54
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/WriteDocumentation.ps1
@@ -0,0 +1,26 @@
+function WriteDocumentation($showDetailed) {
+
+ $currentContext = $psake.context.Peek()
+
+ if ($currentContext.tasks.default) {
+ $defaultTaskDependencies = $currentContext.tasks.default.DependsOn
+ } else {
+ $defaultTaskDependencies = @()
+ }
+
+ $docs = GetTasksFromContext $currentContext |
+ Where-Object {$_.Name -ne 'default'} |
+ ForEach-Object {
+ $isDefault = $null
+ if ($defaultTaskDependencies -contains $_.Name) {
+ $isDefault = $true
+ }
+ return Add-Member -InputObject $_ 'Default' $isDefault -PassThru
+ }
+
+ if ($showDetailed) {
+ $docs | Sort-Object 'Name' | format-list -property Name,Alias,Description,@{Label="Depends On";Expression={$_.DependsOn -join ', '}},Default
+ } else {
+ $docs | Sort-Object 'Name' | format-table -autoSize -wrap -property Name,Alias,@{Label="Depends On";Expression={$_.DependsOn -join ', '}},Default,Description
+ }
+ }
diff --git a/src/buildScripts/psake/4.8.0/private/WriteTaskTimeSummary.ps1 b/src/buildScripts/psake/4.8.0/private/WriteTaskTimeSummary.ps1
new file mode 100644
index 0000000..732a2d6
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/private/WriteTaskTimeSummary.ps1
@@ -0,0 +1,34 @@
+function WriteTaskTimeSummary($invokePsakeDuration) {
+ if ($psake.context.count -gt 0) {
+ $currentContext = $psake.context.Peek()
+ if ($currentContext.config.taskNameFormat -is [ScriptBlock]) {
+ & $currentContext.config.taskNameFormat "Build Time Report"
+ } elseif ($currentContext.config.taskNameFormat -ne "Executing {0}") {
+ $currentContext.config.taskNameFormat -f "Build Time Report"
+ }
+ else {
+ "-" * 70
+ "Build Time Report"
+ "-" * 70
+ }
+ $list = @()
+ while ($currentContext.executedTasks.Count -gt 0) {
+ $taskKey = $currentContext.executedTasks.Pop()
+ $task = $currentContext.tasks.$taskKey
+ if ($taskKey -eq "default") {
+ continue
+ }
+ $list += new-object PSObject -property @{
+ Name = $task.Name;
+ Duration = $task.Duration.ToString("hh\:mm\:ss\.fff")
+ }
+ }
+ [Array]::Reverse($list)
+ $list += new-object PSObject -property @{
+ Name = "Total:";
+ Duration = $invokePsakeDuration.ToString("hh\:mm\:ss\.fff")
+ }
+ # using "out-string | where-object" to filter out the blank line that format-table prepends
+ $list | format-table -autoSize -property Name,Duration | out-string -stream | where-object { $_ }
+ }
+}
diff --git a/src/buildScripts/psake/4.8.0/psake b/src/buildScripts/psake/4.8.0/psake
new file mode 100644
index 0000000..e2cbfc5
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/psake
@@ -0,0 +1,12 @@
+#!/usr/bin/env sh
+
+# Use greadlink on macOS.
+if [ "$(uname)" = "Darwin" ]; then
+ which greadlink > /dev/null || {
+ printf 'GNU readlink not found\n'
+ exit 1
+ }
+ alias readlink="greadlink"
+fi
+
+pwsh -NoProfile -Command "& $(dirname "$(readlink -f -- "$0")")/psake.ps1 $@"
diff --git a/src/buildScripts/psake/4.8.0/psake-config.ps1 b/src/buildScripts/psake/4.8.0/psake-config.ps1
new file mode 100644
index 0000000..2c5001f
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/psake-config.ps1
@@ -0,0 +1,22 @@
+<#
+-------------------------------------------------------------------
+Defaults
+-------------------------------------------------------------------
+$config.buildFileName="psakefile.ps1"
+$config.legacyBuildFileName="default.ps1"
+$config.framework = "4.0"
+$config.taskNameFormat="Executing {0}"
+$config.verboseError=$false
+$config.coloredOutput = $true
+$config.modules=$null
+
+-------------------------------------------------------------------
+Load modules from .\modules folder and from file my_module.psm1
+-------------------------------------------------------------------
+$config.modules=(".\modules\*.psm1",".\my_module.psm1")
+
+-------------------------------------------------------------------
+Use scriptblock for taskNameFormat
+-------------------------------------------------------------------
+$config.taskNameFormat= { param($taskName) "Executing $taskName at $(get-date)" }
+#>
diff --git a/src/buildScripts/psake/4.8.0/psake.cmd b/src/buildScripts/psake/4.8.0/psake.cmd
new file mode 100644
index 0000000..634314e
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/psake.cmd
@@ -0,0 +1,14 @@
+@echo off
+rem Helper script for those who want to run psake from cmd.exe
+rem Example run from cmd.exe:
+rem psake "psakefile.ps1" "BuildHelloWord" "4.0"
+
+if '%1'=='/?' goto help
+if '%1'=='-help' goto help
+if '%1'=='-h' goto help
+
+powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\psake.ps1' %*"
+exit /B %errorlevel%
+
+:help
+powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\psake.ps1' -help"
diff --git a/src/buildScripts/psake/4.8.0/psake.ps1 b/src/buildScripts/psake/4.8.0/psake.ps1
new file mode 100644
index 0000000..0fe9e6f
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/psake.ps1
@@ -0,0 +1,71 @@
+# Helper script for those who want to run psake without importing the module.
+# Example run from PowerShell:
+# .\psake.ps1 "psakefile.ps1" "BuildHelloWord" "4.0"
+
+# Must match parameter definitions for psake.psm1/invoke-psake
+# otherwise named parameter binding fails
+[cmdletbinding()]
+param(
+ [Parameter(Position = 0, Mandatory = $false)]
+ [string]$buildFile,
+
+ [Parameter(Position = 1, Mandatory = $false)]
+ [string[]]$taskList = @(),
+
+ [Parameter(Position = 2, Mandatory = $false)]
+ [string]$framework,
+
+ [Parameter(Position = 3, Mandatory = $false)]
+ [switch]$docs = $false,
+
+ [Parameter(Position = 4, Mandatory = $false)]
+ [System.Collections.Hashtable]$parameters = @{},
+
+ [Parameter(Position = 5, Mandatory = $false)]
+ [System.Collections.Hashtable]$properties = @{},
+
+ [Parameter(Position = 6, Mandatory = $false)]
+ [alias("init")]
+ [scriptblock]$initialization = {},
+
+ [Parameter(Position = 7, Mandatory = $false)]
+ [switch]$nologo = $false,
+
+ [Parameter(Position = 8, Mandatory = $false)]
+ [switch]$help = $false,
+
+ [Parameter(Position = 9, Mandatory = $false)]
+ [string]$scriptPath,
+
+ [Parameter(Position = 10, Mandatory = $false)]
+ [switch]$detailedDocs = $false,
+
+ [Parameter(Position = 11, Mandatory = $false)]
+ [switch]$notr = $false
+)
+
+# setting $scriptPath here, not as default argument, to support calling as "powershell -File psake.ps1"
+if (-not $scriptPath) {
+ $scriptPath = $(Split-Path -Path $MyInvocation.MyCommand.path -Parent)
+}
+
+# '[p]sake' is the same as 'psake' but $Error is not polluted
+Remove-Module -Name [p]sake -Verbose:$false
+Import-Module -Name (Join-Path -Path $scriptPath -ChildPath 'psake.psd1') -Verbose:$false
+if ($help) {
+ Get-Help -Name Invoke-psake -Full
+ return
+}
+
+if ($buildFile -and (-not (Test-Path -Path $buildFile))) {
+ $absoluteBuildFile = (Join-Path -Path $scriptPath -ChildPath $buildFile)
+ if (Test-path -Path $absoluteBuildFile) {
+ $buildFile = $absoluteBuildFile
+ }
+}
+
+Invoke-psake $buildFile $taskList $framework $docs $parameters $properties $initialization $nologo $detailedDocs $notr
+
+if (!$psake.build_success) {
+ exit 1
+}
diff --git a/src/buildScripts/psake/4.8.0/psake.psd1 b/src/buildScripts/psake/4.8.0/psake.psd1
new file mode 100644
index 0000000..ab339f2
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/psake.psd1
@@ -0,0 +1,33 @@
+@{
+ RootModule = 'psake.psm1'
+ ModuleVersion = '4.8.0'
+ GUID = 'cfb53216-072f-4a46-8975-ff7e6bda05a5'
+ Author = 'James Kovacs'
+ Copyright = 'Copyright (c) 2010-18 James Kovacs, Damian Hickey, Brandon Olin, and Contributors'
+ PowerShellVersion = '3.0'
+ Description = 'psake is a build automation tool written in PowerShell.'
+ FunctionsToExport = @(
+ 'Invoke-psake'
+ 'Invoke-Task'
+ 'Get-PSakeScriptTasks'
+ 'Task'
+ 'Properties'
+ 'Include'
+ 'FormatTaskName'
+ 'TaskSetup'
+ 'TaskTearDown'
+ 'Framework'
+ 'Assert'
+ 'Exec'
+ )
+ VariablesToExport = 'psake'
+ PrivateData = @{
+ PSData = @{
+ ReleaseNotes = 'https://raw.githubusercontent.com/psake/psake/master/CHANGELOG.md'
+ LicenseUri = 'https://raw.githubusercontent.com/psake/psake/master/license.txt'
+ ProjectUri = 'https://github.com/psake/psake'
+ Tags = @('Build', 'Task')
+ IconUri = 'https://raw.githubusercontent.com/psake/graphics/master/png/psake-single-icon-teal-bg-256x256.png'
+ }
+ }
+}
diff --git a/src/buildScripts/psake/4.8.0/psake.psm1 b/src/buildScripts/psake/4.8.0/psake.psm1
new file mode 100644
index 0000000..1d5f008
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/psake.psm1
@@ -0,0 +1,112 @@
+# psake
+# Copyright (c) 2012 James Kovacs
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+#Requires -Version 2.0
+
+if ($PSVersionTable.PSVersion.Major -ge 3) {
+ $script:IgnoreError = 'Ignore'
+} else {
+ $script:IgnoreError = 'SilentlyContinue'
+}
+
+$script:nl = [System.Environment]::NewLine
+
+# Dot source public/private functions
+$dotSourceParams = @{
+ Filter = '*.ps1'
+ Recurse = $true
+ ErrorAction = 'Stop'
+}
+$public = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -ChildPath 'public') @dotSourceParams )
+$private = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -ChildPath 'private/*.ps1') @dotSourceParams)
+foreach ($import in @($public + $private)) {
+ try {
+ . $import.FullName
+ } catch {
+ throw "Unable to dot source [$($import.FullName)]"
+ }
+}
+
+DATA msgs {
+ convertfrom-stringdata @'
+ error_invalid_task_name = Task name should not be null or empty string.
+ error_task_name_does_not_exist = Task {0} does not exist.
+ error_circular_reference = Circular reference found for task {0}.
+ error_missing_action_parameter = Action parameter must be specified when using PreAction or PostAction parameters for task {0}.
+ error_corrupt_callstack = Call stack was corrupt. Expected {0}, but got {1}.
+ error_invalid_framework = Invalid .NET Framework version, {0} specified.
+ error_unknown_framework = Unknown .NET Framework version, {0} specified in {1}.
+ error_unknown_pointersize = Unknown pointer size ({0}) returned from System.IntPtr.
+ error_unknown_bitnesspart = Unknown .NET Framework bitness, {0}, specified in {1}.
+ error_unknown_module = Unable to find module [{0}].
+ error_no_framework_install_dir_found = No .NET Framework installation directory found at {0}.
+ error_bad_command = Error executing command {0}.
+ error_default_task_cannot_have_action = 'default' task cannot specify an action.
+ error_shared_task_cannot_have_action = '{0} references a shared task from module {1} and cannot have an action.
+ error_duplicate_task_name = Task {0} has already been defined.
+ error_duplicate_alias_name = Alias {0} has already been defined.
+ error_invalid_include_path = Unable to include {0}. File not found.
+ error_build_file_not_found = Could not find the build file {0}.
+ error_no_default_task = 'default' task required.
+ error_loading_module = Error loading module {0}.
+ warning_deprecated_framework_variable = Warning: Using global variable $framework to set .NET framework version used is deprecated. Instead use Framework function or configuration file psake-config.ps1.
+ warning_missing_vsssetup_module = Warning: Cannot find build tools version {0} without the module VSSetup. You can install this module with the command: Install-Module VSSetup -Scope CurrentUser
+ required_variable_not_set = Variable {0} must be set to run task {1}.
+ postcondition_failed = Postcondition failed for task {0}.
+ precondition_was_false = Precondition was false, not executing task {0}.
+ continue_on_error = Error in task {0}. {1}
+ psake_success = psake succeeded executing {0}
+'@
+}
+
+Import-LocalizedData -BindingVariable msgs -FileName messages.psd1 -ErrorAction $script:IgnoreError
+
+$scriptDir = Split-Path $MyInvocation.MyCommand.Path
+$manifestPath = Join-Path $scriptDir psake.psd1
+$manifest = Test-ModuleManifest -Path $manifestPath -WarningAction SilentlyContinue
+
+$script:psakeConfigFile = 'psake-config.ps1'
+
+$script:psake = @{}
+
+$psake.version = $manifest.Version.ToString()
+$psake.context = new-object system.collections.stack # holds onto the current state of all variables
+$psake.run_by_psake_build_tester = $false # indicates that build is being run by psake-BuildTester
+$psake.LoadedTaskModules = @{}
+$psake.ReferenceTasks = @{}
+$psake.config_default = new-object psobject -property @{
+ buildFileName = "psakefile.ps1"
+ legacyBuildFileName = "default.ps1"
+ framework = "4.0"
+ taskNameFormat = "Executing {0}"
+ verboseError = $false
+ coloredOutput = $true
+ modules = $null
+ moduleScope = ""
+} # contains default configuration, can be overridden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script
+
+$psake.build_success = $false # indicates that the current build was successful
+$psake.build_script_file = $null # contains a System.IO.FileInfo for the current build script
+$psake.build_script_dir = "" # contains a string with fully-qualified path to current build script
+$psake.error_message = $null # contains the error message which caused the script to fail
+
+LoadConfiguration
+
+export-modulemember -function $public.BaseName -variable psake
diff --git a/src/buildScripts/psake/4.8.0/public/Assert.ps1 b/src/buildScripts/psake/4.8.0/public/Assert.ps1
new file mode 100644
index 0000000..471e561
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/public/Assert.ps1
@@ -0,0 +1,71 @@
+function Assert {
+ <#
+ .SYNOPSIS
+ Helper function for "Design by Contract" assertion checking.
+
+ .DESCRIPTION
+ This is a helper function that makes the code less noisy by eliminating many of the "if" statements that are normally required to verify assumptions in the code.
+
+ .PARAMETER conditionToCheck
+ The boolean condition to evaluate
+
+ .PARAMETER failureMessage
+ The error message used for the exception if the conditionToCheck parameter is false
+
+ .EXAMPLE
+ C:\PS>Assert $false "This always throws an exception"
+
+ Example of an assertion that will always fail.
+
+ .EXAMPLE
+ C:\PS>Assert ( ($i % 2) -eq 0 ) "$i is not an even number"
+
+ This exmaple may throw an exception if $i is not an even number
+
+ Note:
+ It might be necessary to wrap the condition with paranthesis to force PS to evaluate the condition
+ so that a boolean value is calculated and passed into the 'conditionToCheck' parameter.
+
+ Example:
+ Assert 1 -eq 2 "1 doesn't equal 2"
+
+ PS will pass 1 into the condtionToCheck variable and PS will look for a parameter called "eq" and
+ throw an exception with the following message "A parameter cannot be found that matches parameter name 'eq'"
+
+ The solution is to wrap the condition in () so that PS will evaluate it first.
+
+ Assert (1 -eq 2) "1 doesn't equal 2"
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ $conditionToCheck,
+
+ [Parameter(Mandatory = $true)]
+ [string]$failureMessage
+ )
+
+ if (-not $conditionToCheck) {
+ throw ('Assert: {0}' -f $failureMessage)
+ }
+}
diff --git a/src/buildScripts/psake/4.8.0/public/Exec.ps1 b/src/buildScripts/psake/4.8.0/public/Exec.ps1
new file mode 100644
index 0000000..52e8c85
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/public/Exec.ps1
@@ -0,0 +1,109 @@
+function Exec {
+ <#
+ .SYNOPSIS
+ Helper function for executing command-line programs.
+
+ .DESCRIPTION
+ This is a helper function that runs a scriptblock and checks the PS variable $lastexitcode to see if an error occcured.
+ If an error is detected then an exception is thrown.
+ This function allows you to run command-line programs without having to explicitly check fthe $lastexitcode variable.
+
+ .PARAMETER cmd
+ The scriptblock to execute. This scriptblock will typically contain the command-line invocation.
+
+ .PARAMETER errorMessage
+ The error message to display if the external command returned a non-zero exit code.
+
+ .PARAMETER maxRetries
+ The maximum number of times to retry the command before failing.
+
+ .PARAMETER retryTriggerErrorPattern
+ If the external command raises an exception, match the exception against this regex to determine if the command can be retried.
+ If a match is found, the command will be retried provided [maxRetries] has not been reached.
+
+ .PARAMETER workingDirectory
+ The working directory to set before running the external command.
+
+ .EXAMPLE
+ exec { svn info $repository_trunk } "Error executing SVN. Please verify SVN command-line client is installed"
+
+ This example calls the svn command-line client.
+ .LINK
+ Assert
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ .LINK
+ Properties
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [scriptblock]$cmd,
+
+ [string]$errorMessage = ($msgs.error_bad_command -f $cmd),
+
+ [int]$maxRetries = 0,
+
+ [string]$retryTriggerErrorPattern = $null,
+
+ [string]$workingDirectory = $null
+ )
+
+ if ($workingDirectory) {
+ Push-Location -Path $workingDirectory
+ }
+
+ $tryCount = 1
+
+ do {
+ try {
+ $global:lastexitcode = 0
+ & $cmd
+ if ($global:lastexitcode -ne 0) {
+ throw "Exec: $errorMessage"
+ }
+ break
+ }
+ catch [Exception] {
+ if ($tryCount -gt $maxRetries) {
+ throw $_
+ }
+
+ if ($retryTriggerErrorPattern -ne $null) {
+ $isMatch = [regex]::IsMatch($_.Exception.Message, $retryTriggerErrorPattern)
+
+ if ($isMatch -eq $false) {
+ throw $_
+ }
+ }
+
+ "Try $tryCount failed, retrying again in 1 second..."
+
+ $tryCount++
+
+ [System.Threading.Thread]::Sleep([System.TimeSpan]::FromSeconds(1))
+ }
+ finally {
+ if ($workingDirectory) {
+ Pop-Location
+ }
+ }
+ }
+ while ($true)
+}
diff --git a/src/buildScripts/psake/4.8.0/public/FormatTaskName.ps1 b/src/buildScripts/psake/4.8.0/public/FormatTaskName.ps1
new file mode 100644
index 0000000..a8be633
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/public/FormatTaskName.ps1
@@ -0,0 +1,95 @@
+function FormatTaskName {
+ <#
+ .SYNOPSIS
+ This function allows you to change how psake renders the task name during a build.
+
+ .DESCRIPTION
+ This function takes either a string which represents a format string (formats using the -f format operator see "help about_operators") or it can accept a script block that has a single parameter that is the name of the task that will be executed.
+
+ .PARAMETER format
+ A format string or a scriptblock to execute
+
+ .EXAMPLE
+ A sample build script that uses a format string is shown below:
+
+ Task default -depends TaskA, TaskB, TaskC
+
+ FormatTaskName "-------- {0} --------"
+
+ Task TaskA {
+ "TaskA is executing"
+ }
+
+ Task TaskB {
+ "TaskB is executing"
+ }
+
+ Task TaskC {
+ "TaskC is executing"
+
+ -----------
+ The script above produces the following output:
+
+ -------- TaskA --------
+ TaskA is executing
+ -------- TaskB --------
+ TaskB is executing
+ -------- TaskC --------
+ TaskC is executing
+
+ Build Succeeded!
+ .EXAMPLE
+ A sample build script that uses a ScriptBlock is shown below:
+
+ Task default -depends TaskA, TaskB, TaskC
+
+ FormatTaskName {
+ param($taskName)
+ write-host "Executing Task: $taskName" -foregroundcolor blue
+ }
+
+ Task TaskA {
+ "TaskA is executing"
+ }
+
+ Task TaskB {
+ "TaskB is executing"
+ }
+
+ Task TaskC {
+ "TaskC is executing"
+ }
+
+ -----------
+ The above example uses the scriptblock parameter to the FormatTaskName function to render each task name in the color blue.
+
+ Note: the $taskName parameter is arbitrary, it could be named anything.
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ $format
+ )
+
+ $psake.context.Peek().config.taskNameFormat = $format
+}
diff --git a/src/buildScripts/psake/4.8.0/public/Framework.ps1 b/src/buildScripts/psake/4.8.0/public/Framework.ps1
new file mode 100644
index 0000000..304bb06
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/public/Framework.ps1
@@ -0,0 +1,55 @@
+function Framework {
+ <#
+ .SYNOPSIS
+ Sets the version of the .NET framework you want to use during build.
+
+ .DESCRIPTION
+ This function will accept a string containing version of the .NET framework to use during build.
+ Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x64', '4.5', '4.5x86', '4.5x64', '4.5.1', '4.5.1x86', '4.5.1x64'.
+ Default is '3.5*', where x86 or x64 will be detected based on the bitness of the PowerShell process.
+
+ .PARAMETER framework
+ Version of the .NET framework to use during build.
+
+ .EXAMPLE
+ Framework "4.0"
+
+ Task default -depends Compile
+
+ Task Compile -depends Clean {
+ msbuild /version
+ }
+
+ -----------
+ The script above will output detailed version of msbuid v4
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$framework
+ )
+
+ $psake.context.Peek().config.framework = $framework
+
+ ConfigureBuildEnvironment
+}
diff --git a/src/buildScripts/psake/4.8.0/public/Get-PSakeScriptTasks.ps1 b/src/buildScripts/psake/4.8.0/public/Get-PSakeScriptTasks.ps1
new file mode 100644
index 0000000..e0f8f96
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/public/Get-PSakeScriptTasks.ps1
@@ -0,0 +1,45 @@
+function Get-PSakeScriptTasks {
+ <#
+ .SYNOPSIS
+ Returns meta data about all the tasks defined in the provided psake script.
+
+ .DESCRIPTION
+ Returns meta data about all the tasks defined in the provided psake script.
+
+ .PARAMETER buildFile
+ The path to the psake build script to read the tasks from.
+
+ .EXAMPLE
+ PS C:\>Get-PSakeScriptTasks -buildFile '.\build.ps1'
+
+ DependsOn Alias Name Description
+ --------- ----- ---- -----------
+ {} Compile
+ {} Clean
+ {Test} Default
+ {Clean, Compile} Test
+
+ Gets the psake tasks contained in the 'build.ps1' file.
+
+ .LINK
+ Invoke-psake
+ #>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseSingularNouns', '')]
+ [CmdletBinding()]
+ param(
+ [string]$buildFile
+ )
+
+ if (-not $buildFile) {
+ $buildFile = $psake.config_default.buildFileName
+ }
+
+ try {
+ ExecuteInBuildFileScope $buildFile $MyInvocation.MyCommand.Module {
+ param($currentContext, $module)
+ return GetTasksFromContext $currentContext
+ }
+ } finally {
+ CleanupEnvironment
+ }
+}
diff --git a/src/buildScripts/psake/4.8.0/public/Include.ps1 b/src/buildScripts/psake/4.8.0/public/Include.ps1
new file mode 100644
index 0000000..3c163fe
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/public/Include.ps1
@@ -0,0 +1,64 @@
+function Include {
+ <#
+ .SYNOPSIS
+ Include the functions or code of another powershell script file into the current build script's scope
+
+ .DESCRIPTION
+ A build script may declare an "includes" function which allows you to define a file containing powershell code to be included
+ and added to the scope of the currently running build script. Code from such file will be executed after code from build script.
+
+ .PARAMETER fileNamePathToInclude
+ A string containing the path and name of the powershell file to include
+
+ .EXAMPLE
+ A sample build script is shown below:
+
+ Include ".\build_utils.ps1"
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ -----------
+ The script above includes all the functions and variables defined in the ".\build_utils.ps1" script into the current build script's scope
+
+ Note: You can have more than 1 "Include" function defined in the build script.
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$fileNamePathToInclude
+ )
+
+ Assert (test-path $fileNamePathToInclude -pathType Leaf) ($msgs.error_invalid_include_path -f $fileNamePathToInclude)
+
+ $psake.context.Peek().includes.Enqueue((Resolve-Path $fileNamePathToInclude));
+}
diff --git a/src/buildScripts/psake/4.8.0/public/Invoke-Task.ps1 b/src/buildScripts/psake/4.8.0/public/Invoke-Task.ps1
new file mode 100644
index 0000000..e441170
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/public/Invoke-Task.ps1
@@ -0,0 +1,158 @@
+function Invoke-Task {
+ <#
+ .SYNOPSIS
+ Executes another task in the current build script.
+
+ .DESCRIPTION
+ This is a function that will allow you to invoke a Task from within another Task in the current build script.
+
+ .PARAMETER taskName
+ The name of the task to execute.
+
+ .EXAMPLE
+ Invoke-Task "Compile"
+
+ This example calls the "Compile" task.
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [string]$taskName
+ )
+
+ Assert $taskName ($msgs.error_invalid_task_name)
+
+ $taskKey = $taskName.ToLower()
+
+ $currentContext = $psake.context.Peek()
+
+ if ($currentContext.aliases.Contains($taskKey)) {
+ $taskName = $currentContext.aliases.$taskKey.Name
+ $taskKey = $taskName.ToLower()
+ }
+
+ Assert ($currentContext.tasks.Contains($taskKey)) ($msgs.error_task_name_does_not_exist -f $taskName)
+
+ if ($currentContext.executedTasks.Contains($taskKey)) { return }
+
+ Assert (!$currentContext.callStack.Contains($taskKey)) ($msgs.error_circular_reference -f $taskName)
+
+ $currentContext.callStack.Push($taskKey)
+
+ $task = $currentContext.tasks.$taskKey
+
+ $precondition_is_valid = & $task.Precondition
+
+ if (!$precondition_is_valid) {
+ WriteColoredOutput ($msgs.precondition_was_false -f $taskName) -foregroundcolor Cyan
+ } else {
+ if ($taskKey -ne 'default') {
+
+ if ($task.PreAction -or $task.PostAction) {
+ Assert ($null -ne $task.Action) ($msgs.error_missing_action_parameter -f $taskName)
+ }
+
+ if ($task.Action) {
+
+ $stopwatch = new-object System.Diagnostics.Stopwatch
+
+ try {
+ foreach($childTask in $task.DependsOn) {
+ Invoke-Task $childTask
+ }
+ $stopwatch.Start()
+
+ $currentContext.currentTaskName = $taskName
+
+ try {
+ & $currentContext.taskSetupScriptBlock @($task)
+ try {
+ if ($task.PreAction) {
+ & $task.PreAction
+ }
+
+ if ($currentContext.config.taskNameFormat -is [ScriptBlock]) {
+ $taskHeader = & $currentContext.config.taskNameFormat $taskName
+ } else {
+ $taskHeader = $currentContext.config.taskNameFormat -f $taskName
+ }
+ WriteColoredOutput $taskHeader -foregroundcolor Cyan
+
+ foreach ($variable in $task.requiredVariables) {
+ Assert ((Test-Path "variable:$variable") -and ($null -ne (Get-Variable $variable).Value)) ($msgs.required_variable_not_set -f $variable, $taskName)
+ }
+
+ & $task.Action
+ } finally {
+ if ($task.PostAction) {
+ & $task.PostAction
+ }
+ }
+ } catch {
+ # want to catch errors here _before_ we invoke TaskTearDown
+ # so that TaskTearDown reliably gets the Task-scoped
+ # success/fail/error context.
+ $task.Success = $false
+ $task.ErrorMessage = $_
+ $task.ErrorDetail = $_ | Out-String
+ $task.ErrorFormatted = FormatErrorMessage $_
+
+ throw $_ # pass this up the chain; cleanup is handled higher int he stack
+ } finally {
+ & $currentContext.taskTearDownScriptBlock $task
+ }
+ } catch {
+ if ($task.ContinueOnError) {
+ "-"*70
+ WriteColoredOutput ($msgs.continue_on_error -f $taskName,$_) -foregroundcolor Yellow
+ "-"*70
+ [void]$currentContext.callStack.Pop()
+ } else {
+ throw $_
+ }
+ } finally {
+ $task.Duration = $stopwatch.Elapsed
+ }
+ } else {
+ # no action was specified but we still execute all the dependencies
+ foreach($childTask in $task.DependsOn) {
+ Invoke-Task $childTask
+ }
+ }
+ } else {
+ foreach($childTask in $task.DependsOn) {
+ Invoke-Task $childTask
+ }
+ }
+
+ Assert (& $task.Postcondition) ($msgs.postcondition_failed -f $taskName)
+ }
+
+ $poppedTaskKey = $currentContext.callStack.Pop()
+ Assert ($poppedTaskKey -eq $taskKey) ($msgs.error_corrupt_callstack -f $taskKey,$poppedTaskKey)
+
+ $currentContext.executedTasks.Push($taskKey)
+}
diff --git a/src/buildScripts/psake/4.8.0/public/Invoke-psake.ps1 b/src/buildScripts/psake/4.8.0/public/Invoke-psake.ps1
new file mode 100644
index 0000000..b9119db
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/public/Invoke-psake.ps1
@@ -0,0 +1,336 @@
+function Invoke-psake {
+ <#
+ .SYNOPSIS
+ Runs a psake build script.
+
+ .DESCRIPTION
+ This function runs a psake build script
+
+ .PARAMETER buildFile
+ The path to the psake build script to execute
+
+ .PARAMETER taskList
+ A comma-separated list of task names to execute
+
+ .PARAMETER framework
+ The version of the .NET framework you want to use during build. You can append x86 or x64 to force a specific framework.
+ If not specified, x86 or x64 will be detected based on the bitness of the PowerShell process.
+ Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x64', '4.5', '4.5x86', '4.5x64', '4.5.1', '4.5.1x86', '4.5.1x64'
+
+ .PARAMETER docs
+ Prints a list of tasks and their descriptions
+
+ .PARAMETER parameters
+ A hashtable containing parameters to be passed into the current build script.
+ These parameters will be processed before the 'Properties' function of the script is processed.
+ This means you can access parameters from within the 'Properties' function!
+
+ .PARAMETER properties
+ A hashtable containing properties to be passed into the current build script.
+ These properties will override matching properties that are found in the 'Properties' function of the script.
+
+ .PARAMETER initialization
+ Parameter description
+
+ .PARAMETER nologo
+ Do not display the startup banner and copyright message.
+
+ .PARAMETER detailedDocs
+ Prints a more descriptive list of tasks and their descriptions.
+
+ .PARAMETER notr
+ Do not display the time report.
+
+ .EXAMPLE
+ Invoke-psake
+
+ Runs the 'default' task in the '.build.ps1' build script
+
+ .EXAMPLE
+ Invoke-psake '.\build.ps1' Tests,Package
+
+ Runs the 'Tests' and 'Package' tasks in the '.build.ps1' build script
+
+ .EXAMPLE
+ Invoke-psake Tests
+
+ This example will run the 'Tests' tasks in the 'psakefile.ps1' build script. The 'psakefile.ps1' is assumed to be in the current directory.
+
+ .EXAMPLE
+ Invoke-psake 'Tests, Package'
+
+ This example will run the 'Tests' and 'Package' tasks in the 'psakefile.ps1' build script. The 'psakefile.ps1' is assumed to be in the current directory.
+
+ .EXAMPLE
+ Invoke-psake .\build.ps1 -docs
+
+ Prints a report of all the tasks and their dependencies and descriptions and then exits
+
+ .EXAMPLE
+ Invoke-psake .\parameters.ps1 -parameters @{"p1"="v1";"p2"="v2"}
+
+ Runs the build script called 'parameters.ps1' and passes in parameters 'p1' and 'p2' with values 'v1' and 'v2'
+
+ Here's the .\parameters.ps1 build script:
+
+ properties {
+ $my_property = $p1 + $p2
+ }
+
+ task default -depends TestParams
+
+ task TestParams {
+ Assert ($my_property -ne $null) '$my_property should not be null'
+ }
+
+ Notice how you can refer to the parameters that were passed into the script from within the "properties" function.
+ The value of the $p1 variable should be the string "v1" and the value of the $p2 variable should be "v2".
+
+ .EXAMPLE
+ Invoke-psake .\properties.ps1 -properties @{"x"="1";"y"="2"}
+
+ Runs the build script called 'properties.ps1' and passes in parameters 'x' and 'y' with values '1' and '2'
+
+ This feature allows you to override existing properties in your build script.
+
+ Here's the .\properties.ps1 build script:
+
+ properties {
+ $x = $null
+ $y = $null
+ $z = $null
+ }
+
+ task default -depends TestProperties
+
+ task TestProperties {
+ Assert ($x -ne $null) "x should not be null"
+ Assert ($y -ne $null) "y should not be null"
+ Assert ($z -eq $null) "z should be null"
+ }
+
+ .NOTES
+ ---- Exceptions ----
+
+ If there is an exception thrown during the running of a build script psake will set the '$psake.build_success' variable to $false.
+ To detect failue outside PowerShell (for example by build server), finish PowerShell process with non-zero exit code when '$psake.build_success' is $false.
+ Calling psake from 'cmd.exe' with 'psake.cmd' will give you that behaviour.
+
+ ---- $psake variable ----
+
+ When the psake module is loaded a variable called $psake is created which is a hashtable
+ containing some variables:
+
+ $psake.version # contains the current version of psake
+ $psake.context # holds onto the current state of all variables
+ $psake.run_by_psake_build_tester # indicates that build is being run by psake-BuildTester
+ $psake.config_default # contains default configuration
+ # can be overriden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script
+ $psake.build_success # indicates that the current build was successful
+ $psake.build_script_file # contains a System.IO.FileInfo for the current build script
+ $psake.build_script_dir # contains the fully qualified path to the current build script
+ $psake.error_message # contains the error message which caused the script to fail
+
+ You should see the following when you display the contents of the $psake variable right after importing psake
+
+ PS projects:\psake\> Import-Module .\psake.psm1
+ PS projects:\psake\> $psake
+
+ Name Value
+ ---- -----
+ run_by_psake_build_tester False
+ version 4.2
+ build_success False
+ build_script_file
+ build_script_dir
+ config_default @{framework=3.5; ...
+ context {}
+ error_message
+
+ After a build is executed the following $psake values are updated: build_script_file, build_script_dir, build_success
+
+ PS projects:\psake\> Invoke-psake .\examples\psakefile.ps1
+ Executing task: Clean
+ Executed Clean!
+ Executing task: Compile
+ Executed Compile!
+ Executing task: Test
+ Executed Test!
+
+ Build Succeeded!
+
+ ----------------------------------------------------------------------
+ Build Time Report
+ ----------------------------------------------------------------------
+ Name Duration
+ ---- --------
+ Clean 00:00:00.0798486
+ Compile 00:00:00.0869948
+ Test 00:00:00.0958225
+ Total: 00:00:00.2712414
+
+ PS projects:\psake\> $psake
+
+ Name Value
+ ---- -----
+ build_script_file YOUR_PATH\examples\psakefile.ps1
+ run_by_psake_build_tester False
+ build_script_dir YOUR_PATH\examples
+ context {}
+ version 4.2
+ build_success True
+ config_default @{framework=3.5; ...
+ error_message
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ .LINK
+ Properties
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Position = 0, Mandatory = $false)]
+ [string]$buildFile,
+
+ [Parameter(Position = 1, Mandatory = $false)]
+ [string[]]$taskList = @(),
+
+ [Parameter(Position = 2, Mandatory = $false)]
+ [string]$framework,
+
+ [Parameter(Position = 3, Mandatory = $false)]
+ [switch]$docs = $false,
+
+ [Parameter(Position = 4, Mandatory = $false)]
+ [hashtable]$parameters = @{},
+
+ [Parameter(Position = 5, Mandatory = $false)]
+ [hashtable]$properties = @{},
+
+ [Parameter(Position = 6, Mandatory = $false)]
+ [alias("init")]
+ [scriptblock]$initialization = {},
+
+ [Parameter(Position = 7, Mandatory = $false)]
+ [switch]$nologo,
+
+ [Parameter(Position = 8, Mandatory = $false)]
+ [switch]$detailedDocs,
+
+ [Parameter(Position = 9, Mandatory = $false)]
+ [switch]$notr # disable time report
+ )
+
+ try {
+ if (-not $nologo) {
+ "psake version {0}$($script:nl)Copyright (c) 2010-2018 James Kovacs & Contributors$($script:nl)" -f $psake.version
+ }
+ if (!$buildFile) {
+ $buildFile = Get-DefaultBuildFile
+ }
+ elseif (!(Test-Path $buildFile -PathType Leaf) -and ($null -ne (Get-DefaultBuildFile -UseDefaultIfNoneExist $false))) {
+ # If the default file exists and the given "buildfile" isn't found assume that the given
+ # $buildFile is actually the target Tasks to execute in the $config.buildFileName script.
+ $taskList = $buildFile.Split(', ')
+ $buildFile = Get-DefaultBuildFile
+ }
+
+ $psake.error_message = $null
+
+ ExecuteInBuildFileScope $buildFile $MyInvocation.MyCommand.Module {
+ param($currentContext, $module)
+
+ $stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
+
+ if ($docs -or $detailedDocs) {
+ WriteDocumentation($detailedDocs)
+ return
+ }
+
+ try {
+ foreach ($key in $parameters.keys) {
+ if (test-path "variable:\$key") {
+ set-item -path "variable:\$key" -value $parameters.$key -WhatIf:$false -Confirm:$false | out-null
+ } else {
+ new-item -path "variable:\$key" -value $parameters.$key -WhatIf:$false -Confirm:$false | out-null
+ }
+ }
+ } catch {
+ WriteColoredOutput "Parameter '$key' is null" -foregroundcolor Red
+ throw
+ }
+
+ # The initial dot (.) indicates that variables initialized/modified in the propertyBlock are available in the parent scope.
+ while ($currentContext.properties.Count -gt 0) {
+ $propertyBlock = $currentContext.properties.Pop()
+ . $propertyBlock
+ }
+
+ foreach ($key in $properties.keys) {
+ if (test-path "variable:\$key") {
+ set-item -path "variable:\$key" -value $properties.$key -WhatIf:$false -Confirm:$false | out-null
+ }
+ }
+
+ # Simple dot sourcing will not work. We have to force the script block into our
+ # module's scope in order to initialize variables properly.
+ . $module $initialization
+
+ # Execute the list of tasks or the default task
+ if ($taskList) {
+ foreach ($task in $taskList) {
+ invoke-task $task
+ }
+ } elseif ($currentContext.tasks.default) {
+ invoke-task default
+ } else {
+ throw $msgs.error_no_default_task
+ }
+
+ $successMsg = $msgs.psake_success -f $buildFile
+ WriteColoredOutput ("$($script:nl)${successMsg}$($script:nl)") -foregroundcolor Green
+
+ $stopwatch.Stop()
+ if (-not $notr) {
+ WriteTaskTimeSummary $stopwatch.Elapsed
+ }
+ }
+
+ $psake.build_success = $true
+
+ } catch {
+ $psake.build_success = $false
+ $psake.error_message = FormatErrorMessage $_
+
+ # if we are running in a nested scope (i.e. running a psake script from a psake script) then we need to re-throw the exception
+ # so that the parent script will fail otherwise the parent script will report a successful build
+ $inNestedScope = ($psake.context.count -gt 1)
+ if ( $inNestedScope ) {
+ throw $_
+ } else {
+ if (!$psake.run_by_psake_build_tester) {
+ WriteColoredOutput $psake.error_message -foregroundcolor Red
+ }
+ }
+ } finally {
+ CleanupEnvironment
+ }
+}
diff --git a/src/buildScripts/psake/4.8.0/public/Properties.ps1 b/src/buildScripts/psake/4.8.0/public/Properties.ps1
new file mode 100644
index 0000000..0d4776b
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/public/Properties.ps1
@@ -0,0 +1,61 @@
+function Properties {
+ <#
+ .SYNOPSIS
+ Define a scriptblock that contains assignments to variables that will be available to all tasks in the build script
+
+ .DESCRIPTION
+ A build script may declare a "Properies" function which allows you to define variables that will be available to all the "Task" functions in the build script.
+
+ .PARAMETER properties
+ The script block containing all the variable assignment statements
+
+ .EXAMPLE
+ A sample build script is shown below:
+
+ Properties {
+ $build_dir = "c:\build"
+ $connection_string = "datasource=localhost;initial catalog=northwind;integrated security=sspi"
+ }
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ Note: You can have more than one "Properties" function defined in the build script.
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [scriptblock]$properties
+ )
+
+ $psake.context.Peek().properties.Push($properties)
+}
diff --git a/src/buildScripts/psake/4.8.0/public/Task.ps1 b/src/buildScripts/psake/4.8.0/public/Task.ps1
new file mode 100644
index 0000000..8a31084
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/public/Task.ps1
@@ -0,0 +1,331 @@
+function Task {
+ <#
+ .SYNOPSIS
+ Defines a build task to be executed by psake
+
+ .DESCRIPTION
+ This function creates a 'task' object that will be used by the psake engine to execute a build task.
+ Note: There must be at least one task called 'default' in the build script
+
+ .PARAMETER name
+ The name of the task
+
+ .PARAMETER action
+ A scriptblock containing the statements to execute for the task.
+
+ .PARAMETER preaction
+ A scriptblock to be executed before the 'Action' scriptblock.
+ Note: This parameter is ignored if the 'Action' scriptblock is not defined.
+
+ .PARAMETER postaction
+ A scriptblock to be executed after the 'Action' scriptblock.
+ Note: This parameter is ignored if the 'Action' scriptblock is not defined.
+
+ .PARAMETER precondition
+ A scriptblock that is executed to determine if the task is executed or skipped.
+ This scriptblock should return $true or $false
+
+ .PARAMETER postcondition
+ A scriptblock that is executed to determine if the task completed its job correctly.
+ An exception is thrown if the scriptblock returns $false.
+
+ .PARAMETER continueOnError
+ If this switch parameter is set then the task will not cause the build to fail when an exception is thrown by the task
+
+ .PARAMETER depends
+ An array of task names that this task depends on.
+ These tasks will be executed before the current task is executed.
+
+ .PARAMETER requiredVariables
+ An array of names of variables that must be set to run this task.
+
+ .PARAMETER description
+ A description of the task.
+
+ .PARAMETER alias
+ An alternate name for the task.
+
+ .PARAMETER FromModule
+ Load in the task from the specified PowerShell module.
+
+ .PARAMETER requiredVersion
+ The specific version of a module to load the task from
+
+ .PARAMETER minimumVersion
+ The minimum (inclusive) version of the PowerShell module to load in the task from.
+
+ .PARAMETER maximumVersion
+ The maximum (inclusive) version of the PowerShell module to load in the task from.
+
+ .PARAMETER lessThanVersion
+ The version of the PowerShell module to load in the task from that should not be met or exceeded. eg -lessThanVersion 2.0.0 will reject anything 2.0.0 or higher, allowing any module in the 1.x.x series.
+
+ .EXAMPLE
+ A sample build script is shown below:
+
+ Task default -Depends Test
+
+ Task Test -Depends Compile, Clean {
+ "This is a test"
+ }
+
+ Task Compile -Depends Clean {
+ "Compile"
+ }
+
+ Task Clean {
+ "Clean"
+ }
+
+ The 'default' task is required and should not contain an 'Action' parameter.
+ It uses the 'Depends' parameter to specify that 'Test' is a dependency
+
+ The 'Test' task uses the 'Depends' parameter to specify that 'Compile' and 'Clean' are dependencies
+ The 'Compile' task depends on the 'Clean' task.
+
+ Note:
+ The 'Action' parameter is defaulted to the script block following the 'Clean' task.
+
+ An equivalent 'Test' task is shown below:
+
+ Task Test -Depends Compile, Clean -Action {
+ $testMessage
+ }
+
+ The output for the above sample build script is shown below:
+
+ Executing task, Clean...
+ Clean
+ Executing task, Compile...
+ Compile
+ Executing task, Test...
+ This is a test
+
+ Build Succeeded!
+
+ ----------------------------------------------------------------------
+ Build Time Report
+ ----------------------------------------------------------------------
+ Name Duration
+ ---- --------
+ Clean 00:00:00.0065614
+ Compile 00:00:00.0133268
+ Test 00:00:00.0225964
+ Total: 00:00:00.0782496
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ TaskSetup
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding(DefaultParameterSetName = 'Normal')]
+ param(
+ [Parameter(Mandatory = $true, Position = 0)]
+ [string]$name,
+
+ [Parameter(Position = 1)]
+ [scriptblock]$action = $null,
+
+ [Parameter(Position = 2)]
+ [scriptblock]$preaction = $null,
+
+ [Parameter(Position = 3)]
+ [scriptblock]$postaction = $null,
+
+ [Parameter(Position = 4)]
+ [scriptblock]$precondition = {$true},
+
+ [Parameter(Position = 5)]
+ [scriptblock]$postcondition = {$true},
+
+ [Parameter(Position = 6)]
+ [switch]$continueOnError,
+
+ [ValidateNotNull()]
+ [Parameter(Position = 7)]
+ [string[]]$depends = @(),
+
+ [ValidateNotNull()]
+ [Parameter(Position = 8)]
+ [string[]]$requiredVariables = @(),
+
+ [Parameter(Position = 9)]
+ [string]$description = $null,
+
+ [Parameter(Position = 10)]
+ [string]$alias = $null,
+
+ [parameter(Mandatory = $true, ParameterSetName = 'SharedTask', Position = 11)]
+ [ValidateNotNullOrEmpty()]
+ [string]$FromModule,
+
+ [Alias('Version')]
+ [parameter(ParameterSetName = 'SharedTask', Position = 12)]
+ [string]$requiredVersion,
+
+ [parameter(ParameterSetName = 'SharedTask', Position = 13)]
+ [string]$minimumVersion,
+
+ [parameter(ParameterSetName = 'SharedTask', Position = 14)]
+ [string]$maximumVersion,
+
+ [parameter(ParameterSetName = 'SharedTask', Position = 15)]
+ [string]$lessThanVersion
+ )
+
+ function CreateTask {
+ @{
+ Name = $Name
+ DependsOn = $depends
+ PreAction = $preaction
+ Action = $action
+ PostAction = $postaction
+ Precondition = $precondition
+ Postcondition = $postcondition
+ ContinueOnError = $continueOnError
+ Description = $description
+ Duration = [System.TimeSpan]::Zero
+ RequiredVariables = $requiredVariables
+ Alias = $alias
+ Success = $true # let's be optimistic
+ ErrorMessage = $null
+ ErrorDetail = $null
+ ErrorFormatted = $null
+ }
+ }
+
+ # Default tasks have no action
+ if ($name -eq 'default') {
+ Assert (!$action) ($msgs.error_shared_task_cannot_have_action)
+ }
+
+ # Shared tasks have no action
+ if ($PSCmdlet.ParameterSetName -eq 'SharedTask') {
+ Assert (!$action) ($msgs.error_shared_task_cannot_have_action -f $Name, $FromModule)
+ }
+
+ $currentContext = $psake.context.Peek()
+
+ # Dot source the shared task module to load in its tasks
+ if ($PSCmdlet.ParameterSetName -eq 'SharedTask') {
+ $testModuleParams = @{
+ minimumVersion = $minimumVersion
+ maximumVersion = $maximumVersion
+ lessThanVersion = $lessThanVersion
+ }
+
+ if(![string]::IsNullOrEmpty($requiredVersion)){
+ $testModuleParams.minimumVersion = $requiredVersion
+ $testModuleParams.maximumVersion = $requiredVersion
+ }
+
+ if ($taskModule = Get-Module -Name $FromModule) {
+ # Use the task module that is already loaded into the session
+ $testModuleParams.currentVersion = $taskModule.Version
+ $taskModule = Where-Object -InputObject $taskModule -FilterScript {Test-ModuleVersion @testModuleParams}
+ } else {
+ # Find the module
+ $getModuleParams = @{
+ ListAvailable = $true
+ Name = $FromModule
+ ErrorAction = 'Ignore'
+ Verbose = $false
+ }
+ $taskModule = Get-Module @getModuleParams |
+ Where-Object -FilterScript {Test-ModuleVersion -currentVersion $_.Version @testModuleParams} |
+ Sort-Object -Property Version -Descending |
+ Select-Object -First 1
+ }
+
+ # This task references a task from a module
+ # This reference task "could" include extra data about the task such as
+ # additional dependOn, aliase, etc.
+ # Store this task to the side so after we load the real task, we can combine
+ # this extra data if nesessary
+ $referenceTask = CreateTask
+ Assert (-not $psake.ReferenceTasks.ContainsKey($referenceTask.Name)) ($msgs.error_duplicate_task_name -f $referenceTask.Name)
+ $referenceTaskKey = $referenceTask.Name.ToLower()
+ $psake.ReferenceTasks.Add($referenceTaskKey, $referenceTask)
+
+ # Load in tasks from shared module into staging area
+ Assert ($null -ne $taskModule) ($msgs.error_unknown_module -f $FromModule)
+ $psakeFilePath = Join-Path -Path $taskModule.ModuleBase -ChildPath 'psakeFile.ps1'
+ if (-not $psake.LoadedTaskModules.ContainsKey($psakeFilePath)) {
+ Write-Debug -Message "Loading tasks from task module [$psakeFilePath]"
+ . $psakeFilePath
+ $psake.LoadedTaskModules.Add($psakeFilePath, $null)
+ }
+ } else {
+ # Create new task object
+ $newTask = CreateTask
+ $taskKey = $newTask.Name.ToLower()
+
+ # If this task was referenced from a parent build script
+ # check to see if that reference task has extra data to add
+ $refTask = $psake.ReferenceTasks.$taskKey
+ if ($refTask) {
+
+ # Override the preaction
+ if ($refTask.PreAction -ne $newTask.PreAction) {
+ $newTask.PreAction = $refTask.PreAction
+ }
+
+ # Override the postaction
+ if ($refTask.PostAction -ne $newTask.PostAction) {
+ $newTask.PostAction = $refTask.PostAction
+ }
+
+ # Override the precondition
+ if ($refTask.PreCondition -ne $newTask.PreCondition) {
+ $newTask.PreCondition = $refTask.PreCondition
+ }
+
+ # Override the postcondition
+ if ($refTask.PostCondition -ne $newTask.PostCondition) {
+ $newTask.PostCondition = $refTask.PostCondition
+ }
+
+ # Override the continueOnError
+ if ($refTask.ContinueOnError) {
+ $newTask.ContinueOnError = $refTask.ContinueOnError
+ }
+
+ # Override the depends
+ if ($refTask.DependsOn.Count -gt 0 -and (Compare-Object -ReferenceObject $refTask.DependsOn -DifferenceObject $newTask.DependsOn)) {
+ $newTask.DependsOn = $refTask.DependsOn
+ }
+
+ # Override the requiredVariables
+ if ($refTask.RequiredVariables.Count -gt 0 -and (Compare-Object -ReferenceObject.RequiredVariables -DifferenceObject $newTask.RequiredVariables)) {
+ $newTask.RequiredVariables += $refTask.RequiredVariables
+ }
+ }
+
+ # Add the task to the context
+ Assert (-not $currentContext.tasks.ContainsKey($taskKey)) ($msgs.error_duplicate_task_name -f $taskKey)
+ Write-Debug "Adding task [$taskKey)]"
+ $currentContext.tasks.$taskKey = $newTask
+
+ if ($alias) {
+ $aliasKey = $alias.ToLower()
+ Assert (-not $currentContext.aliases.ContainsKey($aliasKey)) ($msgs.error_duplicate_alias_name -f $alias)
+ $currentContext.aliases.$aliasKey = $newTask
+ }
+ }
+}
diff --git a/src/buildScripts/psake/4.8.0/public/TaskSetup.ps1 b/src/buildScripts/psake/4.8.0/public/TaskSetup.ps1
new file mode 100644
index 0000000..50da9f2
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/public/TaskSetup.ps1
@@ -0,0 +1,102 @@
+function TaskSetup {
+ <#
+ .SYNOPSIS
+ Adds a scriptblock that will be executed before each task
+
+ .DESCRIPTION
+ This function will accept a scriptblock that will be executed before each task in the build script.
+
+ The scriptblock accepts an optional parameter which describes the Task being setup.
+
+ .PARAMETER setup
+ A scriptblock to execute
+
+ .EXAMPLE
+ A sample build script is shown below:
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ TaskSetup {
+ "Running 'TaskSetup' for task $context.Peek().currentTaskName"
+ }
+
+ The script above produces the following output:
+
+ Running 'TaskSetup' for task Clean
+ Executing task, Clean...
+ Running 'TaskSetup' for task Compile
+ Executing task, Compile...
+ Running 'TaskSetup' for task Test
+ Executing task, Test...
+
+ Build Succeeded
+
+ .EXAMPLE
+ A sample build script showing access to the Task context is shown below:
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ TaskSetup {
+ param($task)
+
+ "Running 'TaskSetup' for task $($task.Name)"
+ }
+
+ The script above produces the following output:
+
+ Running 'TaskSetup' for task Clean
+ Executing task, Clean...
+ Running 'TaskSetup' for task Compile
+ Executing task, Compile...
+ Running 'TaskSetup' for task Test
+ Executing task, Test...
+
+ Build Succeeded
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskTearDown
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [scriptblock]$setup
+ )
+
+ $psake.context.Peek().taskSetupScriptBlock = $setup
+}
diff --git a/src/buildScripts/psake/4.8.0/public/TaskTearDown.ps1 b/src/buildScripts/psake/4.8.0/public/TaskTearDown.ps1
new file mode 100644
index 0000000..b45a589
--- /dev/null
+++ b/src/buildScripts/psake/4.8.0/public/TaskTearDown.ps1
@@ -0,0 +1,107 @@
+
+function TaskTearDown {
+ <#
+ .SYNOPSIS
+ Adds a scriptblock to the build that will be executed after each task
+
+ .DESCRIPTION
+ This function will accept a scriptblock that will be executed after each task in the build script.
+
+ The scriptblock accepts an optional parameter which describes the Task being torn down.
+
+ .PARAMETER teardown
+ A scriptblock to execute
+
+ .EXAMPLE
+ A sample build script is shown below:
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ TaskTearDown {
+ "Running 'TaskTearDown' for task $context.Peek().currentTaskName"
+ }
+
+ The script above produces the following output:
+
+ Executing task, Clean...
+ Running 'TaskTearDown' for task Clean
+ Executing task, Compile...
+ Running 'TaskTearDown' for task Compile
+ Executing task, Test...
+ Running 'TaskTearDown' for task Test
+
+ Build Succeeded
+
+ .EXAMPLE
+ A sample build script demonstrating access to the task context is shown below:
+
+ Task default -depends Test
+
+ Task Test -depends Compile, Clean {
+ }
+
+ Task Compile -depends Clean {
+ }
+
+ Task Clean {
+ }
+
+ TaskTearDown {
+ param($task)
+
+ if ($task.Success) {
+ "Running 'TaskTearDown' for task $($task.Name) - success!"
+ } else {
+ "Running 'TaskTearDown' for task $($task.Name) - failed: $($task.ErrorMessage)"
+ }
+ }
+
+ The script above produces the following output:
+
+ Executing task, Clean...
+ Running 'TaskTearDown' for task Clean - success!
+ Executing task, Compile...
+ Running 'TaskTearDown' for task Compile - success!
+ Executing task, Test...
+ Running 'TaskTearDown' for task Test - success!
+
+ Build Succeeded
+
+ .LINK
+ Assert
+ .LINK
+ Exec
+ .LINK
+ FormatTaskName
+ .LINK
+ Framework
+ .LINK
+ Get-PSakeScriptTasks
+ .LINK
+ Include
+ .LINK
+ Invoke-psake
+ .LINK
+ Properties
+ .LINK
+ Task
+ .LINK
+ TaskSetup
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory = $true)]
+ [scriptblock]$teardown
+ )
+
+ $psake.context.Peek().taskTearDownScriptBlock = $teardown
+}