pub_release library

Classes

CustomVersion
Used by the version menu to allow the user to select a custom version. When this classes version property is called it triggers
Git
MultiSettings
reads/writes to the pubrelease_multi.yaml file.
NewVersion
Used by version menu to provide a nice message for the user.
Package
PreReleaseVersion
Used by the version menu to allow the user to select a custom version. When this classes version property is called it triggers
PubSpecDetails
ReleaseRunner
Settings
SimpleGitHub
Version
A parsed semantic version number.

Functions

addAsset(SimpleGitHub ghr, Release release, {required String assetPath, String? mimeType}) → void
Uploads the file at assetPath to git hub against the given release. If mimeType is not supplied then the extension of the assetPath is used to determine the mimeType.
addExecutableAsset(SimpleGitHub ghr, Release release, String script) → void
addExecutablesAsAssets(SimpleGitHub ghr, PubSpec pubspec, Release release) → void
askForVersion(Version currentVersion) Version
Ask the user to select the new version no. Pass in the current currentVersion number.
backupVersionLibrary(String pathToPackageRoot) → void
Makes a backup copy of the version.g.dart source file.
buildPre(Version currentVersion, String preType, int preVersion) Version
confirmVersion(Version version) Version
Ask the user to confirm the selected version no.
createRelease({required String username, required String apiToken, required String owner, required String repository}) Future<void>
defaultVersionToOffer(Version currentVersion, {bool includePre = false}) List<NewVersion>
determineVersionToOffer(Version currentVersion) List<NewVersion>
exeName(String exeName) String
findPubSpec({String? startingDir}) String?
Returns the path to the pubspec.yaml. startingDir is the directory we start searching from. We climb the path searching for the pubspec.yaml
getHigestVersionNo(String pathToPrimaryPackage) Version
In a multi-package release (where we have a multi settings file) This method will return the highest version no. used by any of the packages listed in the multi settings file. pathToPrimaryPackage so contain the path to the main package of the multi package project that contains the pub_release.multi.yaml file in its tool directory. In reallity it can be the path to any of the project roots.
restoreVersionLibrary(String pathToPackageRoot) → void
Restores the version.g.dart source from a back made by an earlier call to backupVersionLibrary
updateLatestTag({required SimpleGitHub sgh, required PubSpec pubspec}) Future<void>
update 'latest.
updateVersion(Version newVersion, PubSpec pubspec, String pathToPubSpec) → void
Updates the pubspec.yaml and versiong.g.dart with the new version no.
updateVersionFromDetails(Version newVersion, PubSpecDetails pubspecDetails) → void
Updates the pubspec.yaml and versiong.g.dart with the new version no.
version({required String pubspecPath}) Version?
Returns the version no. for the pubspec.yaml located at pubspecPath. Use findPubSpec to find the location.
versionLibraryPath(String pathToPackgeRoot) String
versionPath(String pathToPackgeRoot) String
whichEx(String exeName) bool