GithubHelp home page GithubHelp logo

autogitupdate's Introduction

Auto Git Update

a node.js module used for automatically updating projects from a git repository.

Notes

  • This is a ECMAScript module which makes use of import and export statements.
  • This module uses simple-logger (https://github.com/chegele/Logger).
  • To update from private repositories a personal access token needs to be provided.
  • During updates a backup of the old version is taken and stored in the configured tempLocation.
  • The remote package.json is compared to the local package.json to determine if a different version is available.
  • Until available on npm, install using github link. [> npm install https://github.com/chegele/AutoGitUpdate].

Options

  • repository String - The url to the root of a git repository to update from.
  • tempLocation String - The local dir to save temporary information for Auto Git Update.
  • branch String - [optional] The branch to update from. Defaults to master.
  • token String - [optional] A personal access token used for accessions private repositories.
  • ignoreFiles Array[String] - [optional] An array of files to not install when updating. Useful for config files.
  • executeOnComplete String - [optional] A command to execute after an update completes. Good for restarting the app.
  • exitOnComplete Boolean - [optional] Use process exit to stop the app after a successful update.

Functions

  • autoUpdate() - Updates if local package.json version is different than remote.
  • compareVersions() - Compares package.json versions without updating.
    • Returns an object with the properties UpToDate, currentVersion, & remoteVersion.
  • forceUpdate() - Updates without comparing package versions.
  • setLogConfig(logConfig) - Updates logging configuration. https://github.com/chegele/Logger

Example

import AutoGitUpdate from 'auto-git-update';

const config = {
    repository: 'https://github.com/chegele/BackupPurger'
    tempLocation: 'C:/Users/scheg/Desktop/tmp/',
    ignoreFiles: ['util/config.js'],
    executeOnComplete: 'C:\\Users\\scheg\\Desktop\\worksapce\\AutoGitUpdate\\startTest.bat',
    exitOnComplete: true
}

const updater = new AutoGitUpdate(config);

updater.autoUpdate();

autogitupdate's People

Contributors

chegele avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.