-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Run action on different platforms #65
Conversation
cce3e22
to
89b7eef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of comments for my understanding.
src/cache.ts
Outdated
@@ -34,7 +39,7 @@ const getIntervalKey = (invalidationIntervalDays: number): string => { | |||
|
|||
async function buildCacheKeys(): Promise<string[]> { | |||
const keys = [] | |||
let cacheKey = `golangci-lint.cache-` | |||
let cacheKey = util.format("golangci-lint.cache-%s-%s-", os.platform(), os.arch()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious why cache key needs to be updated ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it might be mixed up with caches for different platforms, but looks like everything works fine. Reverted back
src/install.ts
Outdated
} | ||
const s = util.format("%s-%s.%s", platform, arch, ext) | ||
if (s != defaultPlatform) { | ||
return versionConfig.AssetURL.replace(defaultPlatform, s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
understand that you are using AssetURL to cope with existing logic. I am thinking about using TargetVersion
and then construct URL based on version. Then later, we can just remove redundant AssetURL in golangci-lint.
Anyway, I am feel free to ignore this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to get rid of the AssetURL
we need to came up with more complex logic of finding the latest version and latest patch version. Let's use it for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you mean, yes, we can use TargetVersion
to build the AssetURL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@SVilgelm yes, i tested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for making awesome changes 👍
@sayboras I already know how to retire the assets :) But it will take some time to implement, I'm newbie in typescript, we just need to use GitHub API to request the list of releases instead of assets and do same with sorting, but we need to be careful with the performance, It can be slower than using the assets, but will see |
What should be exactly done? |
@ernado since I changed the os matrix the name of status check were caged as well, and there is no |
@ernado looks like all 3 should be enabled: test (*) |
Closes #24
installLint
function to modify the AssetURL to download platform specifying binary and use proper extractor (.tar.gz
and.zip
)