Skip to content

Commit 8947e37

Browse files
committed
Add snapshot.
1 parent aca22af commit 8947e37

File tree

2 files changed

+40
-39
lines changed

2 files changed

+40
-39
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [windows-latest]
17-
emacs_version: [23.4, 24.1, 24.2, 24.3, 24.4, 24.5, 25.1, 25.2, 25.3, 26.1, 26.2, 26.3, 27.1]
17+
emacs_version: [23.4, 24.1, 24.2, 24.3, 24.4, 24.5, 25.1, 25.2, 25.3, 26.1, 26.2, 26.3, 27.1, snapshot]
1818

1919
steps:
2020
- uses: actions/checkout@v2

src/main.ts

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -17,41 +17,47 @@ async function run(): Promise<void> {
1717
const emacs_dot_var = "emacs-" + dot_ver; // emacs-27.1
1818

1919
core.startGroup("Installing Emacs");
20-
const ftpUrl = "https://ftp.gnu.org/gnu/emacs/windows/emacs-" + emacs_major_ver + "/";
20+
let ftpUrl = "https://ftp.gnu.org/gnu/emacs/windows/emacs-" + emacs_major_ver + "/";
2121
let zipPath = ftpUrl + emacs_dot_var;
2222

23-
switch (dot_ver) {
24-
case "23.4":
25-
case "24.1":
26-
case "24.2":
27-
case "24.3": {
28-
zipPath += "-bin-i386.zip";
29-
break;
30-
}
31-
case "24.4": {
32-
zipPath += "-bin-i686-pc-mingw32.zip";
33-
break;
34-
}
35-
case "24.5": {
36-
zipPath += "-bin-i686-mingw32.zip";
37-
break;
38-
}
39-
case "25.1": {
40-
zipPath += "-x86_64-w64-mingw32.zip";
41-
break;
42-
}
43-
case "25.2":
44-
case "25.3":
45-
case "26.1":
46-
case "26.2":
47-
case "26.3":
48-
case "27.1": {
49-
zipPath += "-x86_64.zip";
50-
break;
51-
}
52-
default: {
53-
zipPath += "-x86_64.zip";
54-
break;
23+
if (version == "snapshot") {
24+
// NOTE: If snapshot, directly assign the newest version.
25+
// Current newest snaptshot is `28.0.50`.
26+
zipPath = "https://alpha.gnu.org/gnu/emacs/pretest/windows/emacs-28/emacs-28.0.50-snapshot-2020-07-05-x86_64.zip";
27+
} else {
28+
switch (dot_ver) {
29+
case "23.4":
30+
case "24.1":
31+
case "24.2":
32+
case "24.3": {
33+
zipPath += "-bin-i386.zip";
34+
break;
35+
}
36+
case "24.4": {
37+
zipPath += "-bin-i686-pc-mingw32.zip";
38+
break;
39+
}
40+
case "24.5": {
41+
zipPath += "-bin-i686-mingw32.zip";
42+
break;
43+
}
44+
case "25.1": {
45+
zipPath += "-x86_64-w64-mingw32.zip";
46+
break;
47+
}
48+
case "25.2":
49+
case "25.3":
50+
case "26.1":
51+
case "26.2":
52+
case "26.3":
53+
case "27.1": {
54+
zipPath += "-x86_64.zip";
55+
break;
56+
}
57+
default: {
58+
zipPath += "-x86_64.zip";
59+
break;
60+
}
5561
}
5662
}
5763

@@ -73,11 +79,6 @@ async function run(): Promise<void> {
7379
core.exportVariable("PATH", `${PATH};${emacsRoot}`);
7480
core.exportVariable("PATH", `${PATH};${emacsBin}`);
7581

76-
console.log("emacsRoot: " + emacsRoot);
77-
console.log("emacsBin: " + emacsBin);
78-
79-
await exec.exec("dir c:\\emacs");
80-
8182
core.endGroup();
8283

8384
} catch (error) {

0 commit comments

Comments
 (0)