static Initialize() { Debug.Log("Upfile loading..."); if (!Upfile.CheckForUpfile()) { Debug.Log("No Upfile was found at the root of your project, Uplift created a sample one for you to start working on"); SampleFile.CreateSampleUpfile(); } if (!IsInitialized()) { UpliftManager.Instance().InstallDependencies(strategy: UpliftManager.InstallStrategy.ONLY_LOCKFILE, refresh: true); MarkAsInitialized(); } }
public void CheckForUpfileAbsentTest() { string pwd = Directory.GetCurrentDirectory(); string tmpDir = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); Directory.CreateDirectory(tmpDir); try { Directory.SetCurrentDirectory(tmpDir); Assert.IsFalse(Upfile.CheckForUpfile()); } finally { Directory.SetCurrentDirectory(pwd); Directory.Delete(tmpDir, true); } }
static Initialize() { Debug.Log("Using Uplift version " + About.Version); if (!Upfile.CheckForUpfile()) { Debug.Log("No Upfile was found at the root of your project, Uplift created a sample one for you to start working on"); SampleFile.CreateSampleUpfile(); } if (LockFileTracker.HasChanged()) { UpliftManager.ResetInstances(); UpliftManager.Instance().InstallDependencies(strategy: UpliftManager.InstallStrategy.ONLY_LOCKFILE); LockFileTracker.SaveState(); } Updater.CheckForUpdate(); }
public void CheckForUpfilePresentTest() { string pwd = Directory.GetCurrentDirectory(); string tmpDir = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); Directory.CreateDirectory(tmpDir); try { Directory.SetCurrentDirectory(tmpDir); // Create dummy Upfile File.Create("Upfile.xml").Dispose(); Assert.IsTrue(Upfile.CheckForUpfile()); } finally { Directory.SetCurrentDirectory(pwd); Directory.Delete(tmpDir, true); } }
private static bool CheckForUpfile() { return(!Upfile.CheckForUpfile()); }