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

Ng package.json and package.json cannot be distinguished, I just need to recognize package.json #1833

Open
jdbogdan opened this issue Mar 27, 2024 · 1 comment

Comments

@jdbogdan
Copy link

Azure DevOps Extensions

Artifact PR Description

Is your feature request related to a problem? Please describe.

Starting: VersionJSONFile

Task : Version JSON File
Description : Applies a version to a named field in a JSON File
Version : 2.38.6
Author : Black Marble
Help : Version: 2.38.6. More Information

Source Directory: web\projects\charge
Filename Pattern: \package.json
File search recursion: false
Version Number/Build Number: 1.0.265312
Use Build Number Directly: false
Version Filter to extract build number: \d+.\d+.\d+
Version Format for JSON File: {1}.{2}.{3}
Field to update (all if empty): version
Output: Version Number Parameter Name: OutputedVersion
Extracting version from the build number
Extracted Build Version: 1.0.265312
JSON Version Name will be: 1.0.265312
Added file web\projects\charge\ng-package.json via regex
Added file web\projects\charge\package.json via regex
Will apply 1.0.265312 to 2 files.
The version version is not present in the .json file so adding it
Adding Tag: "version": "1.0.265312"
src\wemr\web\projects\charge\ng-package.json - version applied
Updating the field 'version' version
Existing Tag: version": "0.0.1"
Replacement Tag: version": "1.0.265312"
web\projects\charge\package.json - version applied
Set the output variable 'OutputedVersion' with the value 1.0.265312

Describe the solution you'd like

Ng package.json and package.json cannot be distinguished, I just need to recognize package.json

Describe alternatives you've considered

No response

Additional context

No response

@rfennell
Copy link
Owner

Can you not just set the FilenamePattern parameter to select the ng-package.json files?

Or is it that if you set the FilenamePattern parameter to package.json it also finds the ng-package.json files?

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

No branches or pull requests

2 participants