Skip to content

Commit

Permalink
more os-agnostic code
Browse files Browse the repository at this point in the history
  • Loading branch information
mhkeller committed Nov 25, 2015
1 parent 26ef19e commit 6c8267e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bin/archive-prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var io = require('indian-ocean');
// Get current year and repo name
var current_year = new Date().getFullYear();
var current_month = new Date().getMonth() + 1;
var PROJECT_PATH = path.resolve('./');
var PROJECT_PATH = path.resolve('.');
var LOCAL_FOLDER = path.basename(PROJECT_PATH);
var name_delimiter = '_';

Expand Down
2 changes: 1 addition & 1 deletion bin/deploy-prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var moment = require('moment-timezone');
var home_dir = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE;
var config_path = path.join(home_dir, '.conf', 'kestrel-config.json');

var project_dir = path.resolve('./');
var project_dir = path.resolve('.');
var config = require(config_path);
var repo_name = path.basename(project_dir);

Expand Down
2 changes: 1 addition & 1 deletion bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var prompts_dict = {
var commands = ['config', 'init', 'deploy', 'archive', 'unschedule'];
var config;
var pkg_json = require('../package.json');
var PROJECT_PATH = path.resolve('./');
var PROJECT_PATH = path.resolve('.');
var LOCAL_FOLDER = path.basename(PROJECT_PATH);

var argv = optimist
Expand Down
12 changes: 6 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ var chalk = require('chalk');
var io = require('indian-ocean');

// Github authentication
var config
var gh_client
var gh_entity
var config;
var gh_client;
var gh_entity;

var sh_commands = require('./sh-commands.js');

Expand Down Expand Up @@ -77,7 +77,7 @@ function setConfig(set_gh){
}
function initAll(){
setConfig(true);
var current_dir = path.basename(path.resolve('./'));
var current_dir = path.basename(path.resolve('.'));
kestrelInit(function(err0, stdout0, stderr1){
if (err0){
console.log( chalk.yellow('Step 1/4: Skipping. .kestrel folder already exists.') );
Expand Down Expand Up @@ -141,7 +141,7 @@ function checkGitStatus(gitStatus){

function deployLastCommit(bucket_environment, trigger_type, trigger, local_path, remote_path, when){
setConfig(true);
var current_dir = path.resolve('./');
var current_dir = path.resolve('.');

var trigger_commit_msg = bucket_environment + '::' + trigger + '::' + local_path + '::' + remote_path + '::' + when;

Expand Down Expand Up @@ -214,7 +214,7 @@ function addToArchive(deploySettings){
var remote_branch = deploySettings.remote_branch;

setConfig(true);
var repo_name = path.basename(path.resolve('./'));
var repo_name = path.basename(path.resolve('.'));
var archive_push = sh_commands.archive(config.github.login_method, config.github.account_name, config.archive.repo_name, local_branch, remote_branch);

console.log(chalk.bgBlue.black('Pushing to GitHub...'));
Expand Down

0 comments on commit 6c8267e

Please sign in to comment.