This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
164 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"server": { | ||
"path": "demo/server", | ||
"repo": "git@github.com:feedhenry-templates/wfm-server.git" | ||
}, | ||
"mobile": { | ||
"path": "demo/mobile", | ||
"repo": "git@github.com:feedhenry-templates/wfm-portal.git" | ||
}, | ||
"portal": { | ||
"path": "demo/portal", | ||
"repo": "git@github.com:feedhenry-templates/wfm-mobile.git" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/usr/bin/env node | ||
|
||
var ghpages = require('gh-pages'); | ||
var path = require('path'); | ||
var fs = require('fs'); | ||
var args = require('yargs') | ||
.boolean('p') | ||
.default('p', false) | ||
.alias('p', 'push') | ||
.describe('p', 'Push changes to remote repository, i.e. do an actual publish') | ||
.alias('v', 'version') | ||
.describe('v', 'semver version to publish the app as, defaults to the version in lerna.json') | ||
.alias('u', 'user') | ||
.describe('u', 'Git user') | ||
.alias('e', 'email') | ||
.describe('e', "Git user's email") | ||
.demandCommand(1) | ||
.usage('Usage: $0 <app name>') | ||
.argv; | ||
|
||
// Debug tooling | ||
process.env.NODE_DEBUG = 'gh-pages'; | ||
|
||
// get version from lerna global version | ||
var version = args.version || require(path.resolve(__dirname, '../lerna.json')).version; | ||
var appName = args._[0]; | ||
|
||
var appInfo = require('./apps.json'); | ||
|
||
// gh-branch's default, should pick from local machine's git config | ||
var gitUser = null; | ||
if (args.user && args.email) { | ||
gitUser = { | ||
user: args.user, | ||
email: args.email | ||
}; | ||
} | ||
|
||
var target = appInfo[appName]; | ||
|
||
if(!target || !fs.existsSync(target.path)) { | ||
console.error('module ' + appName + ' not found!'); | ||
} | ||
|
||
var options = { | ||
branch: version, | ||
dotfiles: true, | ||
remote: 'origin', | ||
repo: target.repo, | ||
user: gitUser, | ||
tag: 'release-' + appName + "-" + version, | ||
message: "Release " + appName + " at version: " + version, | ||
push: args.push | ||
}; | ||
|
||
console.info('Publishing contents of ' + target.path + | ||
' to remote ' + target.repo); | ||
|
||
ghpages.publish(target.path, options, function(err) { | ||
if (err) { | ||
console.info("Finished with error ", err); | ||
} else { | ||
console.info("Finished with success "); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
set -e | ||
containerId=$(docker run -itd -p 0:4873 verdaccio/verdaccio) | ||
|
||
# get random assined port | ||
port=$(docker port $containerId | awk -F ':' '{print $2}') | ||
echo "Started local npm registry" | ||
registry="http://localhost:$port" | ||
|
||
# adduser doesn't allow cli params, use stdin hack | ||
npm adduser --registry=$registry <<EOF | ||
test-user | ||
testPwd | ||
test@test.com | ||
EOF | ||
|
||
echo "Beginning publish test" | ||
npm run publish:prepare | ||
lerna publish --skip-git --canary --yes --registry=$registry | ||
|
||
# kill container if in CI, else open in browser | ||
# travis sets CI=true by default | ||
if [ -n "$CI" ]; | ||
then | ||
echo "Testing regular npm install..." | ||
packages=$(lerna ls | awk -F " +v" '{print $1"@"$2}') | ||
npm install $packages | ||
echo "Removing npm registry container" | ||
docker kill $containerId | ||
docker rm $containerId | ||
else | ||
# cross-platform `open` command | ||
# requires `npm i -g opn-cli` if not running as npm script | ||
opn $registry | ||
fi | ||
|
||
echo "Publishing finished, reverting version changes..." | ||
git checkout cloud/ demo/ client/ |