-
Notifications
You must be signed in to change notification settings - Fork 3
/
deno.ts
57 lines (44 loc) · 1.19 KB
/
deno.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { formatTime } from "../src/deps.ts";
import { getChangeLog } from "../src/main.ts";
const { changes, _meta } = await getChangeLog(
"denoland/deno",
undefined,
undefined,
{
categories: [
{ name: "BREAKING", emoji: "", title: "" },
{ name: "feat", emoji: "", title: "" },
{ name: "fix", emoji: "", title: "" },
{ name: "upgrade", emoji: "", title: "" },
],
contributors: {
exclude: ["@web-flow", "@ghost"],
includeBots: false,
},
},
);
const commits = changes
.map(({ commits }) => {
return commits.map(({ header }) => `- ${header}`).join("\n");
})
.join("\n");
const version = Deno.args[0] ?? "CANARY";
const commit = _meta.commits.head.shortSha.toUpperCase();
const date = formatTime(new Date(), "yyyy.MM.dd");
const changelog = `### ${version} / ${commit} (${date})
${commits}
### Install / Upgrade
**Using Deno:**
\`\`\`sh
deno upgrade --version ${version}
\`\`\`
**With Shell:**
\`\`\`sh
curl -fsSL https://deno.land/x/install/install.sh | sh -s v${version}
\`\`\`
**With PowerShell:**
\`\`\`ps1
$v="${version}"; iwr https://deno.land/x/install/install.ps1 -useb | iex
\`\`\`
`;
Deno.writeTextFile("CHANGELOG.md", changelog);