When running grunt from a downloaded ( zip file ) infusion, a git error thrown

Description

Steps to reproduce:

1) Download a zip file of the infusion repo
https://github.com/fluid-project/infusion

2) Extract the zip and open the directory

3) run "npm install" from a command line from within the infusion directory

4) run "grunt" from a command line from within the infusion directory
Notice a git error is thrown.

Error:

fatal: Not a git repository (or any of the parent directories): .git
Loading "Gruntfile.js" tasks...ERROR
Error: Command failed: git rev-parse --verify --short HEAD
fatal: Not a git repository (or any of the parent directories): .git

Environment

None

Activity

Show:

Justin Obara July 22, 2016 at 1:46 PM

I tried this out using the "grunt tests" facility and also running the test directly in Firefox on Mac OS. I was unable to reproduce the test failure you mentioned. I even destroyed and rebuilt the vagrant VM used by "grunt tests".

Avtar Gill July 21, 2016 at 5:40 PM

, I was unable to provision a test environment using Infusion master due to the issue you mentioned above:

The vagrant up process is affected because we run provisioning commands in a temporary directory as part of a VirtualBox Windows shared folder workaround. .git directories are not copied in an effort to speed up the overall provisioning process. Your changes allow for successful vagrant up runs.

I did however see the following test fail when I ran grunt tests:

Are you able to reproduce this?

Justin Obara July 20, 2016 at 6:47 PM

The issue is likely that the grunt build now adds the git hash that the build was created from, however the zip download is not a git repo and does not have the ability to run git commands.

see: https://github.com/fluid-project/infusion/commit/c02f46714a773e88ca1bd59cb22acbe05675f43a

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created July 20, 2016 at 6:44 PM
Updated July 12, 2019 at 1:15 PM
Resolved September 7, 2016 at 1:02 AM