Runapk 2.1.0 → 2.2.0

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +45 -25
  3. data/lib/runapk.rb +19 -9
  4. data/lib/runapk/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7aa028d7ee9882b6d6e49f107726e56539fdd61f708df3c51dafd949fd4351b
4
- data.tar.gz: e5257f1fe102594db0ea5fe9bc145526d7aea9fa2f79b49f7173a9aaa836f73a
3
+ metadata.gz: 6f3b5552092d7033d642ffea49fea9504eafdcb81a89d7cf6019040185fb53f0
4
+ data.tar.gz: 30ca51bd2c864d98b37e99037708f125f1cf8836a68e0cbf92788d2166c4d436
5
5
  SHA512:
6
- metadata.gz: 16ebba3c1ad220bf936eb2afca8e6e44c15f6d492a4994ea1e2b0f02c54293228eabba57118724ab7cb005ace4c5a64bd6322a1af887166ebff0898d0b57021c
7
- data.tar.gz: 1dbe11539c1a3d4e9a765c2283546db04c10185d36172299963656226f3593046ed900f04f4a64c29dec7ec16af6ca0cabb70e24607400b3722c3f7acb9daee6
6
+ metadata.gz: 52e6801868f45ada4fc8e868167cea09634fe2385396f131488288f591c54ea55a896df8219b5c770c524fbefbaba0f081f18ae27510812643369ad5cc8b54e5
7
+ data.tar.gz: 3d0bfa4967fb56cbe27c42bd16ebe64eb1da4ecc1e639159a0f9b61b701295bec17f364ea6c861d0816e73333e48e137e46da3281aeba23f9341b13d955bf6cf
data/README.md CHANGED
@@ -1,28 +1,47 @@
1
1
  # Runapk
2
2
 
3
- Runapk is a command line tool that exports applications built in ionic, its goal is to make simple apk creation, signature and management, say goodbye to folder navigation and hello to the `` runapk`` command.
3
+ Runapk extends the capacity of ionic cli, providing an refined app exporting experience.
4
4
 
5
- ## Installation
5
+ *Shortlink https://git.io/fAU5m*
6
6
 
7
- Install it yourself as:
7
+ ## Table of Contents
8
+ - [Introduction](#introduction)
9
+ - [Installation](#installation)
10
+ - [Supported Os](#supported-os)
11
+ - [Requirements](#requirements)
12
+ - [Rubygems](#rubygems)
13
+ - [Usage](#usage)
14
+ - [Development](#development)
15
+ - [Contributing](#contributing)
16
+ - [License](#license)
17
+ - [Code of Conduct](#code-of-conduct)
8
18
 
9
- $ gem install Runapk
19
+ ## Introduction
10
20
 
11
- Then you can call in your terminal:
21
+ When working with Applications that relies on ionic sometimes you get stuck with a thousands of commands and folder navigation, Runapk comes to solve this problem combining all these steps into a refined experience, forgeth the necessity to browse through folders and executing commands.
12
22
 
13
- $ runapk
23
+ Just run ``runapk`` :D and you're ready to go!
14
24
 
15
- ## Supported OS
25
+ Gabriel Lacerda Runapk author.
16
26
 
27
+ ## Installation
28
+ ### Supported OS
17
29
  - Mac
18
30
  - Windows
19
31
  - Linux
20
-
21
- ## Dependencies
22
-
32
+ ### Requirements
33
+ - Cordova
34
+ - Ionic CLI
23
35
  - Ruby
24
36
  - Jarsigner (Install java sdk, add it to your path and you be fine)
25
37
  - Zipalign (Install android sdk, add a build tools version folder to your path and you be fine)
38
+ ### Rubygems
39
+
40
+ Install it yourself as:
41
+
42
+ ```sh
43
+ gem install Runapk
44
+ ```
26
45
 
27
46
  ## Usage
28
47
 
@@ -35,26 +54,27 @@ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg R
35
54
  ```
36
55
 
37
56
  3. Create a ``runapk.yml`` in your ionic app root folder with this content:
38
- ```
39
- app:
40
- name: 'App Name'
41
- version: '1.0.0'
42
- android:
43
- version: '5.0.0'
44
- sign:
45
- path: '~/Desktop/your-key.keystore'
46
- ionic:
47
- version: 1
48
- output:
49
- path: '~/Desktop'
57
+ ```yaml
58
+ app: # App specific information
59
+ name: 'App Name' # Your App name
60
+ version: '1.0.0' # Your App version
61
+ location: '' # Your App location
62
+ android: # Platform specific information
63
+ version: '5.0.0' # Your Android version
64
+ sign: # App sign specific information
65
+ path: 'demo.keystore' # Path to your keystore
66
+ ionic: # Ionic specific information
67
+ version: 1 # Your ionic version, versions 1 & 2 supported
68
+ output: # Output specific information
69
+ path: '~/Desktop' # Your app output path
50
70
  ```
51
71
 
52
- Replace these properties according to your project
72
+ > Replace these properties according to your project
53
73
 
54
- 4. In your project root folder just run
74
+ 4. In your project root folder run
55
75
 
56
76
  ```
57
- runapk
77
+ runapk
58
78
  ```
59
79
 
60
80
  ## Development
data/lib/runapk.rb CHANGED
@@ -30,7 +30,7 @@ def compiler(c, mode)
30
30
  end
31
31
 
32
32
  config = YAML.load_file("#{c}")
33
-
33
+
34
34
  app_name = config['app']['name'].delete(' ')
35
35
  app_version = config['app']['version']
36
36
  app_location = config['app']['location']
@@ -42,19 +42,29 @@ def compiler(c, mode)
42
42
  case ionic_version
43
43
  when 1
44
44
  platform_build_folder = 'platforms/android/build/outputs/apk'
45
+ case prod
46
+ when true
47
+ app_release_name = 'android-release-unsigned.apk'
48
+ else
49
+ app_release_name = 'android-debug.apk'
50
+ end
45
51
  when 2
46
52
  case prod
47
53
  when true
48
54
  platform_build_folder = 'platforms/android/app/build/outputs/apk/release'
55
+ app_release_name = 'app-release-unsigned.apk'
49
56
  else
50
57
  platform_build_folder = 'platforms/android/app/build/outputs/apk/debug'
58
+ app_release_name = 'app-debug.apk'
51
59
  end
52
60
  when 3
53
61
  case prod
54
62
  when true
55
63
  platform_build_folder = 'platforms/android/app/build/outputs/apk/release'
64
+ app_release_name = 'app-release-unsigned.apk'
56
65
  else
57
66
  platform_build_folder = 'platforms/android/app/build/outputs/apk/debug'
67
+ app_release_name = 'app-debug.apk'
58
68
  end
59
69
  else
60
70
  phrase 'Invalid ionic version'.red
@@ -72,13 +82,13 @@ def compiler(c, mode)
72
82
  case prod
73
83
  when true
74
84
  phrase 'Signing apk, enter the password of your certificate'.green
75
-
76
- cmd("(cd #{app_location} && jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore #{cert_path} #{platform_build_folder}/android-release-unsigned.apk alias_name)")
85
+
86
+ cmd("(cd #{app_location} && jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore #{cert_path} #{platform_build_folder}/#{app_release_name} alias_name)")
77
87
  end
78
-
88
+
79
89
  phrase 'Compressing apk'.green + " #{app_name}#{app_version}.apk".blue
80
-
81
- cmd("(cd #{app_location} && zipalign -v 4 #{platform_build_folder}/android-release-unsigned.apk #{platform_build_folder}/#{app_name}#{app_version}.apk)")
90
+
91
+ cmd("(cd #{app_location} && zipalign -v 4 #{platform_build_folder}/#{app_release_name} #{platform_build_folder}/#{app_name}#{app_version}.apk)")
82
92
 
83
93
  phrase 'Moving apk to: '.green + "#{output_path}".blue
84
94
 
@@ -93,13 +103,13 @@ def setup()
93
103
  phrase_simple '🤩 Welcome to RunApk! 🤩'.blue
94
104
  phrase_simple '⛱ RunApk is an ionic app exporting tool! 🏖'.green
95
105
  phrase "👩🏻‍💻 If you you'ld like to help, follow: " + "https://github.com/gabriellacerda/runapk".blue
96
-
106
+
97
107
  prompt = TTY::Prompt.new
98
-
108
+
99
109
  type = prompt.select("👰 Choose a pipeline:", %w(Development Production))
100
110
 
101
111
  config_file = './runapk.yml'
102
-
112
+
103
113
  case File.file?(config_file)
104
114
  when true
105
115
  case type
@@ -1,3 +1,3 @@
1
1
  module Runapk
2
- VERSION = "2.1.0"
2
+ VERSION = "2.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Runapk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GabrielLacerda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-01 00:00:00.000000000 Z
11
+ date: 2018-08-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: RunApk comes to help when the problem is to export ionic apks
14
14
  email: