Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version v0.1.1 #6

Merged
merged 1 commit into from May 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions cmds/deploy.js
Expand Up @@ -24,8 +24,12 @@ module.exports = function (program) {
.description('Deploy to Firebase only on build branches (master, stage, prod)')
.option('-o --only <targets>', 'Only deploy to specified, comma-seperated targets (e.g "hosting, storage")', /^(hosting|functions|small)$/i)
.action((directory, options) => {
deployToFirebase(program.args[0], () => {
process.exit(1)
deployToFirebase(program.args[0], (err, val) => {
if (err) {
process.exit(1)
} else {
process.exit(0)
}
})
})
}
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "firebase-ci",
"version": "0.1.0",
"version": "0.1.1",
"description": "Simplified Firebase interaction for continuous integration including deploying hosting, functions, and database/storage rules.",
"main": "lib/index.js",
"bin": {
Expand Down
8 changes: 3 additions & 5 deletions src/index.js
Expand Up @@ -138,10 +138,8 @@ const deployToFirebase = (opts, cb) => {
const onlyString = opts && opts.only ? `--only ${opts.only}` : ''
const project = TRAVIS_BRANCH
if (fs.existsSync('functions')) {
if (settings.ci) {
if (settings.ci.copyVersion) {
copyVersion()
}
if (settings.ci && settings.ci.copyVersion) {
copyVersion()
}

promises.push(
Expand All @@ -165,7 +163,7 @@ const deployToFirebase = (opts, cb) => {
)
.then(() => {
// -------------------------- Actions ---------------------------- //
if (settings.ci.mapEnv) {
if (settings.ci && settings.ci.mapEnv) {
return copyEnv(settings.ci.mapEnv)
.catch((err) => {
console.log(chalk.red('Error mapping Travis Environment to Functions environment: '), err)
Expand Down