firim 0.2.5 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c80df0584f730a7a566c182fa5ef6d437a916d85fb1cff742c6d788b16235df
4
- data.tar.gz: 6ec7bc06b2ebb57bb0a05540383829faa206fb742f5b75c9aff55ad3cf6680d3
3
+ metadata.gz: 66fcc010478023aaf516603dab7599e7b9350bafab3c8a1525fcc03e07211019
4
+ data.tar.gz: 5245cc8e2ac4c32bc5243a8312b5935ed348f54cfd06d5341101864e8cd78024
5
5
  SHA512:
6
- metadata.gz: 05d6dc9a9221d71a98820192f4545cf1f3ff58165c2abfa984e3f3ab4d825170ac45e1523cfbd563774c80a8ac4f1fc7ae5c300e5fc485cff141d7ec5d2b31a8
7
- data.tar.gz: 2ec46da632712e5c33181d57c8fc3284001f8e2de09f30fefef0b4505e09ee17cfadae253e3d62f0f7f5ce2c72ed68e0e9d7129d59fcd84608150a0dc0a73990
6
+ metadata.gz: a611ed061774608677a7c8ad7e2d70471ae610f8d6b90cd06b13ee17ab8474b723f324f17e10208a4e3a4047326de3c0c8202c3fe1e0615fa72a6cb94eea84a0
7
+ data.tar.gz: ed5f4d0e0acfe3ad6b1679aecaf520a5c9cd206d64191944e24828d9e22ed9669d019a92036cc3f207cfd94be08077e5bf2ffaac62779e5ba7357a1770da60e5
data/README.md CHANGED
@@ -1,7 +1,10 @@
1
1
  ***Important***
2
2
 
3
- ***For the reason of fir.im had changed the Base URL, pls set `firim_api_url` to `http://api.jappstore.com/` or `http://api.bq04.com`.*** [issue](https://github.com/whlsxl/firim/issues/26)
3
+ ***For the reason of fir.im had changed the Base URL, pls set `firim_api_url` to `https://fir-api.fircli.cn/` or `https://api.bq04.com`.*** [issue](https://github.com/whlsxl/firim/issues/26)
4
4
 
5
+ From v0.2.5, the default `firim_api_url` set to `https://api.bq04.com`.
6
+
7
+ From firim v0.2.6, add show download url in terminal. [issue](https://github.com/whlsxl/firim/issues/32)
5
8
  # Firim
6
9
 
7
10
  Firim is a command tool to directly upload ipa and change app infomation on fir.im. fir.im is a Beta APP host website, you can upload ipa for AdHoc or InHouse distribution for testing.
@@ -26,7 +29,7 @@ Or install it yourself as:
26
29
 
27
30
  * `cd [your_project_folder]`
28
31
  * `firim init`
29
- * Enter your fir.im API Token (From [Fir.im](http://fir.im/apps))
32
+ * Enter your fir.im API Token (From [Fir.im](https://fir.im/apps))
30
33
  * `firim -i [your_ipa_path]`
31
34
 
32
35
  # Usage
@@ -43,6 +46,15 @@ Upload with icon ***NOTICE: Icon must be jpg format***
43
46
 
44
47
  Use `firim_api_url` to set API URL, if `fir.im` change the Base URL. default is `https://api.fir.im`.
45
48
 
49
+ ## Export environments
50
+
51
+ After upload app to fir.im, firim will export some environment variables.
52
+
53
+ * `FIRIM_APP_SHORT` app's short path
54
+ * `FIRIM_APP_NAME` app's name
55
+ * `FIRIM_MASTER_RELEASE_ID` app's master_release_id
56
+ * `FIRIM_APP_URL` the download page of the app
57
+
46
58
  # Assign API Token
47
59
 
48
60
  There are three ways to assign Firim API Token
@@ -70,7 +82,6 @@ The gem is available as open source under the terms of the [MIT License](http://
70
82
 
71
83
  # TODO
72
84
 
73
- * Export all app infomation to a file
74
- * Generate a web page show all the app's link and infomations
75
- * Show the app list, and export all app infomations to a file
76
- * force reset icon
85
+ - [ ] Generate a web page show all the app's link and infomations
86
+ - [x] Show the app list, and export all app infomations to a file
87
+ - [ ] force reset icon
data/lib/firim/options.rb CHANGED
@@ -21,6 +21,12 @@ module Firim
21
21
  FastlaneCore::ConfigItem.new(key: :firim_username,
22
22
  optional: true,
23
23
  description: "fir.im username, a sign for identify different token"),
24
+
25
+ FastlaneCore::ConfigItem.new(key: :download_page_prefix,
26
+ short_option: "-p",
27
+ optional: true,
28
+ default_value: "http://d.firim.top/",
29
+ description: "fir.im user api token"),
24
30
  # Content path
25
31
  FastlaneCore::ConfigItem.new(key: :ipa,
26
32
  optional: true,
data/lib/firim/runner.rb CHANGED
@@ -63,6 +63,11 @@ module Firim
63
63
  @app_info.merge!( update_app_info(@app_info["id"]))
64
64
  write_app_info_to_file
65
65
  options = @app_info
66
+ options[:download_page_url] = download_url
67
+ ENV["FIRIM_APP_URL"] = download_url
68
+ ENV["FIRIM_APP_NAME"] = options["name"]
69
+ ENV["FIRIM_APP_SHORT"] = options["short"]
70
+ ENV["FIRIM_MASTER_RELEASE_ID"] = options["master_release_id"]
66
71
  FastlaneCore::PrintTable.print_values(config: options, title: "#{@app_info["name"]}'s' App Info")
67
72
  end
68
73
 
@@ -70,11 +75,20 @@ module Firim
70
75
  file_path = self.options[:app_info_to_file_path]
71
76
  return if file_path == nil
72
77
  File.open(file_path, "at") do |f|
73
- f.write("#{@app_info["name"]}: http://fir.im/#{@app_info["short"]} \n")
78
+ d_url = download_url
79
+ f.write("#{@app_info["name"]}: #{d_url}\n")
74
80
  UI.success "Write app info to #{file_path} successed!"
75
81
  end
76
82
  end
77
83
 
84
+ def download_url
85
+ prefix = self.options[:download_page_prefix]
86
+ if prefix[1..-1] != "/"
87
+ return "#{prefix}/#{@app_info["short"]}"
88
+ end
89
+ return "#{prefix}#{@app_info["short"]}"
90
+ end
91
+
78
92
  def validation_response response_data
79
93
  error_code = response_data['code'].to_i
80
94
  return if error_code == 0
data/lib/firim/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Firim
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - whlsxl
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-14 00:00:00.000000000 Z
11
+ date: 2022-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane
@@ -97,7 +97,7 @@ homepage: https://github.com/whlsxl/firim
97
97
  licenses:
98
98
  - MIT
99
99
  metadata: {}
100
- post_install_message:
100
+ post_install_message:
101
101
  rdoc_options: []
102
102
  require_paths:
103
103
  - lib
@@ -112,8 +112,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  requirements: []
115
- rubygems_version: 3.1.2
116
- signing_key:
115
+ rubygems_version: 3.3.11
116
+ signing_key:
117
117
  specification_version: 4
118
118
  summary: fir.im command tool
119
119
  test_files: []