Skip to content

Commit

Permalink
feat: share git cache between projects
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed May 18, 2022
1 parent d92f601 commit be5dd7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Editor/Coffee.UpmGitExtension/GitPackageDataBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,10 @@ public static IEnumerable<UpmPackageVersionEx> GetAvailablePackageVersions(strin
//################################
// Private Members.
//################################
//private static string _workingDirectory => InternalEditorUtility.unityPreferencesFolder + "/GitPackageDatabase";
private static string _workingDirectory => "Library/GitPackageDatabase";
private static string _resultsDir => _workingDirectory + "/Results";
private static string _workingDirectory => InternalEditorUtility.unityPreferencesFolder + "/GitPackageDatabase";
//private static string _workingDirectory => "Library/GitPackageDatabase";
private static string _serializeVersion => "2.0.0";
private static string _resultsDir => _workingDirectory + "/Results-" + _serializeVersion;
private static FileSystemWatcher _watcher;
private static readonly HashSet<FetchResult> _resultCaches = new HashSet<FetchResult>();
private static PackageManagerProjectSettings _settings => ScriptableSingleton<PackageManagerProjectSettings>.instance;
Expand Down
4 changes: 2 additions & 2 deletions Editor/Commands/fetch-packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { execSync } = require("child_process");
const fs = require("fs");
const path = require("path");
const { hashCode, mkdirSyncRecrusive, shouldFetch, lock, unlock, loadJs, touch } = require("./utils");
const version = '2.0.0-preview.1'
const version = '2.0.0'

// Input
console.log(`cwd: ${process.cwd()}\nInput`);
Expand All @@ -32,7 +32,7 @@ const id = (repositoryId + subDirId)
.replace(/[:\/]/g, "~")
.toLowerCase();
const repoDir = `Repositories/${id}`;
const resultDir = `Results`;
const resultDir = `Results-${version}`;
const outputFile = path.resolve(`${resultDir}/${id}.json`);

console.log(` rawRepositoryUrl: ${rawRepositoryUrl}`);
Expand Down

0 comments on commit be5dd7e

Please sign in to comment.