Giter VIP home page Giter VIP logo

grunt-build-control's People

Contributors

bitdeli-chef avatar daftmonk avatar emrass avatar fiznool avatar gitter-badger avatar gregkare avatar kevinawoo avatar pawsong avatar robloach avatar samirbekaert avatar seejee avatar togosh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grunt-build-control's Issues

Clone with custom config

I have a specific case where I need clone with this follow config:

git config http.sslVerify false

Any idea how do this? Thanks!

Allow for tokens in branch name

I'd like to be able to pass the sourceBranch token into the branch name so that pushes made from the 1.2.0 branch get pushed to the 1.2.0 remote branch.

branch: '%sourceBranch%',

I can easily replicate the functionality by reusing this replace function down in the try section, but i'm guessing there might be a more complete way to do this? Is there value in supporting all of the tokens in the branch name? How about the tag name? Should we create a reusable function where we can pass a string and have it 'tokenized'.

options.branch = options.branch.replace(/%sourceBranch%/g, tokens.branch);

Copy over miscellaneous files from /app to /dist

I'm making a really simple homepage for a friend, and I'm using the SFTP plugin for sublime text3. This requires a config file, sftp-config.json, to be present at the root of the directory you upload to the server. I setup using yeoman. When I put the sftp-config.json in my app directory, it isn't copied over to the /dist directory, which is what should be uploaded to production. I think it would be good to copy over remaining files in /app to /dist for purposes like these. It seems I'm better off using filezilla right now to upload the dist directory

The --force, it does nothing

ze goggles

What happened:

I (and by "I" I mean @bobthebotmaker) had local uncommitted changes and tried to invoke grunt-build-control.

I then got the warning:

Running "buildcontrol:lab" (buildcontrol) task
Warning: There are uncommitted changes in your working directory.
Please commit changes to the main project before you commit to the built code.
 Use --force to continue.

I was actually testing changes to the Gruntfile, so I didn't want to commit the changes yet because we hadn't verified them by running this command. :ouroboros: So I said, ok, fine, I'll just use --force to get past this warning like it says I can.

But using --force causes buildcontrol to fail:

Running "buildcontrol:lab" (buildcontrol) task
Warning: There are uncommitted changes in your working directory.
Please commit changes to the main project before you commit to
the built code.
 Used --force, continuing.
Warning: Task "buildcontrol:lab" failed. Used --force, continuing.

If you're not allowed to build with uncommitted files, which seems to be the case, then this should be an error rather than a warning right? Either that or not offering --force as a way to get around this, if that's possible, would be better imo.

no_power_here_lotr

Git 1.7.2 is required, should be documented at least

I get an error when trying to use grunt buildcontrol on heroku because their git version is 1.7.0, and this grunt plugin depends on git checkout's "orphan" option (which was introduced in git 1.7.2). This StackOverflow article has some more info on that: http://stackoverflow.com/questions/12964196/pulling-in-authenticated-git-repos-on-heroku/12968614

It would be nice if the documentation either stated the dependency on git 1.7.2+ or (if possible) the plugin supported older versions of git.

Thanks!

Write tests!

This module needs some tests something fierce.

Buildcontrol not working with gh-pages

Everything works as expected when branch: 'master' but not branch: 'gh-pages'

I can't quite figure it out.

Code snippet below

    buildcontrol: {
      dist: {
        options: {
          remote: '[email protected]:ushahidi/pinghome.git',
          branch: 'gh-pages',
          commit: true,
          push: true
        }
      }
    },

FYI - non-grunt fork using ES2015

First, thank you for all the work that went into this. In the recent days I've seen how much time and effort it took to get this right.

I don't use grunt anymore, I'm using gulp in gulp-pipeline and wanted to use this core code in a build agnostic way. I've worked on a port of this to ES2015 classes called build-control without the use of grunt (or gulp) so that it can be used by either or any javascript package. It is available as es or commonjs packages.

Here are some differences:

  • no elastic beanstalk support
  • ES2015 classes
  • common configurations are more defaulted
  • tests are fully converted to ES2015 and promises
  • no grunt (or gulp) needed
  • switched all process to use a passed-in cwd instead of shelljs.cd() for no process side effects (or concurrency side effects)

I think the behavior is the same; the scenario repos are almost entirely unchanged. Currently, tests are passing and I plan to build a gulp-pipeline recipe. Once I have it working in two of the open source projects I'm involved in, I'll release a stable version (likely this week).

I welcome collaboration and would be happy to add committers to the project if you would like e.g. this grunt-build-control could use the BuildControl class directly. The grunt glue code can be maintained here and the core there.

If you aren't interested, no problem. I just wanted to say thank you for all the hard work and to let you know I was working on a non-grunt version.

Difficult to get solution running locally to contribute

I was hoping to contribute some tests, but it was too difficult to get solution running locally. I took the following approach:

git clone https://github.com/robwierzbowski/grunt-build-control.git
cd grunt-build-control
npm install
grunt test

At that step I receive the following warning:

Warning: Build directory "dist" doesn't exist. Nothing to version. Use --force to continue.

I tried getting past this step to run tests, but made no progress. Could you please provide some steps to get tests executing so that I can contribute?

read git repo address out of .git/config file

This would follow the DRY principle and easen configuration.

would allow configuration like this:

heroku: {
  options: {
    remote: 'heroku',
    branch: 'master'
  }
},
heroku-staging: {
  options: {
    remote: 'heroku-staging',
    branch: 'master'
  }
}

Yeoman gh-pages

I'm deploying yeoman to gh-pages, using the sample config provided. (without heroku) https://github.com/robwierzbowski/grunt-build-control#usage
The first run is fine, it create a gh-pages branch and push it to the github.
But the next run cause issues as follows.

Running "buildcontrol:pages" (buildcontrol) task
Branch gh-pages set up to track remote branch gh-pages from remote-078678.

Committing changes to gh-pages.
Warning: On branch gh-pages
Your branch is up-to-date with 'remote-078678/gh-pages'.                                                             

Changes not staged for commit:                                 
    deleted: ../.htaccess
    deleted: ../404.html
    .....................
    .....................
    .....................

no changes added to commit                                                                                           
 Use --force to continue.                                                                                            

Aborted due to warnings.


Execution Time (2014-07-10 14:03:08 UTC)
buildcontrol:pages  10.1s

Currently, I have to keep deleting my local branch, github branch, and delete the dist/.git/ directory and rerun the command again.How do I resolve this issues?

multiple remotes

Hi,

I have multiple remote servers I would need to deploy to. Is there a way to configure buildcontrol to handle more than one remote?

Fatal error: this socket is closed

Environment:

  • Windows 10 - 14393
  • NPM: 3.10.9
  • Node: 7.1.0
  • grunt cli: 1.2.0

I'm trying to create a git during build and push the results to a git repository. I always getting errors.

Configuration:

buildcontrol: {
            options: {
                dir: '.build',
                commit: true,
                shallowFetch: false,
                force: true,
                push: true,
                message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%',
                connectCommits: false
            },
            vsts: {
                options: {
                    remote: 'https://xxxx.visualstudio.com/DefaultCollection/xxxx/_git/xxxx',
                    login: 'xxxx',
                    token: 'xxxx',
                    branch: 'master',
                }
            },
            azure: {
                options: {
                    remote: 'https://xxxx.scm.azurewebsites.net:443/xxxx.git',
                    login: 'xxxx',
                    token: 'xxxx',
                    branch: 'master',
                }
            }
        }

Azure:

Running "buildcontrol:azure" (buildcontrol) task
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: This socket is closed
  at WriteStream.Socket._writeGeneric (net.js:683:19)
  at WriteStream.Socket._write (net.js:734:8)
  at doWrite (_stream_writable.js:334:12)
  at writeOrBuffer (_stream_writable.js:320:5)
  at WriteStream.Writable.write (_stream_writable.js:247:11)
  at WriteStream.Socket.write (net.js:661:40)
  at Log._write (G:\_data\r\xxxx\src\node_modules\grunt-legacy-log\index.js:161:26)
  at Log.wrapper [as _write] (G:\_data\r\xxxx\src\node_modules\lodash\index.js:3095:19)
  at Log._writeln (G:\_data\r\xxxx\src\node_modules\grunt-legacy-log\index.js:166:8)
  at Log.wrapper [as _writeln] (G:\_data\r\xxxx\src\node_modules\lodash\index.js:3095:19)
  at Log.writeln (G:\_data\r\xxxx\src\node_modules\grunt-legacy-log\index.js:177:8)
  at Log.wrapper (G:\_data\r\xxxx\src\node_modules\lodash\index.js:3095:19)
  at writeln (G:\_data\r\xxxx\src\node_modules\grunt\lib\grunt\fail.js:30:13)
  at Object.fail.fatal (G:\_data\r\xxxx\src\node_modules\grunt\lib\grunt\fail.js:46:3)
  at process.uncaughtHandler (G:\_data\r\xxxx\src\node_modules\grunt\lib\grunt.js:121:10)
  at emitOne (events.js:96:13)
  at process.emit (events.js:188:7)
  at process._fatalException (bootstrap_node.js:292:26)

Visual Studio Team Services:

Running "buildcontrol:vsts" (buildcontrol) task

Fetching "master" files from https://xxxx.visualstudio.com/DefaultCollection/xxxx/_git/xxxx.
POST git-upload-pack (117 bytes)
POST git-upload-pack (126 bytes)
remote:
remote:                    vSTs
remote:                  vSTSVSTSv
remote:                vSTSVSTSVST
remote: VSTS         vSTSVSTSVSTSV
remote: VSTSVS     vSTSVSTSV STSVS
remote: VSTSVSTSvsTSVSTSVS   TSVST
remote: VS  tSVSTSVSTSv      STSVS
remote: VS   tSVSTSVST       SVSTS
remote: VS tSVSTSVSTSVSts    VSTSV
remote: VSTSVST    SVSTSVSTs VSTSV
remote: VSTSv        STSVSTSVSTSVS
remote:                VSTSVSTSVST
remote:                  VSTSVSTs
remote:                    VSTs    (TM)
remote:
remote:  Microsoft (R) Visual Studio (R) Team Services
remote:
remote: Found 3 objects to send. (26 ms)
From https://xxxx.visualstudio.com/DefaultCollection/xxxx/_git/xxxx-LIVE
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> remote-f70d2a/master
Branch master set up to track remote branch master from remote-f70d2a.
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: This socket is closed
  at WriteStream.Socket._writeGeneric (net.js:683:19)
  at WriteStream.Socket._write (net.js:734:8)
  at doWrite (_stream_writable.js:334:12)
  at writeOrBuffer (_stream_writable.js:320:5)
  at WriteStream.Writable.write (_stream_writable.js:247:11)
  at WriteStream.Socket.write (net.js:661:40)
  at Log._write (G:\_data\r\xxxx\src\node_modules\grunt-legacy-log\index.js:161:26)
  at Log.wrapper [as _write] (G:\_data\r\xxxx\src\node_modules\lodash\index.js:3095:19)
  at Log._writeln (G:\_data\r\xxxx\src\node_modules\grunt-legacy-log\index.js:166:8)
  at Log.wrapper [as _writeln] (G:\_data\r\xxxx\src\node_modules\lodash\index.js:3095:19)
  at Log.writeln (G:\_data\r\xxxx\src\node_modules\grunt-legacy-log\index.js:177:8)
  at Log.wrapper (G:\_data\r\xxxx\src\node_modules\lodash\index.js:3095:19)
  at writeln (G:\_data\r\xxxx\src\node_modules\grunt\lib\grunt\fail.js:30:13)
  at Object.fail.fatal (G:\_data\r\xxxx\src\node_modules\grunt\lib\grunt\fail.js:46:3)
  at process.uncaughtHandler (G:\_data\r\xxxx\src\node_modules\grunt\lib\grunt.js:121:10)
  at emitOne (events.js:96:13)
  at process.emit (events.js:188:7)
  at process._fatalException (bootstrap_node.js:292:26)

When I work with SourceTree, all credentials work fine. Thanks for help.

Improve fetching logic and error handling

If you have an existing remote branch and a non-bare tree (as you always will) the fetch fails.

Fetching remote branch test-branch.
fatal: Refusing to fetch into current branch refs/heads/test-branch of non-bare repository
fatal: The remote end hung up unexpectedly

Need to fetch remote refs without a checkout somehow.

Clean push wipes existing branch files

I am using this plugin to separate our core work from compiled dists. I noticed on a clean build (i.e. no build output), the plugin will successfully fetch the remote branch but will end up deleting existing content on the branch besides build output.

It seems like perhaps the plugin needs to temporarily copy any files in the folder somewhere, clean the directory, fetch the remote branch, then copy the output back to ensure it either overwrites or adds content.

Here's an example:

Dist commit that wipes existing files: excaliburjs/excalibur-dist@2ac9d0b

Travis CI output:

Running "buildcontrol:dist" (buildcontrol) task

Creating git repository in "build".
Initialized empty Git repository in /home/travis/build/excaliburjs/Excalibur/build/.git/

Creating remote.

Fetching "test" history from https://<CREDENTIALS>@github.com/excaliburjs/excalibur-dist.
Branch test set up to track remote branch test from remote-c9c835.

Committing changes to "test".
[test 2ac9d0b] :shipit: Built excalibur from commit 8d2684b on branch HEAD
 6 files changed, 1 insertion(+), 170 deletions(-)
 delete mode 100644 .gitattributes
 delete mode 100644 .gitignore
 delete mode 100644 LICENSE.md
 delete mode 100644 README.md
 delete mode 100644 bower.json
 create mode 100644 dist/excalibur.min.js.map

Pushing test to https://<CREDENTIALS>@github.com/excaliburjs/excalibur-dist

Here's my task:

buildcontrol: {
         options: {
            dir: 'build',                     
            commit: true,
            push: true,
            message: ':shipit: Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%',
            config: {
               'user.name': 'Travis-CI',
               'user.email': '[email protected]'
            }
         },

         // continuous integration dists
         dist: {
            options: {
               branch: 'test', // TODO change to master when tested
               remote: 'https://github.com/excaliburjs/excalibur-dist',
               login: 'kamranayub',
               token: process.env.GH_DIST_TOKEN,
               fetchProgress: false
            }
         }
      },

Is this expected?

In my case, the repo is organized like:

- dist/
- README
- LICENSE
- bower.json

And I only copy compiled output to the dist folder.

I can workaround this by ensuring I clone the repository before copying my build output and then it works but I expected the plugin to gracefully handle a from-scratch build (e.g. on our CI server) without any custom workaround.

Using an existing remote

Is there a way to use an existing named remote? I have an established heroku remote for my dist folder that I'd like to use, but it seems I can only specify a remote url.

Specify remote branch to push to

Hi,

I'm facing an issue while trying to push the same built branch to two different remotes. My current buildcontrol task is:

buildcontrol: {
  options: {
    dir: 'dist',
    commit: true,
    push: true,
    message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
  },
  test: {
    options: {
      remote: '[email protected]:myapp-test.git',
      branch: 'master'
    }
  },
  production: {
    options: {
      remote: '[email protected]:myapp-prod.git',
      branch: 'master',
      tag: pkg.version
    }
  }
}

Note: grunt build is not deleting .git as it is a Yeoman app and follows your instructions.

I am trying to buildcontrol:test and buildcontrol:production the same branch (master) in /dist folder.

The first works fine, as it initialises the git, creates the test remote and sets the master branch to track it, commits and pushes all fine:

Creating remote.
Branch master set up to track remote branch master from remote-860a06.

The second time, it does not allow a different remote, since the master branch is already tracking the test remote (remote-860a06).

Creating remote.
Branch master set up to track remote branch master from remote-e37610.
Warning: The remote and local branches have diverged; please
resolve manually. Deleting the local *built code

.git directory will usually fix things up. Use --force to continue.*

I checked the task source code and I couldn't find a way around this, such as specifying which remote branch to push to. This way I would use two separate branches in the /dist folder, that would push to the master branch in separate remotes:

buildcontrol: {
  options: {
    dir: 'dist',
    commit: true,
    push: true,
    message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
  },
  test: {
    options: {
      remote: '[email protected]:evrythng-db2-test.git',
      branch: 'test',
      remoteBranch: 'master',
    }
  },
  production: {
    options: {
      remote: '[email protected]:evrythng-db2-prod.git',
      branch: 'prod',
      remoteBranch: 'master',
      tag: pkg.version
    }
  }
}

I need to push to master as it is was Heroku needs.

Any ideas?

Human readable remote names

I need human readable remote names.

When a config has multiple remotes, it gets very confusing:

build-control: {
    options: { },
    prod: { },
    dev: { }
}

Instead the git remote saying remote-23de it should say remote-prod-23de.

Add support for git authentification

When running in a CI environment (for instance Travis), there's no ssh key to help authenticating someone to the remote git.

Github provide https git endpoints that work this way: https://<user>:<token>@github.com/repo.git

We sure can provide the formatted URL manually, but this makes it tricky to keep the secure token out of the logs. Adding a user/token options and ensuring in the task we never log the token would be pretty useful.

build-control hangs after ctrl+c

When deploying, if ctrl+c is pressed any time during the deployment phase, grunt-build-control hangs.

I have to use killall grunt to kill the process.

CI and local differences

When using buildcontrol locally, everything works fine, all the files in my "dist" folder get commited and pushed to gihub.

However, when running the same command on Travis CI, some files get removed from from the folder, resulting in partially commited version.

I inspected the output, and locally I get create mode 100644 templates/66c3b9bc.combined.html, while on Travis, for the same file, I get delete mode 100644 templates/66c3b9bc.combined.html

Same Gruntfile on both, same commands. Is there a setting I'm unaware of?

(also worth noting, that locally, the %sourceBranch% is correct, and on Travis, I get (unavailable))

Build control swallows git diff output when checking requirements

The call to git diff at https://github.com/robwierzbowski/grunt-build-control/blob/master/tasks/build_control.js#L135 only checks whether the output from the command is non-empty before throwing the uncommitted changes error on the following line.

I've had a situation where a line endings were being adjusted by Git and the output of git diff was:

warning: CRLF will be replaced by LF in dist/images/flag.svg.
The file will have its original line endings in your working directory.

Easy enough to fix, but hard to actually determine as buildcontrol doesn't log the result of the git diff command; it only performs the "is empty" check and then assumes all non-empty results must be due to uncommitted changes.

My suggestion is to log the output from git diff so users can easily identify and resolve their issue. Adjusting the error message thrown would also help in ensuring users aren't misled into looking for uncommitted changes.

build-control always loads the default(?) options

I've set build-control up for my project but it doesn't seem to get the configuration I'm giving it, look at the screenshot below.
screenshot from 2015-03-29 01 06 55

dist directory's content:

screenshot from 2015-03-29 01 08 37

The issue is not actually fixed but I've switched to another grunt task to deploy to github pages

Show progress?

I was just about to post an issue about the task hanging indefinitely but before I could post it, the task completed ๐Ÿ˜„

I'm not sure why it took so long though โ€“ I guess it might be because I'm on a crappy internet connection and it's quite an image-heavy site but running the task in verbose mode, it seemed to get stuck at Creating remote.

Anyway, it made me think it'd be nice if the task could show progress โ€“ perhaps feeding through the git push progress? I'm not even sure if this would be possible but it might help confusion when the task is taking a long time to complete?

Nothing added to commit but untracked files present

Apologies if this has been answered elsewhere.

I'm trying to push my dist folder to a new gh-pages branch. When I run buildcontrol:pages it creates the gh-pages branch, but tells me there are untracked files - all the files from my master branch. My master branch is up to date. Could someone let me know what's happening here and how I might rectify it?

Running "buildcontrol:pages" (buildcontrol) task

Creating remote.

Creating branch "gh-pages".
Switched to a new branch 'gh-pages'

Committing changes to gh-pages.
Warning: On branch gh-pages

Initial commit

Untracked files:
    ../.bowerrc
    ../.editorconfig
    ../.gitattributes
    ../.gitignore
    ../.jshintrc
    ../.travis.yml
    ../Gruntfile.js
    ../README.md
    ../app/
    ../bower.json
    ../karma-e2e.conf.js
    ../karma.conf.js
    ../package.json
    ../test/

nothing added to commit but untracked files present
 Use --force to continue.

Aborted due to warnings.

Nothing added to commit but untracked files present

I was doing it well until one of my project and Repo. named GetNetworkAdaptersStats caused me a trouble :
On applying commit -m 'first commit'
I get:

    On branch master

     Initial commit

     Untracked files:
                              GetNetworkAdaptersStats.sln
                              GetNetworkAdaptersStats.v12.suo
                             GetNetworkAdaptersStats/ 

  nothing added to commit but untracked files present

PS.Apologies if I'm commiting a duplicated issue because i didn't find a solution to my problem anywhere

Create git tags

Is it possible to add functionality to specify / set git tags?

So far that's the only functionality that I've been missing in this plugin. Otherwise great work!

Using '../' as a remote and "error: the requested upstream branch does not exist"

I've configured grunt-build-control to commit the built code to the build branch of the local repository. But now if I clone the repo of this project and build it, I get an error when running grunt buildcontrol:

Running "buildcontrol:build" (buildcontrol) task

Creating git repository in build.
Initialized empty Git repository in d:/tmp/sffjs/build/.git/

Creating remote.
Warning: error: the requested upstream branch 'remote-36736c/build' does not exist
hint:
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint:
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
 Use --force to continue.

For it to work, I need to create the local build branch manually (git branch --track build origin/build). Is it possible to avoid this?

Pass commit message via commandline

Is it possible to pass commit message via command line, while using grunt build control? The option to specify the message in the Gruntfile.js file doesn't suit my requirements.

I would need something that can dynamically use the commit message passed at runtime to commit to the remote repository.

Let branch option take a single branch or a local:remote branch pair

Right now you can't separately version two branches with the same name for separate repositories:

version_build: {
  options: {
    dir: 'dist',
    commit: true,
    push: true
  },
  some_repo: {
    options: {
      remote: 'some_remote',
      branch: 'master',
    }
  },
  other_repo: {
    options: {
      remote: 'some_other_remote',
      branch: 'master',
    }
  }
}

If branch took an optional local:remote pair, you could have some_repo_master:master and some_other_repo_master:master. We could either enforce the pair or support both singular and pair configuration.

Remove force push option?

It works, but should it? I don't want to encourage bad practices, especially automated ones. Are there common situations where a force push to a remote repo is good practice or required?

Error handling

After looking at the task with fresh eyes, I think we can get rid of manual error catching unless we want to catch and continue. The error warnings after the error code seemed kludgey, and I don't think we would be able to add useful tips beyond what the error itself is reporting.

This is an issue in reverse, already tore them out. But interested in feedback / opinions, and whether we should add some or all back in.

Semantic Versioning - Auto alpha/rc tag names

We are trying to use build control in a semantic versioned distro. I'm hoping to be able to do something like what I posted below. I want to be able to run grunt buildcontrol:alpha and have a tag that is 2.1.0.alpha.4, or whatever is one number higher than the most recent alpha release matching that version. Of course it'd be nice to still be able to create 1.7.0.alpha.2 if needing to making changes on a different branch.

So logic would basically be, look at all tags for match. If no match then alpha/rc.1. If there is a match then match# +1.

    buildcontrol: {
      options: {
        ...
      },
      alpha: {
        options: {
          remote: 'git...',
          tag: pkg.version + '.alpha.' + number
        }
      },
      rc: {
        options: {
          remote: 'git...',
          tag: pkg.version + '.rc.' + number
        }
      },
      release: {
        options: {
          remote: 'git...',
          tag: pkg.version
        }
      },
    }

cannot post to remoteBranch on heroku

@dccatl asked on gitter.im:

Hi, I'm trying to use buildControl to commit to a local branch (non-master) and push to Heroku master branch. I'm trying to use the option remoteBranch but it doesn't seem to be working - always pushes to branch names the same as the local commit.

Would you be able to paste in your config?

Explain git conflicts better when they happen

If a git conflict occurs (usually because another user has force-pushed to the deployment server) delete the built code directory and run build and build control again.

So that's what the README currently says about git conflicts, but when I (and again, by "I" I mean @bobthebotmaker) actually ran into this problem, it manifested as:

Running "buildcontrol:review" (buildcontrol) task
Warning: The remote and local branches have diverged. Please
resolve manually before attempting again. Use --force to continue.

which led me (him) to throw up his hands and go bug hapless coworkers.

Since there are potentially multiple repos and branches involved here, I think it would be useful if this error message said something more like:

Warning: The remote `aws-review/master` (at e592c71) has diverged from local 
`review` (at 8af29e11). You may be able to fix this by deleting your `dist` directory 
and attempting again.

Or even offering to delete your dist directory for you!

I have no idea how much of this is convenient or possible, I'll try something after the ๐Ÿ’’

To create dir or not to create dir

Do you think we need to create the dir if it doesn't exist? The task should be run after a build process โ€” if there's no built code I think it's likely the user has mistyped the directory.

Maybe we could throw a helpful error about there being no code to version. Thoughts?

Cannot commit and push my files into github

Whenever $ git push -u origin master is being typed this is shown::
ssh:connect to host github.com port 22:Bad file number
fatal:Could not read from remote repository.
I do not understand why this is happening everytime.I am able to initialise git ,git add . and $git remote add origin [email protected]:etotientz/Hello.git. So,please clarify the error.

Any help for newbies

Sorry to post this as an issue but I'm struggling for 2 days to get the process of committing my code to a repository and I failed :(

I use yeoman to create an app, I installed the grunt-build-control, I executed git init in the main dir (not in "myApp/app") which created a "myApp/.git") .. running grunt build populates the "myApp/dist" directory but then I'm lost!

Are there any easy step by step (for dummies) on how to deploy my whole app, say, to beanstalkapp and set grunt to build / commit and push my whole app?

Thanks

Using templates in commit / tag messages

Hi,

I am not sure if the problem lies with grunt-build-control, but I tried to do something like this:

message: 'Build %sourceName% from <%= grunt.lastTag %>-%sourceCommit%'

where lastTag is a variable that I read with grunt-shell and wrote it to the grunt object before I ran grunt-build-control. When grunt-build-control tries to commit, it hangs indefinitely. I am not really sure why this doesn't work. Is template support not universal in grunt, or could it be something else?

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.