npmversioner

1.0.2 • Public • Published

NPM Versioner

This is the long awaited NPM Versioner. This tool does the following:

  1. Updates NPM interdependencies between our private NPM modules and Git repos
  2. Publishes updated NPM modules
  3. Displays a list of repos that need to be PR'd

Setup

  1. In the root of the app, create a file called basepathconfig.json
  2. Inside of the file, add the path to the folder that contains your git repositories:

{ "basePath": "/your/base/repo/path/here" }

Before running the app

  1. Make sure that you've cloned all of our repositories to your local machine.
  2. Make sure to merge in the latest Sift.Lib master branch from GitHub

Running the app

  1. node app
  2. Select the packages you've changed that need to be updated
  3. Confirm the change by typing y at the prompt if everything looks good
  4. The app will update and publish your packages then inform you of which github repos need to be committed to

Adding a new module

If you create a new module, add it to the config.json file using the format:

{
  "name": {package name},
  "description": {package description (optional)},
  "configLocation": {relative folder path to package.json location},
  "isNPM": {set to true if this is a sift.lib package}
}

Linking Script

We recommend npm linking all @sift packages on development machines. This ensures that you can write code and test it in real time without publishing to npm.

The siftliblinks.sh script in this repo will perform all of the necessary linking.

To run:

cd /your/git/directory
sudo chmod +x ./NpmVersioner/siftliblinks.sh #(first time only)
sudo chown -R {yourUserName} {/your/base/repo/path/here}
sudo chown -R /usr/local/lib/node_modules
./NpmVersioner/siftliblinks.sh '{/your/base/repo/path/here}'

Note: You MUST run this script inside of your git directory.

Bash Utilities

Get latest from all repos

** Please note the variables within the script: yourGitFolder, nameForBaseRemote

cd ~/{{yourGitFolder}}/
for i in $(ls -d Sift*/)
do
	cd ~/git/$i
	echo
	echo
	echo =========== Start updating $i ==============
	git remote update {{nameForBaseRemote}}
	if [ $(git rev-parse master) = $(git rev-parse {{nameForBaseRemote}}/master) ]
	then
		echo ++++++++++ $i is up to date ++++++++++
	else
		echo ======= Updating origin with upstream=====
		git checkout master
		git pull {{nameForBaseRemote}} master
	#	git push origin master
	#	echo ====== Updating local master =====
	       #	git pull --rebase
	fi
done

Install.js

The purpose of install.js is to install all node modules on sift lib.

To run simply type in node install

Readme

Keywords

none

Package Sidebar

Install

npm i npmversioner

Weekly Downloads

0

Version

1.0.2

License

ISC

Last publish

Collaborators

  • sift