Skip to content

Commit

Permalink
v1.0.0-alpha.12
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuele-falzone committed Aug 21, 2018
1 parent 48b596f commit 17143b1
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
32 changes: 32 additions & 0 deletions bin/cmds/align.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
var lib = require('../../lib'),
Git = require('simple-git/promise'),
middleware = async () => {
return (await Git().revparse(['--show-toplevel'])).trim()
}

exports.command = 'align <hash>'
exports.desc = 'Align the status'
exports.builder = (yargs) => {
return yargs
.option('hash', {
type: 'string',
description: 'hash of the last commit'
})
}

exports.handler = (argv) => {
var status;
middleware().then((folder) => {
status = new lib.Status(folder);
if (argv.hash) {
return status.hash(argv.hash)
.then(function () {
return status.status(status.READY)
}).then(() => {
console.log('Status aligned!')
})
}
}).catch((err) => {
console.error(err)
})
}
2 changes: 1 addition & 1 deletion lib/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const debug = require('debug')('almost-git')
var path = require('path'),
fse = require('fs-extra');

const FILE = 'almost-git.json';
const FILE = '.git/almost-git.json';

class Status {
constructor(root) {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "almost-git",
"version": "1.0.0-alpha.11",
"version": "1.0.0-alpha.12",
"description": "almost-git is a tool for model and text co-evolution",
"keywords": [
"model-driven-development",
"git",
"versioning",
"git",
"versioning",
"code-evolution"
],
"bin": "./bin/cli.js",
Expand Down Expand Up @@ -40,4 +40,4 @@
"lodash": "^4.17.10",
"mocha": "^5.2.0"
}
}
}

0 comments on commit 17143b1

Please sign in to comment.