fastlane-plugin-gitlab_release 0.1.0 → 0.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a1fb6fa82e9ef8d42ea7a9a04a9d96ae86b7c7da9b6396ecf946c1d3654edf1
|
4
|
+
data.tar.gz: 6cffc19cc5a0dec2d913bd2871c961e8c5fb58f7d2fee1e874333e337d7ca08f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3ef0b553ca8a43c5b128e35de0c1ca111f122998a740405e87523ec72a1bc7afc564850f8ad83d8b9797ad0f74726e8e8edf934c1a7966b17c59fc1d3569e4c
|
7
|
+
data.tar.gz: bf83c152c5e5680a8d700a128458f50a4f0a4520046f6e703ef4ec258cfaf9f367091857a5f4ba04dd6e839aec32fdafd32d47adc1f49de9a04227ea7b87ef00
|
data/README.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
# gitlab_release plugin
|
2
2
|
|
3
3
|
[](https://rubygems.org/gems/fastlane-plugin-gitlab_release)
|
4
|
+
[](https://github.com/andreadelfante/fastlane-plugin-gitlab_release/blob/master/LICENSE)
|
5
|
+
[](https://rubygems.org/gems/fastlane-plugin-gitlab_release)
|
6
|
+
[](https://travis-ci.org/andreadelfante/fastlane-plugin-gitlab_release)
|
7
|
+
|
8
|
+
The Fastlane wrapper of [gitlab-release-tools](https://github.com/andreadelfante/gitlab-release-tools).
|
4
9
|
|
5
10
|
## Getting Started
|
6
11
|
|
@@ -10,17 +15,17 @@ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To
|
|
10
15
|
fastlane add_plugin gitlab_release
|
11
16
|
```
|
12
17
|
|
13
|
-
## About gitlab_release
|
14
|
-
|
15
|
-
Fastlane wrapper of gitlab-release-tools
|
16
|
-
|
17
|
-
**Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
|
18
|
-
|
19
18
|
## Example
|
20
19
|
|
21
|
-
|
20
|
+
```ruby
|
21
|
+
version_name = '1.0'
|
22
|
+
|
23
|
+
changelog = gitlab_release_changelog(version_name: version_name) # for more fastlane action gitlab_release_changelog
|
24
|
+
puts("Changelog with no reference:\n#{changelog}") # or changelog.to_s
|
25
|
+
puts("Changelog with reference:\n#{changelog.to_s_with_reference}")
|
22
26
|
|
23
|
-
|
27
|
+
gitlab_release_close(version_name: version_name, entries: changelog) # for more fastlane action gitlab_release_close
|
28
|
+
```
|
24
29
|
|
25
30
|
## Run tests for this plugin
|
26
31
|
|
@@ -7,10 +7,10 @@ module Fastlane
|
|
7
7
|
def self.run(params)
|
8
8
|
require 'gitlab/release/changelog/generator'
|
9
9
|
|
10
|
-
endpoint = params[:endpoint]
|
11
|
-
private_token = params[:private_token]
|
10
|
+
endpoint = params[:endpoint]
|
11
|
+
private_token = params[:private_token]
|
12
12
|
version_name = params[:version_name]
|
13
|
-
project_id = params[:project_id]
|
13
|
+
project_id = params[:project_id]
|
14
14
|
include_mrs = params[:include_mrs]
|
15
15
|
include_issues = params[:include_issues]
|
16
16
|
split_key = params[:split_key]
|
@@ -22,7 +22,8 @@ module Fastlane
|
|
22
22
|
array_mrs_labels = filtering_mrs_labels.split(split_key) unless filtering_mrs_labels.empty?
|
23
23
|
array_issues_labels = filtering_issues_labels.split(split_key) unless filtering_issues_labels.empty?
|
24
24
|
|
25
|
-
changelog_generator = Gitlab::Release::Changelog::Generator.new(endpoint,
|
25
|
+
changelog_generator = Gitlab::Release::Changelog::Generator.new(endpoint: endpoint,
|
26
|
+
private_token: private_token)
|
26
27
|
|
27
28
|
UI.message("Creating changelog for version '#{version_name}'.")
|
28
29
|
changelog = changelog_generator.changelog(version_name,
|
@@ -33,7 +34,7 @@ module Fastlane
|
|
33
34
|
filtering_mrs_labels: array_mrs_labels,
|
34
35
|
filtering_issues_labels: array_issues_labels)
|
35
36
|
|
36
|
-
UI.success("Generated changelog for #{version_name} successfully!
|
37
|
+
UI.success("Generated changelog for #{version_name} successfully!")
|
37
38
|
changelog
|
38
39
|
end
|
39
40
|
|
@@ -57,21 +58,21 @@ module Fastlane
|
|
57
58
|
[
|
58
59
|
FastlaneCore::ConfigItem.new(key: :endpoint,
|
59
60
|
env_name: "GITLAB_API_ENDPOINT",
|
60
|
-
description: "API endpoint URL, default: ENV['GITLAB_API_ENDPOINT'] and falls back to ENV['CI_API_V4_URL']",
|
61
|
+
description: "The API endpoint URL, default: ENV['GITLAB_API_ENDPOINT'] and falls back to ENV['CI_API_V4_URL']",
|
61
62
|
optional: true,
|
62
63
|
type: String),
|
63
64
|
FastlaneCore::ConfigItem.new(key: :private_token,
|
64
65
|
env_name: "GITLAB_API_PRIVATE_TOKEN",
|
65
|
-
description: "
|
66
|
+
description: "User's private token or OAuth2 access token",
|
66
67
|
optional: true,
|
67
68
|
type: String),
|
68
69
|
FastlaneCore::ConfigItem.new(key: :version_name,
|
69
|
-
description: "The
|
70
|
+
description: "The name of the version. (ex: 1.0)",
|
70
71
|
optional: false,
|
71
72
|
type: String),
|
72
73
|
FastlaneCore::ConfigItem.new(key: :project_id,
|
73
74
|
env_name: "CI_PROJECT_ID",
|
74
|
-
description: "The id of this project",
|
75
|
+
description: "The id of this project, given from GitLab. Default ENV[\"CI_PROJECT_ID\"]",
|
75
76
|
optional: true,
|
76
77
|
is_string: false,
|
77
78
|
verify_block: proc do |value|
|
@@ -79,18 +80,18 @@ module Fastlane
|
|
79
80
|
when String, Integer
|
80
81
|
@project_id = value
|
81
82
|
else
|
82
|
-
UI.user_error!("The project_id must be a String or Integer value
|
83
|
+
UI.user_error!("The project_id must be a String or Integer value")
|
83
84
|
end
|
84
85
|
end),
|
85
86
|
FastlaneCore::ConfigItem.new(key: :include_mrs,
|
86
87
|
env_name: "GITLAB_RELEASE_INCLUDE_MRS",
|
87
|
-
description: "Should
|
88
|
+
description: "Should the generator include merge requests?",
|
88
89
|
optional: true,
|
89
90
|
type: Boolean,
|
90
91
|
default_value: true),
|
91
92
|
FastlaneCore::ConfigItem.new(key: :include_issues,
|
92
93
|
env_name: "GITLAB_RELEASE_INCLUDE_ISSUES",
|
93
|
-
description: "Should
|
94
|
+
description: "Should the generator include issues?",
|
94
95
|
optional: true,
|
95
96
|
type: Boolean,
|
96
97
|
default_value: false),
|
@@ -9,15 +9,16 @@ module Fastlane
|
|
9
9
|
def self.run(params)
|
10
10
|
require 'gitlab/release/manager'
|
11
11
|
|
12
|
-
endpoint = params[:endpoint]
|
13
|
-
private_token = params[:private_token]
|
12
|
+
endpoint = params[:endpoint]
|
13
|
+
private_token = params[:private_token]
|
14
14
|
version_name = params[:version_name]
|
15
15
|
entries = params[:entries]
|
16
16
|
tag_name = params[:tag_name] || version_name
|
17
|
-
project_id = params[:project_id]
|
18
|
-
ref = params[:ref]
|
17
|
+
project_id = params[:project_id]
|
18
|
+
ref = params[:ref]
|
19
19
|
|
20
|
-
manager = Gitlab::Release::Manager.new(endpoint,
|
20
|
+
manager = Gitlab::Release::Manager.new(endpoint: endpoint,
|
21
|
+
private_token: private_token)
|
21
22
|
|
22
23
|
UI.message("Closing all milestones related to version '#{version_name}'")
|
23
24
|
manager.close_milestones(version_name,
|
@@ -26,7 +27,7 @@ module Fastlane
|
|
26
27
|
|
27
28
|
UI.message("Defining tag '#{tag_name}' in '#{ref}'")
|
28
29
|
manager.define_tag(tag_name,
|
29
|
-
entries.to_s_with_reference
|
30
|
+
entries.to_s_with_reference,
|
30
31
|
project_id: project_id,
|
31
32
|
ref: ref)
|
32
33
|
UI.success("Defined tag '#{tag_name}' with changelog successfully!")
|
@@ -48,16 +49,16 @@ module Fastlane
|
|
48
49
|
[
|
49
50
|
FastlaneCore::ConfigItem.new(key: :endpoint,
|
50
51
|
env_name: "GITLAB_API_ENDPOINT",
|
51
|
-
description: "API endpoint URL, default: ENV['GITLAB_API_ENDPOINT'] and falls back to ENV['CI_API_V4_URL']",
|
52
|
+
description: "The API endpoint URL, default: ENV['GITLAB_API_ENDPOINT'] and falls back to ENV['CI_API_V4_URL']",
|
52
53
|
optional: true,
|
53
54
|
type: String),
|
54
55
|
FastlaneCore::ConfigItem.new(key: :private_token,
|
55
56
|
env_name: "GITLAB_API_PRIVATE_TOKEN",
|
56
|
-
description: "
|
57
|
+
description: "User's private token or OAuth2 access token",
|
57
58
|
optional: true,
|
58
59
|
type: String),
|
59
60
|
FastlaneCore::ConfigItem.new(key: :version_name,
|
60
|
-
description: "The
|
61
|
+
description: "The name of the version. (ex: 1.0)",
|
61
62
|
optional: false,
|
62
63
|
type: String),
|
63
64
|
FastlaneCore::ConfigItem.new(key: :entries,
|
@@ -65,12 +66,12 @@ module Fastlane
|
|
65
66
|
optional: false,
|
66
67
|
type: Gitlab::Release::Changelog::Entries),
|
67
68
|
FastlaneCore::ConfigItem.new(key: :tag_name,
|
68
|
-
description: "The
|
69
|
+
description: "The name of the tag. (ex: 1.0). Default: version_name value",
|
69
70
|
optional: true,
|
70
71
|
type: String),
|
71
72
|
FastlaneCore::ConfigItem.new(key: :project_id,
|
72
73
|
env_name: "CI_PROJECT_ID",
|
73
|
-
description: "The id of this project",
|
74
|
+
description: "The id of this project, given from GitLab. Default ENV[\"CI_PROJECT_ID\"]",
|
74
75
|
optional: true,
|
75
76
|
is_string: false,
|
76
77
|
verify_block: proc do |value|
|
@@ -78,12 +79,12 @@ module Fastlane
|
|
78
79
|
when String, Integer
|
79
80
|
@project_id = value
|
80
81
|
else
|
81
|
-
UI.user_error!("The project_id must be a String or Integer value
|
82
|
+
UI.user_error!("The project_id must be a String or Integer value")
|
82
83
|
end
|
83
84
|
end),
|
84
85
|
FastlaneCore::ConfigItem.new(key: :ref,
|
85
86
|
env_name: "CI_COMMIT_SHA",
|
86
|
-
description: "The
|
87
|
+
description: "The commit SHA. Default ENV[\"CI_COMMIT_SHA\"]",
|
87
88
|
optional: true,
|
88
89
|
type: String)
|
89
90
|
]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-gitlab_release
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrea Del Fante
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gitlab-release-tools
|