expo-libmpv 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,7 @@
1
1
  apply plugin: 'com.android.library'
2
2
 
3
3
  group = 'com.libmpv'
4
- version = '0.1.0'
5
-
4
+ version = '0.2.3'
6
5
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
7
6
  apply from: expoModulesCorePlugin
8
7
  applyKotlinExpoModulesCorePlugin()
@@ -44,7 +43,7 @@ android {
44
43
  namespace "com.libmpv"
45
44
  defaultConfig {
46
45
  versionCode 1
47
- versionName "0.1.0"
46
+ versionName "0.2.3"
48
47
  }
49
48
  lintOptions {
50
49
  abortOnError false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-libmpv",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "A libmpv Fabric component for Android",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -0,0 +1,65 @@
1
+ #! /usr/bin/python3
2
+
3
+ import os
4
+ import sys
5
+ import datetime
6
+
7
+ PACKAGE_JSON_PATH = './package.json'
8
+ BUILD_GRADLE_PATH = './android/build.gradle'
9
+
10
+ version = None
11
+ with open(PACKAGE_JSON_PATH,'r') as read_handle:
12
+ for line in read_handle.readlines():
13
+ if 'version' in line:
14
+ version = line.split(':')[1].split(',')[0].strip()
15
+
16
+ if len(sys.argv) < 2:
17
+ print(f"Pass a new version. Current version is {version.replace('"','')}")
18
+ sys.exit(1)
19
+
20
+ if sys.argv[1] == 'read':
21
+ print(version.replace('"',''),end='')
22
+ sys.exit(0)
23
+
24
+ build_date = datetime.datetime.now().strftime('%B %d, %Y')
25
+ build_version = sys.argv[1]
26
+
27
+ def update_info(
28
+ input_path:str,
29
+ version_needle:str=None,
30
+ version_replacement:str=None,
31
+ build_needle:str=None,
32
+ build_replacement:str=None
33
+ ):
34
+ print(f"Updating {input_path}")
35
+ file_content = ''
36
+ with open(input_path,'r') as read_handle:
37
+ for line in read_handle.readlines():
38
+ if version_needle and version_needle in line:
39
+ file_content += version_replacement
40
+ elif build_needle and build_needle in line:
41
+ file_content += build_replacement
42
+ else:
43
+ file_content += line
44
+ with open(input_path,'w') as write_handle:
45
+ write_handle.write(file_content)
46
+
47
+
48
+ update_info(
49
+ input_path=PACKAGE_JSON_PATH,
50
+ version_needle='"version"',
51
+ version_replacement=f' "version": "{build_version}",\n'
52
+ )
53
+
54
+ update_info(
55
+ input_path=BUILD_GRADLE_PATH,
56
+ version_needle='version = ',
57
+ version_replacement=f"version = '{build_version}'"
58
+ )
59
+
60
+
61
+ update_info(
62
+ input_path=BUILD_GRADLE_PATH,
63
+ version_needle='versionName',
64
+ version_replacement=f' versionName "{build_version}"\n'
65
+ )