fn_ruby 0.1.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/LICENSE +201 -0
- data/README.md +110 -0
- data/Rakefile +8 -0
- data/VERSION +1 -0
- data/docs/App.md +9 -0
- data/docs/AppWrapper.md +9 -0
- data/docs/AppsApi.md +244 -0
- data/docs/AppsWrapper.md +9 -0
- data/docs/Error.md +8 -0
- data/docs/ErrorBody.md +9 -0
- data/docs/NewTask.md +9 -0
- data/docs/Route.md +17 -0
- data/docs/RouteWrapper.md +10 -0
- data/docs/RoutesApi.md +262 -0
- data/docs/RoutesWrapper.md +9 -0
- data/docs/Task.md +18 -0
- data/docs/TaskWrapper.md +8 -0
- data/docs/TasksApi.md +50 -0
- data/docs/Version.md +8 -0
- data/docs/VersionApi.md +48 -0
- data/fn_ruby.gemspec +46 -0
- data/git_push.sh +55 -0
- data/lib/fn_ruby/api/apps_api.rb +297 -0
- data/lib/fn_ruby/api/routes_api.rb +327 -0
- data/lib/fn_ruby/api/tasks_api.rb +72 -0
- data/lib/fn_ruby/api/version_api.rb +72 -0
- data/lib/fn_ruby/api_client.rb +388 -0
- data/lib/fn_ruby/api_error.rb +38 -0
- data/lib/fn_ruby/configuration.rb +202 -0
- data/lib/fn_ruby/models/app.rb +201 -0
- data/lib/fn_ruby/models/app_wrapper.rb +202 -0
- data/lib/fn_ruby/models/apps_wrapper.rb +204 -0
- data/lib/fn_ruby/models/error.rb +188 -0
- data/lib/fn_ruby/models/error_body.rb +197 -0
- data/lib/fn_ruby/models/new_task.rb +204 -0
- data/lib/fn_ruby/models/route.rb +328 -0
- data/lib/fn_ruby/models/route_wrapper.rb +211 -0
- data/lib/fn_ruby/models/routes_wrapper.rb +204 -0
- data/lib/fn_ruby/models/task.rb +329 -0
- data/lib/fn_ruby/models/task_wrapper.rb +193 -0
- data/lib/fn_ruby/models/version.rb +188 -0
- data/lib/fn_ruby/version.rb +15 -0
- data/lib/fn_ruby.rb +55 -0
- data/spec/api/apps_api_spec.rb +95 -0
- data/spec/api/routes_api_spec.rb +100 -0
- data/spec/api/tasks_api_spec.rb +46 -0
- data/spec/api/version_api_spec.rb +46 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/app_spec.rb +48 -0
- data/spec/models/app_wrapper_spec.rb +48 -0
- data/spec/models/apps_wrapper_spec.rb +48 -0
- data/spec/models/error_body_spec.rb +48 -0
- data/spec/models/error_spec.rb +42 -0
- data/spec/models/new_task_spec.rb +48 -0
- data/spec/models/route_spec.rb +104 -0
- data/spec/models/route_wrapper_spec.rb +54 -0
- data/spec/models/routes_wrapper_spec.rb +48 -0
- data/spec/models/task_spec.rb +106 -0
- data/spec/models/task_wrapper_spec.rb +42 -0
- data/spec/models/version_spec.rb +42 -0
- data/spec/spec_helper.rb +111 -0
- metadata +305 -0
data/docs/RoutesApi.md
ADDED
@@ -0,0 +1,262 @@
|
|
1
|
+
# OracleFunctions::RoutesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://127.0.0.1:8080/v1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**apps_app_routes_get**](RoutesApi.md#apps_app_routes_get) | **GET** /apps/{app}/routes | Get route list by app name.
|
8
|
+
[**apps_app_routes_post**](RoutesApi.md#apps_app_routes_post) | **POST** /apps/{app}/routes | Create new Route
|
9
|
+
[**apps_app_routes_route_delete**](RoutesApi.md#apps_app_routes_route_delete) | **DELETE** /apps/{app}/routes/{route} | Deletes the route
|
10
|
+
[**apps_app_routes_route_get**](RoutesApi.md#apps_app_routes_route_get) | **GET** /apps/{app}/routes/{route} | Gets route by name
|
11
|
+
[**apps_app_routes_route_patch**](RoutesApi.md#apps_app_routes_route_patch) | **PATCH** /apps/{app}/routes/{route} | Update a Route
|
12
|
+
|
13
|
+
|
14
|
+
# **apps_app_routes_get**
|
15
|
+
> RoutesWrapper apps_app_routes_get(app)
|
16
|
+
|
17
|
+
Get route list by app name.
|
18
|
+
|
19
|
+
This will list routes for a particular app.
|
20
|
+
|
21
|
+
### Example
|
22
|
+
```ruby
|
23
|
+
# load the gem
|
24
|
+
require 'fn_ruby'
|
25
|
+
|
26
|
+
api_instance = OracleFunctions::RoutesApi.new
|
27
|
+
|
28
|
+
app = "app_example" # String | Name of app for this set of routes.
|
29
|
+
|
30
|
+
|
31
|
+
begin
|
32
|
+
#Get route list by app name.
|
33
|
+
result = api_instance.apps_app_routes_get(app)
|
34
|
+
p result
|
35
|
+
rescue OracleFunctions::ApiError => e
|
36
|
+
puts "Exception when calling RoutesApi->apps_app_routes_get: #{e}"
|
37
|
+
end
|
38
|
+
```
|
39
|
+
|
40
|
+
### Parameters
|
41
|
+
|
42
|
+
Name | Type | Description | Notes
|
43
|
+
------------- | ------------- | ------------- | -------------
|
44
|
+
**app** | **String**| Name of app for this set of routes. |
|
45
|
+
|
46
|
+
### Return type
|
47
|
+
|
48
|
+
[**RoutesWrapper**](RoutesWrapper.md)
|
49
|
+
|
50
|
+
### Authorization
|
51
|
+
|
52
|
+
No authorization required
|
53
|
+
|
54
|
+
### HTTP request headers
|
55
|
+
|
56
|
+
- **Content-Type**: application/json
|
57
|
+
- **Accept**: application/json
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
# **apps_app_routes_post**
|
62
|
+
> RouteWrapper apps_app_routes_post(app, body)
|
63
|
+
|
64
|
+
Create new Route
|
65
|
+
|
66
|
+
Create a new route in an app, if app doesn't exists, it creates the app
|
67
|
+
|
68
|
+
### Example
|
69
|
+
```ruby
|
70
|
+
# load the gem
|
71
|
+
require 'fn_ruby'
|
72
|
+
|
73
|
+
api_instance = OracleFunctions::RoutesApi.new
|
74
|
+
|
75
|
+
app = "app_example" # String | name of the app.
|
76
|
+
|
77
|
+
body = OracleFunctions::RouteWrapper.new # RouteWrapper | One route to post.
|
78
|
+
|
79
|
+
|
80
|
+
begin
|
81
|
+
#Create new Route
|
82
|
+
result = api_instance.apps_app_routes_post(app, body)
|
83
|
+
p result
|
84
|
+
rescue OracleFunctions::ApiError => e
|
85
|
+
puts "Exception when calling RoutesApi->apps_app_routes_post: #{e}"
|
86
|
+
end
|
87
|
+
```
|
88
|
+
|
89
|
+
### Parameters
|
90
|
+
|
91
|
+
Name | Type | Description | Notes
|
92
|
+
------------- | ------------- | ------------- | -------------
|
93
|
+
**app** | **String**| name of the app. |
|
94
|
+
**body** | [**RouteWrapper**](RouteWrapper.md)| One route to post. |
|
95
|
+
|
96
|
+
### Return type
|
97
|
+
|
98
|
+
[**RouteWrapper**](RouteWrapper.md)
|
99
|
+
|
100
|
+
### Authorization
|
101
|
+
|
102
|
+
No authorization required
|
103
|
+
|
104
|
+
### HTTP request headers
|
105
|
+
|
106
|
+
- **Content-Type**: application/json
|
107
|
+
- **Accept**: application/json
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
# **apps_app_routes_route_delete**
|
112
|
+
> apps_app_routes_route_delete(app, route)
|
113
|
+
|
114
|
+
Deletes the route
|
115
|
+
|
116
|
+
Deletes the route.
|
117
|
+
|
118
|
+
### Example
|
119
|
+
```ruby
|
120
|
+
# load the gem
|
121
|
+
require 'fn_ruby'
|
122
|
+
|
123
|
+
api_instance = OracleFunctions::RoutesApi.new
|
124
|
+
|
125
|
+
app = "app_example" # String | Name of app for this set of routes.
|
126
|
+
|
127
|
+
route = "route_example" # String | Route name
|
128
|
+
|
129
|
+
|
130
|
+
begin
|
131
|
+
#Deletes the route
|
132
|
+
api_instance.apps_app_routes_route_delete(app, route)
|
133
|
+
rescue OracleFunctions::ApiError => e
|
134
|
+
puts "Exception when calling RoutesApi->apps_app_routes_route_delete: #{e}"
|
135
|
+
end
|
136
|
+
```
|
137
|
+
|
138
|
+
### Parameters
|
139
|
+
|
140
|
+
Name | Type | Description | Notes
|
141
|
+
------------- | ------------- | ------------- | -------------
|
142
|
+
**app** | **String**| Name of app for this set of routes. |
|
143
|
+
**route** | **String**| Route name |
|
144
|
+
|
145
|
+
### Return type
|
146
|
+
|
147
|
+
nil (empty response body)
|
148
|
+
|
149
|
+
### Authorization
|
150
|
+
|
151
|
+
No authorization required
|
152
|
+
|
153
|
+
### HTTP request headers
|
154
|
+
|
155
|
+
- **Content-Type**: application/json
|
156
|
+
- **Accept**: application/json
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
# **apps_app_routes_route_get**
|
161
|
+
> RouteWrapper apps_app_routes_route_get(app, route)
|
162
|
+
|
163
|
+
Gets route by name
|
164
|
+
|
165
|
+
Gets a route by name.
|
166
|
+
|
167
|
+
### Example
|
168
|
+
```ruby
|
169
|
+
# load the gem
|
170
|
+
require 'fn_ruby'
|
171
|
+
|
172
|
+
api_instance = OracleFunctions::RoutesApi.new
|
173
|
+
|
174
|
+
app = "app_example" # String | Name of app for this set of routes.
|
175
|
+
|
176
|
+
route = "route_example" # String | Route name
|
177
|
+
|
178
|
+
|
179
|
+
begin
|
180
|
+
#Gets route by name
|
181
|
+
result = api_instance.apps_app_routes_route_get(app, route)
|
182
|
+
p result
|
183
|
+
rescue OracleFunctions::ApiError => e
|
184
|
+
puts "Exception when calling RoutesApi->apps_app_routes_route_get: #{e}"
|
185
|
+
end
|
186
|
+
```
|
187
|
+
|
188
|
+
### Parameters
|
189
|
+
|
190
|
+
Name | Type | Description | Notes
|
191
|
+
------------- | ------------- | ------------- | -------------
|
192
|
+
**app** | **String**| Name of app for this set of routes. |
|
193
|
+
**route** | **String**| Route name |
|
194
|
+
|
195
|
+
### Return type
|
196
|
+
|
197
|
+
[**RouteWrapper**](RouteWrapper.md)
|
198
|
+
|
199
|
+
### Authorization
|
200
|
+
|
201
|
+
No authorization required
|
202
|
+
|
203
|
+
### HTTP request headers
|
204
|
+
|
205
|
+
- **Content-Type**: application/json
|
206
|
+
- **Accept**: application/json
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
# **apps_app_routes_route_patch**
|
211
|
+
> RouteWrapper apps_app_routes_route_patch(app, route, body)
|
212
|
+
|
213
|
+
Update a Route
|
214
|
+
|
215
|
+
Update a route
|
216
|
+
|
217
|
+
### Example
|
218
|
+
```ruby
|
219
|
+
# load the gem
|
220
|
+
require 'fn_ruby'
|
221
|
+
|
222
|
+
api_instance = OracleFunctions::RoutesApi.new
|
223
|
+
|
224
|
+
app = "app_example" # String | name of the app.
|
225
|
+
|
226
|
+
route = "route_example" # String | route path.
|
227
|
+
|
228
|
+
body = OracleFunctions::RouteWrapper.new # RouteWrapper | One route to post.
|
229
|
+
|
230
|
+
|
231
|
+
begin
|
232
|
+
#Update a Route
|
233
|
+
result = api_instance.apps_app_routes_route_patch(app, route, body)
|
234
|
+
p result
|
235
|
+
rescue OracleFunctions::ApiError => e
|
236
|
+
puts "Exception when calling RoutesApi->apps_app_routes_route_patch: #{e}"
|
237
|
+
end
|
238
|
+
```
|
239
|
+
|
240
|
+
### Parameters
|
241
|
+
|
242
|
+
Name | Type | Description | Notes
|
243
|
+
------------- | ------------- | ------------- | -------------
|
244
|
+
**app** | **String**| name of the app. |
|
245
|
+
**route** | **String**| route path. |
|
246
|
+
**body** | [**RouteWrapper**](RouteWrapper.md)| One route to post. |
|
247
|
+
|
248
|
+
### Return type
|
249
|
+
|
250
|
+
[**RouteWrapper**](RouteWrapper.md)
|
251
|
+
|
252
|
+
### Authorization
|
253
|
+
|
254
|
+
No authorization required
|
255
|
+
|
256
|
+
### HTTP request headers
|
257
|
+
|
258
|
+
- **Content-Type**: application/json
|
259
|
+
- **Accept**: application/json
|
260
|
+
|
261
|
+
|
262
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# OracleFunctions::RoutesWrapper
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**routes** | [**Array<Route>**](Route.md) | |
|
7
|
+
**error** | [**ErrorBody**](ErrorBody.md) | | [optional]
|
8
|
+
|
9
|
+
|
data/docs/Task.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# OracleFunctions::Task
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**image** | **String** | Name of Docker image to use. This is optional and can be used to override the image defined at the group level. |
|
7
|
+
**payload** | **String** | Payload for the task. This is what you pass into each task to make it do something. | [optional]
|
8
|
+
**group_name** | **String** | Group this task belongs to. | [optional]
|
9
|
+
**error** | **String** | The error message, if status is 'error'. This is errors due to things outside the task itself. Errors from user code will be found in the log. | [optional]
|
10
|
+
**reason** | **String** | Machine usable reason for task being in this state. Valid values for error status are `timeout | killed | bad_exit`. Valid values for cancelled status are `client_request`. For everything else, this is undefined. | [optional]
|
11
|
+
**created_at** | **DateTime** | Time when task was submitted. Always in UTC. | [optional]
|
12
|
+
**started_at** | **DateTime** | Time when task started execution. Always in UTC. | [optional]
|
13
|
+
**completed_at** | **DateTime** | Time when task completed, whether it was successul or failed. Always in UTC. | [optional]
|
14
|
+
**retry_of** | **String** | If this field is set, then this task is a retry of the ID in this field. | [optional]
|
15
|
+
**retry_at** | **String** | If this field is set, then this task was retried by the task referenced in this field. | [optional]
|
16
|
+
**env_vars** | **Hash<String, String>** | Env vars for the task. Comes from the ones set on the Group. | [optional]
|
17
|
+
|
18
|
+
|
data/docs/TaskWrapper.md
ADDED
data/docs/TasksApi.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# OracleFunctions::TasksApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://127.0.0.1:8080/v1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**tasks_get**](TasksApi.md#tasks_get) | **GET** /tasks | Get next task.
|
8
|
+
|
9
|
+
|
10
|
+
# **tasks_get**
|
11
|
+
> TaskWrapper tasks_get
|
12
|
+
|
13
|
+
Get next task.
|
14
|
+
|
15
|
+
Gets the next task in the queue, ready for processing. Consumers should start processing tasks in order. No other consumer can retrieve this task.
|
16
|
+
|
17
|
+
### Example
|
18
|
+
```ruby
|
19
|
+
# load the gem
|
20
|
+
require 'fn_ruby'
|
21
|
+
|
22
|
+
api_instance = OracleFunctions::TasksApi.new
|
23
|
+
|
24
|
+
begin
|
25
|
+
#Get next task.
|
26
|
+
result = api_instance.tasks_get
|
27
|
+
p result
|
28
|
+
rescue OracleFunctions::ApiError => e
|
29
|
+
puts "Exception when calling TasksApi->tasks_get: #{e}"
|
30
|
+
end
|
31
|
+
```
|
32
|
+
|
33
|
+
### Parameters
|
34
|
+
This endpoint does not need any parameter.
|
35
|
+
|
36
|
+
### Return type
|
37
|
+
|
38
|
+
[**TaskWrapper**](TaskWrapper.md)
|
39
|
+
|
40
|
+
### Authorization
|
41
|
+
|
42
|
+
No authorization required
|
43
|
+
|
44
|
+
### HTTP request headers
|
45
|
+
|
46
|
+
- **Content-Type**: application/json
|
47
|
+
- **Accept**: application/json
|
48
|
+
|
49
|
+
|
50
|
+
|
data/docs/Version.md
ADDED
data/docs/VersionApi.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# OracleFunctions::VersionApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://127.0.0.1:8080/v1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**version_get**](VersionApi.md#version_get) | **GET** /version | Get daemon version.
|
8
|
+
|
9
|
+
|
10
|
+
# **version_get**
|
11
|
+
> Version version_get
|
12
|
+
|
13
|
+
Get daemon version.
|
14
|
+
|
15
|
+
### Example
|
16
|
+
```ruby
|
17
|
+
# load the gem
|
18
|
+
require 'fn_ruby'
|
19
|
+
|
20
|
+
api_instance = OracleFunctions::VersionApi.new
|
21
|
+
|
22
|
+
begin
|
23
|
+
#Get daemon version.
|
24
|
+
result = api_instance.version_get
|
25
|
+
p result
|
26
|
+
rescue OracleFunctions::ApiError => e
|
27
|
+
puts "Exception when calling VersionApi->version_get: #{e}"
|
28
|
+
end
|
29
|
+
```
|
30
|
+
|
31
|
+
### Parameters
|
32
|
+
This endpoint does not need any parameter.
|
33
|
+
|
34
|
+
### Return type
|
35
|
+
|
36
|
+
[**Version**](Version.md)
|
37
|
+
|
38
|
+
### Authorization
|
39
|
+
|
40
|
+
No authorization required
|
41
|
+
|
42
|
+
### HTTP request headers
|
43
|
+
|
44
|
+
- **Content-Type**: application/json
|
45
|
+
- **Accept**: application/json
|
46
|
+
|
47
|
+
|
48
|
+
|
data/fn_ruby.gemspec
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
#
|
3
|
+
=begin
|
4
|
+
#IronFunctions
|
5
|
+
|
6
|
+
#The open source serverless platform.
|
7
|
+
|
8
|
+
OpenAPI spec version: 0.1.29
|
9
|
+
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
+
Swagger Codegen version: 2.2.3
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "fn_ruby/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "fn_ruby"
|
20
|
+
s.version = OracleFunctions::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["Swagger-Codegen"]
|
23
|
+
s.email = ["treeder@gmail.com"]
|
24
|
+
s.homepage = "https://github.com/fnproject/fn_ruby"
|
25
|
+
s.summary = "Ruby gem for Oracle Functions"
|
26
|
+
s.description = "Ruby gem for Oracle Functions."
|
27
|
+
# TODO uncommnet and update below with a proper license
|
28
|
+
#s.license = "Apache 2.0"
|
29
|
+
s.required_ruby_version = ">= 1.9"
|
30
|
+
|
31
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
32
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
33
|
+
|
34
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
35
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
36
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
37
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
38
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
39
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
40
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
41
|
+
|
42
|
+
s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
|
43
|
+
s.test_files = `find spec/*`.split("\n")
|
44
|
+
s.executables = []
|
45
|
+
s.require_paths = ["lib"]
|
46
|
+
end
|
data/git_push.sh
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
#
|
3
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
4
|
+
#
|
5
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
6
|
+
#
|
7
|
+
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
8
|
+
|
9
|
+
git_user_id=$1
|
10
|
+
git_repo_id=$2
|
11
|
+
release_note=$3
|
12
|
+
|
13
|
+
if [ "$git_user_id" = "" ]; then
|
14
|
+
git_user_id=""
|
15
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
16
|
+
fi
|
17
|
+
|
18
|
+
if [ "$git_repo_id" = "" ]; then
|
19
|
+
git_repo_id=""
|
20
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
21
|
+
fi
|
22
|
+
|
23
|
+
if [ "$release_note" = "" ]; then
|
24
|
+
release_note=""
|
25
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
26
|
+
fi
|
27
|
+
|
28
|
+
# Initialize the local directory as a Git repository
|
29
|
+
git init
|
30
|
+
|
31
|
+
# Adds the files in the local repository and stages them for commit.
|
32
|
+
git add .
|
33
|
+
|
34
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
35
|
+
git commit -m "$release_note"
|
36
|
+
|
37
|
+
# Sets the new remote
|
38
|
+
git_remote=`git remote`
|
39
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
40
|
+
|
41
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
42
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
43
|
+
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
44
|
+
else
|
45
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
46
|
+
fi
|
47
|
+
|
48
|
+
fi
|
49
|
+
|
50
|
+
git pull origin master
|
51
|
+
|
52
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
53
|
+
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
54
|
+
git push origin master 2>&1 | grep -v 'To https'
|
55
|
+
|