runCiMenu function
Common CI menu
Implementation
void runCiMenu(String path) {
var package = PubIoPackage(path);
var verbose = true;
enter(() async {
await package.ready;
write('Running CI for package ${package.path}');
});
item('pub get', () async {
await package.pubGet();
});
item('pub upgrade', () async {
await package.pubUpgrade();
});
item('pub downgrade', () async {
await package.pubDowngrade();
});
item('dump dependencies', () async {
await package.dumpDeps();
});
item('run_ci', () async {
await packageRunCi(package.path);
});
item('analyze', () async {
await packageRunCi(package.path,
options: PackageRunCiOptions(
analyzeOnly: true, noPubGet: true, verbose: verbose));
});
item('format', () async {
await packageRunCi(package.path,
options: PackageRunCiOptions(
formatOnly: true, noPubGet: true, verbose: verbose));
});
item('cd (prompt)', () async {
var dir = await prompt('Enter a directory');
package.shell = Shell(workingDirectory: dir);
});
}