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 Comes back as Undefined #197

Open
spyke01 opened this issue Jan 2, 2017 · 3 comments
Open

Version Comes back as Undefined #197

spyke01 opened this issue Jan 2, 2017 · 3 comments
Labels

Comments

@spyke01
Copy link

spyke01 commented Jan 2, 2017

When I run the bump it successfully bumps the version in the package but other items relying on the version get undefined instead of a version number.

Here's my bump config:

        // Handle updating the version number
        bump: {
            options: {
				files:         ['package.json'],
				updateConfigs: ['pkg'],
				commit: false,
				push: false
			}


        },

Here's the code that I'm using to pull the updated pkg item

		'string-replace': {
			version: {
				files: {
					'dist/includes/constants.php': 'includes/constants.php',
				},
				options: {
					replacements: [{
						pattern: /{{ VERSION }}/g,
						replacement: grunt.config.get('pkg.version')
					}]
				}
			}
		},

Any idea what's happening here?

@msmid
Copy link

msmid commented Jan 6, 2017

Hi,

try to get pkg.version like this grunt.config('pkg.version')

@spyke01
Copy link
Author

spyke01 commented Jan 6, 2017

I still get undefined afterwards.

@eddiemonge
Copy link
Collaborator

Whats your config for setting the pkg version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants