Example #1
0
        public DependencyState[] GetDependenciesState(bool refresh = false)
        {
            if (refresh)
            {
                UpliftManager.ResetInstances();
            }
            Upbring upbring = Upbring.Instance();

            PackageRepo[] targets = GetTargets(GetDependencySolver(), InstallStrategy.UPDATE_LOCKFILE, false);

            bool anyInstalled =
                upbring.InstalledPackage != null &&
                upbring.InstalledPackage.Length != 0;

            List <DependencyState> dependenciesState = new List <DependencyState>();

            foreach (DependencyDefinition definition in upfile.Dependencies)
            {
                AppendDependencyState(
                    ref dependenciesState,
                    definition,
                    targets,
                    anyInstalled
                    );
            }

            return(dependenciesState.ToArray());
        }
Example #2
0
 private static void InstallDependencies()
 {
     Debug.Log("Installing Upfile dependencies");
     UpliftManager.ResetInstances();
     UpliftManager.Instance().InstallDependencies(strategy: UpliftManager.InstallStrategy.INCOMPLETE_LOCKFILE);
     AssetDatabase.Refresh();
 }
Example #3
0
 public void InstallDependencies(InstallStrategy strategy = InstallStrategy.UPDATE_LOCKFILE, bool refresh = false)
 {
     if (refresh)
     {
         UpliftManager.ResetInstances();
     }
     PackageRepo[] targets = GetTargets(GetDependencySolver(), strategy);
     InstallPackages(targets);
 }
Example #4
0
        private static void InstallLockfile()
        {
            Debug.Log("Installing from Lockfile : ");
            UpliftManager.ResetInstances();
            UpliftManager.Instance().InstallDependencies(strategy: UpliftManager.InstallStrategy.ONLY_LOCKFILE);

            Debug.Log("-> Resfreshing AssetDatabase");
            AssetDatabase.Refresh();
        }
Example #5
0
        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();
        }
Example #6
0
 private static void RefreshUpfile()
 {
     UpliftManager.ResetInstances();
     Debug.Log("Upfile refreshed");
 }
Example #7
0
 private static void InstallLockfile()
 {
     UpliftManager.ResetInstances();
     UpliftManager.Instance().InstallDependencies(strategy: UpliftManager.InstallStrategy.ONLY_LOCKFILE);
     AssetDatabase.Refresh();
 }