VelopackExtension.GoogleDrive 1.0.0

dotnet add package VelopackExtension.GoogleDrive --version 1.0.0                
NuGet\Install-Package VelopackExtension.GoogleDrive -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VelopackExtension.GoogleDrive" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VelopackExtension.GoogleDrive --version 1.0.0                
#r "nuget: VelopackExtension.GoogleDrive, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install VelopackExtension.GoogleDrive as a Cake Addin
#addin nuget:?package=VelopackExtension.GoogleDrive&version=1.0.0

// Install VelopackExtension.GoogleDrive as a Cake Tool
#tool nuget:?package=VelopackExtension.GoogleDrive&version=1.0.0                

VelopackExtension.GoogleDrive

Nuget Build Status License

Velopack.GoogleDrive is an extension for Velopack that that allows you to use Google Drive as an update source for Velopack packages. This library enables you to store and manage application updates in a Google Drive folder.


🌟 Features

  • πŸ—‚ Supports updates from Google Drive folders.
  • πŸ”„ Handles both full and delta update packages.
  • πŸ›  Integrates with ILogger for logging and monitoring.
  • πŸ”Œ Implements IUpdateSource for seamless integration with Velopack.

πŸš€ Installation

Install via NuGet

Run the following command in your project:

dotnet add package VelopackExtension.GoogleDrive

Or add this to your .csproj file:

<PackageReference Include="VelopackExtension.GoogleDrive" Version="1.0.0" />
<PackageReference Include="Google.Apis" Version="1.68.0" />
<PackageReference Include="Google.Apis.Drive.v3" Version="1.68.0.3601" />
<PackageReference Include="Google.Cloud.Storage.V1" Version="4.10.0" />
<PackageReference Include="Velopack" Version="0.0.942" />

πŸ“– Usage

Configure GoogleDriveUpdateSource

Here is an example of how to configure GoogleDriveUpdateSource:

using Microsoft.Extensions.Logging;
using Velopack;

var folderPath = "https://drive.google.com/drive/folders/YOUR_FOLDER_ID";
var apiKey = "YOUR_GOOGLE_API_KEY"; // [Get Google Drive API key](https://developers.google.com/drive/api)
var packageId = "com.example.myapp";

var logger = LoggerFactory.Create(builder =>
{
    builder.AddConsole();
}).CreateLogger<GoogleDriveUpdateSource>();

var source = new GoogleDriveUpdateSource(
    folderPath: folderPath,
    apiKey: apiKey,
    packageId: packageId,
    logger: logger,
    options: new GoogleDriveUpdateSource.Options
    {
        ApplicationName = "MyAppUpdater"
    });

Retrieve Available Updates

To retrieve a list of available updates:

var releaseFeed = await source.GetReleaseFeed(logger, channel: "stable");
foreach (var asset in releaseFeed.Assets)
{
    Console.WriteLine($"Found package: {asset.FileName} (version {asset.Version})");
}

Download and Save Packages

To download a selected package to a local file:

var asset = releaseFeed.Assets.First();
await source.DownloadReleaseEntry(
    logger,
    releaseEntry: asset,
    localFile: "update.nupkg",
    progress: percent => Console.WriteLine($"Progress: {percent}%")
);

πŸ›  Requirements

  • .NET 8.0 or later
  • A Google account and a Google Drive API key
  • Velopack

βœ… Running Tests

To run unit tests:

dotnet test

🀝 Contributing

If you’d like to contribute to this project:

  1. Fork the repository.
  2. Create a new branch (git checkout -b my-feature).
  3. Make your changes.
  4. Submit a Pull Request.

We welcome all contributions! 😊


πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


πŸ“§ Contact

If you have questions or need help, feel free to reach out via GitHub Issues.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 61 11/24/2024