सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
release_updater एक Flutter/Dart पैकेज है जो स्थानीय डिरेक्टरी में रिलीज़ या स्थापना फ़ाइलों के स्वचालित अपडेट की प्रक्रिया को सरल बनाता है। यह डेवलपर्स को ऐप बाइनरी या कॉन्फ़िगरेशन फ़ाइल जैसे संस्करण-आधारित संसाधनों को दूरस्थ स्रोत से लाकर बदलने की अनुमति देता है। आवश्यकता के अनुसार बार-बार अपडेट करने वाले ऐप्स के लिए उपयुक्त, यह Android, iOS, macOS, Windows और Linux जैसे कई प्लेटफ़ॉर्म का समर्थन करता है। यह पैकेज हस्तचालित फ़ाइल प्रबंधन को कम करके डेप्लॉयमेंट वर्कफ़्लो को सरल बनाता है और वातावरणों के बीच सुसंगतता सुनिश्चित करता है।
उपयोग
एप्लिकेशन संसाधन अपडेट को स्वचालित करना
संस्करण युक्त स्थापना फ़ाइलों का प्रबंधन
स्थानीय निर्माणों को दूरस्थ जारीकरणों के साथ समन्वयित करें
CI/CD पाइपलाइन को सुव्यवस्थित करना
डेप्लॉयमेंट के बाद कॉन्फ़िगरेशन फ़ाइल्स अपडेट करना
मुख्य विशेषताएँ
स्वचालित फ़ाइल प्रतिस्थापन
रिमोट स्रोत एकीकरण
प्लेटफॉर्म के अनुकूल समर्थन
सरल CLI आदेश
संस्करण-जागरूक अपडेट
इनके लिए उपयुक्त
अक्सर ऐप अपडेट का प्रबंधन करने वाले विकासकर्ता
स्वचालित डेप्लॉयमेंट वर्कफ्लो का उपयोग करने वाली टीमें
वितरित निर्माण कलाकृतियों वाले प्रोजेक्ट
CI/CD पाइपलाइन एंटीग्रेशन
स्थानीय फ़ाइल सिंक्रनाइज़ेशन की आवश्यकता वाले ऐप्स
विचार योग्य बातें
अपडेट के लिए नेटवर्क एक्सेस की आवश्यकता है
दूरस्थ स्रोत कॉन्फ़िगरेशन के लिए मैन्युअल सेटअप
स्थानीय डिरेक्टरी अपडेट्स तक सीमित
रनटाइम ऐप अपडेट्स के लिए नहीं बनाया गया है
बाहरी फ़ाइल की उपलब्धता पर निर्भर करता है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
release_updater
This package brings a simple way to automatically update release/installation files in a local directory.
It also comes with built-in CLI tools to easily generate a release bundle (Zip file) or
serve release files for multiple platforms.
Motivation
Since Dart can run in many native platforms (Linux/x64, macOS/x64/arm64, Windows/x86),
it's not simple to manage all the different releases+platforms files that a
compiled Dart application can have.
In the same way that modern Browsers, and many other applications,
can have automatic builds and updates for multiple platforms, this package
provides tools and an API to easily achieve that.
API Documentation
See the API Documentation for a full list of functions, classes and extension.
Usage
import'dart:io';
import'package:release_updater/release_updater_io.dart';
voidmain() async {
var storage = ReleaseStorageDirectory('appx', Directory('/install/path'));
var provider = ReleaseProviderHttp.baseURL('https://your.domain/appx/releases');
var releaseUpdater = ReleaseUpdater(storage, provider);
var version = await releaseUpdater.update();
print('» Updated to version: $version');
var runResult = await releaseUpdater.runReleaseProcess('run.exe', ['-a']);
var exitCode = runResult!.exitCode;
print('» Exit code: $exitCode');
print('» Result: ${runResult.stdout}');
exit(exitCode);
}
ReleaseProvider
You can implement your own ReleaseProvider or use just the built-in ReleaseProviderHttp class.
CLI Tools
release_updater: A CLI updater.
release_updater_server: A simple HTTP server to provide releases using the shelf package.
version_from: the JSON or YAML file to provide the field version (if the parameter field is not provided).
platform: is a RegExp string to match the building platform. See the ReleasePlatform class.
Command types:
dart_pub_get: performs a dart pub get.
dart_compile_exe: performs a dart compile exe %dart_script.
dart: performs a dart %command.
windows_gui: Changes an executable Windows Subsistem to GUI.
command: performs a shell %command.
rm: Deletes a file.
upload_release: uploads the generated release.
url: release server base URL.
authorization: HTTP basic authorization.
username: authentication username.
password: authentication password.
Command errors:
A command that fails aborts the build: the error is logged, the
remaining commands are NOT executed, and the release_packer CLI
exits with code 1. This avoids a silent error generating and
releasing an incomplete package/artifact.
Some commands are just ignored (skipped) when not applicable, and do
NOT abort the build:
rm of a file that doesn't exist.
windows_gui over a file that is not a Windows executable (the usual
case when building on another platform).
files: each entry of files can be:
A String with a file path:
"file/path.txt"
A Map with extra parameters:
A file with a renamed path and a specific platform.