(release: GitHubRelease, downloadUrl: string)
| 83 | } |
| 84 | |
| 85 | private getMessage(release: GitHubRelease, downloadUrl: string) { |
| 86 | let message = ""; |
| 87 | |
| 88 | if (release.body != null && release.body !== "") { |
| 89 | message = release.body + "\n\n"; |
| 90 | } |
| 91 | |
| 92 | message += "You can download this update at " + downloadUrl; |
| 93 | |
| 94 | if (this.inPkg) { |
| 95 | message += |
| 96 | "\n\nIf you installed this CLI through a package manager " + |
| 97 | "you should probably update using its update command instead."; |
| 98 | } else { |
| 99 | message += |
| 100 | "\n\nIf you installed this CLI through NPM " + |
| 101 | "you should update using `" + |
| 102 | UPDATE_COMMAND + |
| 103 | "`"; |
| 104 | } |
| 105 | |
| 106 | return message; |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * Returns the download URL of the release asset built for this CLI's license, OS and CPU |
no outgoing calls
no test coverage detected