fastlane-plugin-redmine_file_upload 4.0.1 → 4.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6dbc95690f62ae965dd45f8a4877005e9c1a557bb84c65e60a58d0999c54b66
4
- data.tar.gz: 12b576b8edce800a05f0feba612205f619181908de87ca06c50c25ad4778f758
3
+ metadata.gz: e113284088f79dbb50fbc6189013be4c7b5e7ecfb050758dfab674a582926906
4
+ data.tar.gz: 91526870085eb6c33abe08400ec95104508b4fc41bc316c361835113182c8bdf
5
5
  SHA512:
6
- metadata.gz: ed648af7387316334c6233e8e208e8417d4e0f48fd44174c52a88656f19ae34b02ec953d0781bcb6888b0956c1c717eb8559a7d2670fb646729829998d386703
7
- data.tar.gz: f62729b5b357a50dca54ab45ad4a749b854fedaa0a3342178cfb57cb4a291208f0c21c9e33b3a8bcad1a3eaaaa3be474b9aa039726ba4941bea21d8389f91333
6
+ metadata.gz: 8434dd746718037b3ec2db020d959f1f6f506389e7ff65c8c28a6be229890a367044741e920bea80e14a7730af7eec3766ee853e79579962cd563f65f20e39bb
7
+ data.tar.gz: 832c3ac74c2de0f234e681b754eb7bc96282f2d26cc46105ba619fd4f09efc7fa9e5da49d438d2b492d94dc4ce604fc3a9a91353ac7f1584d256a334b95cbd0b
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Gem Version](https://badge.fury.io/rb/fastlane-plugin-redmine_file_upload@2x.png)](https://badge.fury.io/rb/fastlane-plugin-redmine_file_upload)
2
+
1
3
  # redmine_file_upload plugin
2
4
 
3
5
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-redmine_file_upload)
@@ -16,7 +16,22 @@ module Fastlane
16
16
 
17
17
  # getting parameters
18
18
  file_path = params[:file_path]
19
- file_name = File.basename(file_path) unless file_path.nil?
19
+ version_number = ''
20
+ project_name = ''
21
+
22
+ if ENV.key?('BUILD_CODE') && !ENV['BUILD_CODE'].empty? && !ENV['BUILD_CODE'].nil?
23
+ version_number = "V" + ENV['BUILD_CODE'] + "_"
24
+ end
25
+ if ENV.key?('PROJECT_NAME')
26
+ project_name = ENV['PROJECT_NAME']
27
+ end
28
+ current_date = Time.new.strftime('%d_%m_%Y')
29
+ new_file_path = File.dirname(file_path) + "/#{project_name}App_" + version_number + current_date+File.extname(file_path) unless file_path.nil?
30
+ File.rename(file_path,new_file_path);
31
+ file_name = File.basename(new_file_path) unless new_file_path.nil?
32
+ file_path = new_file_path
33
+
34
+
20
35
 
21
36
  Actions.lane_context[SharedValues::REDMINE_UPLOAD_FILE_NAME] = file_name
22
37
 
@@ -45,7 +60,6 @@ module Fastlane
45
60
  end
46
61
 
47
62
  request_upload_content = Net::HTTP::Post.new(upload_content_uri.request_uri)
48
- UI.message("Request upload content #{upload_content_uri.port}")
49
63
  request_upload_content["Content-Type"] = "application/octet-stream"
50
64
  unless api_key.nil?
51
65
  request_upload_content["X-Redmine-API-Key"] = api_key.to_s
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module RedmineFileUpload
3
- VERSION = "4.0.1"
3
+ VERSION = "4.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-redmine_file_upload
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pravin Dodia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-06 00:00:00.000000000 Z
11
+ date: 2024-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry