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

Set author name and email to package.json #58

Merged
merged 4 commits into from May 28, 2019

Conversation

GedasGa
Copy link
Contributor

@GedasGa GedasGa commented May 20, 2019

Platforms affected

electron

Motivation and Context

Fixes #55

Description

Get the author and email from the config.xml file and append it to the {project_root}/platforms/electron/www/package.json.

If the email in the config.xml is not set, add just the author to the {project_root}/platforms/electron/www/package.json. However, if the author tag is not defined in the config.xml file, the author value in the {project_root}/platforms/electron/www/package.json file will be set to default - "Apache Cordova Team".

Testing

Successfully built deb package for Linux, using the following build.json file:

{
  "electron": {
    "linux": {
      "package": [
        "deb"
      ],
      "arch": ["x64"]
    }
  }
}

And the following config.xml:

...
<author email="dev@cordova.apache.org" href="http://cordova.io">
    Apache Cordova Team
</author>
...

Besides, ran npm t.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@codecov-io
Copy link

codecov-io commented May 20, 2019

Codecov Report

Merging #58 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #58   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          14     14           
  Lines         612    614    +2     
=====================================
+ Hits          612    614    +2
Impacted Files Coverage Δ
bin/templates/cordova/lib/PackageJsonParser.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 506553c...ffd1ae3. Read the comment docs.

@erisu erisu added this to the 1.1.0 milestone May 27, 2019
Copy link
Member

@erisu erisu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 The changes looks good for resolving the reported issue when users supply an object for the author field in package.json.

This is a minor release as it introduces the ability to support object value.

@erisu erisu merged commit 13bef82 into apache:master May 28, 2019
@GedasGa GedasGa deleted the set-author-name-email branch June 17, 2019 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linux deb package
3 participants