Skip to content

Commit

Permalink
fix: lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Dec 2, 2022
1 parent 2842a05 commit 640a0c3
Show file tree
Hide file tree
Showing 15 changed files with 2,336 additions and 1,849 deletions.
3 changes: 3 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
plugins: [require.resolve("prettier-plugin-java")],
};
37 changes: 24 additions & 13 deletions .versionrc.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,47 @@
const bumpFiles = [
{
filename: './package.json',
type: 'json',
filename: "./package.json",
type: "json",
},
{
filename: './package-lock.json',
type: 'json',
filename: "./package-lock.json",
type: "json",
},
{
filename: './android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdater.java',
filename:
"./android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdater.java",
updater: {
readVersion: (contents) => {
const marketingVersionString = contents.match(/String pluginVersion = "(.*)";/);
const marketingVersionString = contents.match(
/String pluginVersion = "(.*)";/
);
const version = marketingVersionString.toString();
return version;
},
writeVersion: (contents, version) => {
const newContent = contents.replace(/String pluginVersion = ".*";/g, `String pluginVersion = "${version}";`);
const newContent = contents.replace(
/String pluginVersion = ".*";/g,
`String pluginVersion = "${version}";`
);
return newContent;
},
},
},
{
filename: './ios/Plugin/CapacitorUpdater.swift',
filename: "./ios/Plugin/CapacitorUpdater.swift",
updater: {
readVersion: (contents) => {
const marketingVersionString = contents.match(/let pluginVersion = "(.*)"/);
const marketingVersionString = contents.match(
/let pluginVersion = "(.*)"/
);
const version = marketingVersionString.toString();
return version;
},
writeVersion: (contents, version) => {
const newContent = contents.replace(/let pluginVersion = ".*"/g, `let pluginVersion = "${version}"`);
const newContent = contents.replace(
/let pluginVersion = ".*"/g,
`let pluginVersion = "${version}"`
);
return newContent;
},
},
Expand All @@ -39,12 +50,12 @@ const bumpFiles = [

module.exports = {
noVerify: true,
tagPrefix: '',
tagPrefix: "",
bumpFiles: bumpFiles,
packageFiles: [
{
filename: './package.json',
type: 'json',
filename: "./package.json",
type: "json",
},
],
};

0 comments on commit 640a0c3

Please sign in to comment.