jefe 0.4.0

jefe

A library for maintaining sets of related Dart projects versioned in git, in particular managing dependencies between them.

Usage

For now the best place to learn about Jefe is the introductory blog post.

Jefe is designed to be used both as a command (called jefe) and as source (e.g. integrating with other tools like grinder)

Installing

pub global activate jefe

Project Lifecycle Basics


import 'package:jefe/jefe.dart';


main() async {
  // first install the project group
  final ProjectGroup projectGroup = await ProjectGroup.install(
      new Directory('/Users/blah'), 'git@git.example');

  final executor = new CommandExecutor(projectGroup);

  // initialise it (sets it on develop branch etc)
  await executor.execute(lifecycle.init());

  // start a new feature
  // All projects will be on a feature branch called feacha,
  // will have the dependencies to other projects in this group set as
  // path dependencies, and will have pub get called
  await executor.execute(lifecycle.startNewFeature('feacha'));

  // Code something awesome

  // finish off the feature
  // All projects will have their feature branches merged to develop,
  // will have the dependencies to other projects in this group set as
  // git dependencies bashed on the current commit hash,
  // will be git pushed to their origin
  // and will have pub get called
  await executor.execute(lifecycle.completeFeature('feacha'));

  // now cut a release.
  // All the project pubspec versions will be bumped according to the release type
  // and git tagged with same version, will be merged to master
  await executor.execute(lifecycle.release(type: ReleaseType.major));
}

Generate a Production Dockerfile


main() async {
  final executor = await executorForDirectory('/Users/blah/myfoo_root');

  await executor.execute(docker.generateProductionDockerfile(
      'my_server', 'my_client',
      outputDirectory: new Directory('/tmp'),
      dartVersion: '1.9.3',
      environment: {'MY_FOO': false},
      exposePorts: [8080, 8181, 5858],
      entryPointOptions: ["--debug:5858/0.0.0.0"]));
}


Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

0.4.0

  • Use relative paths in path dependencies

0.3.1

  • Added jefetize sub command to turn an existing directory into a jefe container directory

0.3.0

  • Major rewrite of internals. Should be much easier to implement new features
  • Removed featureName from jefe finish
  • Allow project names to differ from repo names
  • New command to generate Intellij vcs.xml file

0.2.10

  • Updated pubspec dependency

0.2.9

  • Bug fix. Missed case for using publish_to property when fetching versions

0.2.8

  • Support third party pub repos via publish_to pubspec property

0.2.7

  • Fix to work with normal tags (non annotated) too
  • Don't run tests if project doesn't use test package

0.2.4

  • added jefe test which runs pub run test on all projects that have a test dir

  • added dev_dependencies to the project dependencies that jefe manages

0.2.3

  • support auto update of hosted versions

0.2.2

  • tighter constraints for exported packages

0.2.0

  • support for hosted packages

0.1.0

  • reworked executors to simplify
  • made several commands more idempotent so that you can rerun them as needed

0.0.1

  • Initial version, created by Stagehand

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  jefe: "^0.4.0"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:jefe/jefe.dart';

Platforms

Server

About

A library for maintaining sets of related Dart projects versioned in git, in particular managing dependencies between them.

Author

Anders Holmgren

Homepage

github.com/Andersmholmgren/jefe

Documentation

www.dartdocs.org/documentation/jefe/0.4.0/

Uploader

andersmholmgren@gmail.com

License

BSD (LICENSE)

Published

Jun 25, 2016