Skip to content

Commit

Permalink
fix(ollama-darwin): filter out .app, manually set arch for universal
Browse files Browse the repository at this point in the history
  • Loading branch information
coolaj86 committed Dec 12, 2023
1 parent 10409db commit a7756ae
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions ollama/releases.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,25 @@ var repo = 'ollama';
module.exports = async function (request) {
let all = await github(request, owner, repo);

// TODO why are the 0.0.x releases sorting so high?
let releases = [];
for (let rel of all.releases) {
let isLow = rel.version.startsWith('v0.0.');
if (isLow) {
// this is a janky, sudo-wantin' .app
let isJank = rel.name.startsWith('Ollama-darwin');
if (isJank) {
continue;
}

let isUniversal = rel.name === 'ollama-darwin';
if (isUniversal) {
let x64 = Object.assign({ arch: 'x86_64' }, rel);
releases.push(x64);

rel.arch = 'aarch64';
}
releases.push(rel);
}
all.releases = releases;

all._names = ['Ollama', 'ollama'];
return all;
};

Expand Down

0 comments on commit a7756ae

Please sign in to comment.