-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.cpp
More file actions
34 lines (30 loc) · 837 Bytes
/
Copy pathexample.cpp
File metadata and controls
34 lines (30 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "includes/AutoUpdater.cpp"
int main()
{
// AutoUpdater config
string repo_name = "MyApp";
string repo_author = "Author";
string current_release_date = "2025-05-02";
string asset_to_download = "app_linux_x86_64";
bool verbose = true;
// Initialize AutoUpdater
AutoUpdater updater(repo_author, repo_name, current_release_date, asset_to_download, verbose);
cout << "Checking for updates..." << endl;
if (updater.is_update_available())
{
cout << "Update available! Updating..." << endl;
if (updater.update())
{
cout << "Updated successfully!" << endl;
}
else
{
cout << "Error updating :(" << endl;
}
}
else
{
cout << "Latest version already installed." << endl;
}
return 0;
}