Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Dec 7, 2024
1 parent 3d26533 commit 74cb3fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/release.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ export class Release
get: -> @data.at(0) or null

# Value indicating whether this release exists.
Object.defineProperty @prototype, "exists",
Object.defineProperty @::, "exists",
get: -> Release.data.some (release) => release.version is @version

# Value indicating whether this release is provided as source code.
Object.defineProperty @prototype, "isSource",
Object.defineProperty @::, "isSource",
get: -> not @getAsset process.platform

# The associated Git tag.
Object.defineProperty @prototype, "tag",
Object.defineProperty @::, "tag",
get: ->
{major, minor, patch} = new SemVer @version
if patch > 0 then "#{major}.#{minor}.#{patch}" else "#{major}.#{minor}"

# The download URL.
Object.defineProperty @prototype, "url",
Object.defineProperty @::, "url",
get: ->
asset = @getAsset process.platform
path = if asset then "releases/download/#{@tag}/#{asset.file}" else "archive/refs/tags/#{@tag}.zip"
Expand Down

0 comments on commit 74cb3fc

Please sign in to comment.