Skip to content

fix: fetch versions from release instead of tags #1193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[codespell]
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
ignore-words-list = afterall
skip = ./.git,./dist,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock,./node_modules
skip = ./.git,./dist,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock,./node_modules,./__tests__/testdata
builtin = clear,informal,en-GB_to_en-US
check-filenames =
check-hidden =
6 changes: 3 additions & 3 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ describe("installer tests", () => {
describe("Gets the latest release of Task", () => {
beforeEach(() => {
nock("https://api.github.com")
.get("/repos/go-task/task/git/refs/tags")
.replyWithFile(200, path.join(dataDir, "tags.json"));
.get("/repos/go-task/task/releases?per_page=100")
.replyWithFile(200, path.join(dataDir, "releases.json"));
});

afterEach(() => {
Expand All @@ -81,7 +81,7 @@ describe("installer tests", () => {

it("Gets latest version of Task using 3.x and no matching version is installed", async () => {
await installer.getTask("3.x", "");
const taskdir = path.join(toolDir, "task", "3.37.2", os.arch());
const taskdir = path.join(toolDir, "task", "3.43.2", os.arch());

expect(fs.existsSync(`${taskdir}.complete`)).toBe(true);
if (IS_WINDOWS) {
Expand Down
Loading
Loading