mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Add function to obtain bundle changes
This requires that the bundle contains a Changes.json.
This commit is contained in:
@@ -587,6 +587,18 @@ namespace bundles_db
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<std::string> release_notes (std::string const& installDir)
|
||||
{
|
||||
std::vector<std::string> res;
|
||||
for(auto bundle : bundle_t::local_bundles(installDir))
|
||||
{
|
||||
std::string changes = path::join(bundle->path(), "Changes.json");
|
||||
if(path::exists(changes))
|
||||
res.push_back(changes);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
// ===========================
|
||||
// = Bundle Dependency Logic =
|
||||
// ===========================
|
||||
|
||||
@@ -75,6 +75,7 @@ namespace bundles_db
|
||||
friend std::vector<bundle_ptr> index (std::string const& installDir);
|
||||
friend bool update (bundle_ptr bundle, std::string const& installDir, double* progress, double min, double max);
|
||||
friend bool uninstall (bundle_ptr bundle, std::string const& installDir);
|
||||
friend std::vector<std::string> release_notes (std::string const& installDir);
|
||||
|
||||
oak::uuid_t _uuid;
|
||||
|
||||
@@ -135,6 +136,8 @@ namespace bundles_db
|
||||
PUBLIC bool install (bundle_ptr bundle, std::string const& installDir = NULL_STR, double* progress = NULL, double min = 0, double max = 1);
|
||||
PUBLIC bool uninstall (bundle_ptr bundle, std::string const& installDir = NULL_STR);
|
||||
|
||||
PUBLIC std::vector<std::string> release_notes (std::string const& installDir = NULL_STR);
|
||||
|
||||
} /* bundles_db */
|
||||
|
||||
#endif /* end of include guard: UPDATER_H_D2910JR4 */
|
||||
|
||||
Reference in New Issue
Block a user