Skip to content

Commit

Permalink
fix(package): fix version error (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
hypery2k committed Dec 24, 2016
1 parent e0b9b7d commit 1992e95
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 156 deletions.
20 changes: 20 additions & 0 deletions etc/release.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

var args = process.argv.slice(2),
fs = require('fs'),
xml2js = require('xml2js'),
xmlParser = new xml2js.Parser(),
builder = new xml2js.Builder(),
exec = require('child_process').exec;

var packageJSON = require(__dirname + '/../package.json'),
pluginXML = fs.readFileSync(__dirname + '/../plugin.xml');


xmlParser.parseString(pluginXML, function (err, result) {
result.plugin.$.version = packageJSON.version;
var xml = builder.buildObject(result, {includeWhiteChars: true});
fs.writeFile(__dirname + '/../plugin.xml', xml, function (err) {
if (err) throw err;
});
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"changelog:add": "git add CHANGELOG.md && git commit -m 'updated CHANGELOG.md'",
"release:pre": "npm run clean",
"release:post": "npm run changelog && npm run changelog:add",
"release:post": "node etc/release.js && git add plugin.xml && git commit -m 'Update plugin' && npm run changelog && npm run changelog:add",
"release:major": "npm version major && npm run release:pre && git push origin && git push origin --tags && npm run release:post && npm publish",
"release:minor": "npm version minor && npm run release:pre && git push origin && git push origin --tags && npm run release:post && npm publish",
"release:patch": "npm version patch && npm run release:pre && git push origin && git push origin --tags && npm run release:post && npm publish"
},
"devDependencies": {
"conventional-changelog-cli": "1.2.0",
"fs": "0.0.1-security",
"ink-docstrap": "1.3.0",
"jsdoc": "3.4.0",
"jsdoc-to-markdown": "1.3.9",
Expand Down
240 changes: 85 additions & 155 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,159 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013-2014 appPlant UG
Copyright (c) 2016 Martin Reinhardt
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-email"
version="1.2.2">

<name>EmailComposer</name>
<description>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-email" version="1.2.4">
<name>EmailComposer</name>
<description>
Provides access to the standard interface that manages.
the editing and sending an email message
</description>
<author>Martin Reinhardt, Sebastián Katzer</author>
<license>Apache 2.0</license>
<keywords>cordova,email</keywords>
<repo>https://github.com/hypery2k/cordova-email-plugin.git</repo>
<issue>https://github.com/hypery2k/cordova-email-plugin/issues</issue>

<engines>
<engine name="cordova" version=">=4.0.0" />
</engines>

<!-- interface -->
<js-module src="www/email_composer.js" name="EmailComposer">
<clobbers target="cordova.plugins.email" />
<clobbers target="plugin.email" />
<author>Martin Reinhardt, Sebastián Katzer</author>
<license>Apache 2.0</license>
<keywords>cordova,email</keywords>
<repo>https://github.com/hypery2k/cordova-email-plugin.git</repo>
<issue>https://github.com/hypery2k/cordova-email-plugin/issues</issue>
<engines>
<engine name="cordova" version=">=4.0.0"/>
</engines>
<js-module src="www/email_composer.js" name="EmailComposer">
<clobbers target="cordova.plugins.email"/>
<clobbers target="plugin.email"/>
</js-module>
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="EmailComposer">
<param name="ios-package" value="APPEmailComposer"/>
</feature>
</config-file>
<config-file target="*-Info.plist" parent="LSApplicationQueriesSchemes">
<array>
<string>mailto</string>
</array>
</config-file>
<header-file src="src/ios/APPEmailComposer.h"/>
<header-file src="src/ios/APPEmailComposerImpl.h"/>
<source-file src="src/ios/APPEmailComposer.m"/>
<source-file src="src/ios/APPEmailComposerImpl.m"/>
<framework src="MessageUI.framework"/>
<framework src="MobileCoreServices.framework"/>
</platform>
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="EmailComposer">
<param name="android-package" value="de.martinreinhardt.cordova.plugins.email.EmailComposer"/>
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
</config-file>
<source-file src="src/android/EmailComposer.java" target-dir="src/de/martinreinhardt/cordova/plugins/email"/>
<source-file src="src/android/EmailComposerImpl.java" target-dir="src/de/martinreinhardt/cordova/plugins/email"/>
</platform>
<platform name="amazon-fireos">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="EmailComposer">
<param name="android-package" value="de.martinreinhardt.cordova.plugins.email.EmailComposer"/>
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
</config-file>
<source-file src="src/android/EmailComposer.java" target-dir="src/de/martinreinhardt/cordova/plugins/email"/>
<source-file src="src/android/EmailComposerImpl.java" target-dir="src/de/martinreinhardt/cordova/plugins/email"/>
</platform>
<platform name="wp8">
<config-file target="config.xml" parent="/*">
<feature name="EmailComposer">
<param name="wp-package" value="EmailComposer"/>
</feature>
</config-file>
<source-file src="src/wp8/EmailComposer.cs"/>
<source-file src="src/wp8/Options.cs"/>
</platform>
<platform name="windows">
<js-module src="src/windows/EmailComposerProxy.js" name="EmailComposerProxy">
<runs/>
</js-module>

<!-- ios -->
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="EmailComposer">
<param name="ios-package" value="APPEmailComposer"/>
</feature>
</config-file>

<config-file target="*-Info.plist" parent="LSApplicationQueriesSchemes">
<array>
<string>mailto</string>
</array>
</config-file>

<header-file src="src/ios/APPEmailComposer.h" />
<source-file src="src/ios/APPEmailComposer.m" />
<header-file src="src/ios/APPEmailComposerImpl.h" />
<source-file src="src/ios/APPEmailComposerImpl.m" />

<framework src="MessageUI.framework" />
<framework src="MobileCoreServices.framework" />

</platform>

<!-- android -->
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="EmailComposer">
<param name="android-package"
value="de.martinreinhardt.cordova.plugins.email.EmailComposer"/>
</feature>
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
</config-file>

<source-file
src="src/android/EmailComposer.java"
target-dir="src/de/martinreinhardt/cordova/plugins/email" />

<source-file
src="src/android/EmailComposerImpl.java"
target-dir="src/de/martinreinhardt/cordova/plugins/email" />

</platform>

<!-- amazon-fireos -->
<platform name="amazon-fireos">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="EmailComposer">
<param name="android-package"
value="de.martinreinhardt.cordova.plugins.email.EmailComposer"/>
</feature>
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
</config-file>

<source-file
src="src/android/EmailComposer.java"
target-dir="src/de/martinreinhardt/cordova/plugins/email" />

<source-file
src="src/android/EmailComposerImpl.java"
target-dir="src/de/martinreinhardt/cordova/plugins/email" />

</platform>

<!-- wp8 -->
<platform name="wp8">
<config-file target="config.xml" parent="/*">
<feature name="EmailComposer">
<param name="wp-package" value="EmailComposer"/>
</feature>
</config-file>

<source-file src="src/wp8/EmailComposer.cs" />
<source-file src="src/wp8/Options.cs" />
</platform>

<!-- windows -->
<platform name="windows">
<js-module src="src/windows/EmailComposerProxy.js" name="EmailComposerProxy">
<runs />
</js-module>
<js-module src="src/windows/EmailComposerProxyImpl.js" name="EmailComposerProxyImpl">
<runs />
</js-module>

</platform>

<!-- browser -->
<platform name="browser">

<config-file target="res/xml/config.xml" parent="/*">
<feature name="EmailComposer">
<param name="browser-package"
value="de.martinreinhardt.cordova.plugins.email.EmailComposer"/>
</feature>
</config-file>

<js-module src="src/browser/EmailComposerProxy.js" name="EmailComposerProxy">
<runs />
</js-module>

</platform>

</plugin>
<js-module src="src/windows/EmailComposerProxyImpl.js" name="EmailComposerProxyImpl">
<runs/>
</js-module>
</platform>
<platform name="browser">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="EmailComposer">
<param name="browser-package" value="de.martinreinhardt.cordova.plugins.email.EmailComposer"/>
</feature>
</config-file>
<js-module src="src/browser/EmailComposerProxy.js" name="EmailComposerProxy">
<runs/>
</js-module>
</platform>
</plugin>

0 comments on commit 1992e95

Please sign in to comment.