affixapi 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +19 -0
- data/README.md +374 -0
- data/Rakefile +10 -0
- data/affixapi.gemspec +38 -0
- data/docs/AddressNoNonNullRequest.md +26 -0
- data/docs/AddressResponse.md +26 -0
- data/docs/Class20230301Api.md +1401 -0
- data/docs/ClientRequest.md +24 -0
- data/docs/ClientResponse.md +26 -0
- data/docs/CompanyResponse.md +28 -0
- data/docs/CoreApi.md +69 -0
- data/docs/CreateEmployeeRequest.md +68 -0
- data/docs/CreateEmployeeRequestBankAccount.md +26 -0
- data/docs/CreateEmployeeRequestManager.md +26 -0
- data/docs/CurrencyRequest.md +15 -0
- data/docs/CurrencyResponse.md +15 -0
- data/docs/DeveloperApi.md +777 -0
- data/docs/DisconnectResponse.md +18 -0
- data/docs/EmployeeResponse.md +74 -0
- data/docs/EmploymentNoNullEnumRequest.md +30 -0
- data/docs/EmploymentResponse.md +30 -0
- data/docs/GroupNoNullEnumRequest.md +24 -0
- data/docs/GroupResponse.md +24 -0
- data/docs/IdAndMessageResponse.md +20 -0
- data/docs/IdentityResponse.md +22 -0
- data/docs/InlineResponse400.md +20 -0
- data/docs/InlineResponse401.md +22 -0
- data/docs/InlineResponse409.md +22 -0
- data/docs/IntrospectResponse.md +24 -0
- data/docs/LocationNoNonNullRequest.md +26 -0
- data/docs/LocationResponse.md +26 -0
- data/docs/ManagementApi.md +420 -0
- data/docs/MessageResponse.md +18 -0
- data/docs/ModeRequest.md +15 -0
- data/docs/ModeResponse.md +15 -0
- data/docs/OfficialApi.md +631 -0
- data/docs/PayrunResponse.md +30 -0
- data/docs/PayslipResponse.md +44 -0
- data/docs/PayslipResponseContributions.md +20 -0
- data/docs/PayslipResponseDeductions.md +20 -0
- data/docs/PayslipResponseEarnings.md +22 -0
- data/docs/PayslipResponseTaxes.md +22 -0
- data/docs/ProviderRequest.md +15 -0
- data/docs/ProviderResponse.md +15 -0
- data/docs/ScopesRequest.md +15 -0
- data/docs/ScopesResponse.md +15 -0
- data/docs/TimeOffBalanceResponse.md +32 -0
- data/docs/TimeOffEntryResponse.md +40 -0
- data/docs/TimesheetResponse.md +32 -0
- data/docs/TokenRequest.md +26 -0
- data/docs/TokenResponse.md +26 -0
- data/git_push.sh +58 -0
- data/lib/openapi_client/api/class20230301_api.rb +1198 -0
- data/lib/openapi_client/api/core_api.rb +79 -0
- data/lib/openapi_client/api/developer_api.rb +677 -0
- data/lib/openapi_client/api/management_api.rb +380 -0
- data/lib/openapi_client/api/official_api.rb +543 -0
- data/lib/openapi_client/api_client.rb +390 -0
- data/lib/openapi_client/api_error.rb +57 -0
- data/lib/openapi_client/configuration.rb +288 -0
- data/lib/openapi_client/models/address_no_non_null_request.rb +295 -0
- data/lib/openapi_client/models/address_response.rb +295 -0
- data/lib/openapi_client/models/client_request.rb +269 -0
- data/lib/openapi_client/models/client_response.rb +284 -0
- data/lib/openapi_client/models/company_response.rb +279 -0
- data/lib/openapi_client/models/create_employee_request.rb +568 -0
- data/lib/openapi_client/models/create_employee_request_bank_account.rb +259 -0
- data/lib/openapi_client/models/create_employee_request_manager.rb +263 -0
- data/lib/openapi_client/models/currency_request.rb +38 -0
- data/lib/openapi_client/models/currency_response.rb +38 -0
- data/lib/openapi_client/models/disconnect_response.rb +258 -0
- data/lib/openapi_client/models/employee_response.rb +608 -0
- data/lib/openapi_client/models/employment_no_null_enum_request.rb +329 -0
- data/lib/openapi_client/models/employment_response.rb +329 -0
- data/lib/openapi_client/models/group_no_null_enum_request.rb +283 -0
- data/lib/openapi_client/models/group_response.rb +283 -0
- data/lib/openapi_client/models/id_and_message_response.rb +239 -0
- data/lib/openapi_client/models/identity_response.rb +250 -0
- data/lib/openapi_client/models/inline_response400.rb +227 -0
- data/lib/openapi_client/models/inline_response401.rb +299 -0
- data/lib/openapi_client/models/inline_response409.rb +278 -0
- data/lib/openapi_client/models/introspect_response.rb +269 -0
- data/lib/openapi_client/models/location_no_non_null_request.rb +263 -0
- data/lib/openapi_client/models/location_response.rb +263 -0
- data/lib/openapi_client/models/message_response.rb +223 -0
- data/lib/openapi_client/models/mode_request.rb +37 -0
- data/lib/openapi_client/models/mode_response.rb +37 -0
- data/lib/openapi_client/models/payrun_response.rb +342 -0
- data/lib/openapi_client/models/payslip_response.rb +448 -0
- data/lib/openapi_client/models/payslip_response_contributions.rb +238 -0
- data/lib/openapi_client/models/payslip_response_deductions.rb +238 -0
- data/lib/openapi_client/models/payslip_response_earnings.rb +250 -0
- data/lib/openapi_client/models/payslip_response_taxes.rb +248 -0
- data/lib/openapi_client/models/provider_request.rb +70 -0
- data/lib/openapi_client/models/provider_response.rb +70 -0
- data/lib/openapi_client/models/scopes_request.rb +55 -0
- data/lib/openapi_client/models/scopes_response.rb +55 -0
- data/lib/openapi_client/models/time_off_balance_response.rb +342 -0
- data/lib/openapi_client/models/time_off_entry_response.rb +408 -0
- data/lib/openapi_client/models/timesheet_response.rb +318 -0
- data/lib/openapi_client/models/token_request.rb +318 -0
- data/lib/openapi_client/models/token_response.rb +318 -0
- data/lib/openapi_client/version.rb +15 -0
- data/lib/openapi_client.rb +86 -0
- data/openapi_client-0.0.1.gem +0 -0
- data/pkg/affixapi-0.0.1.gem +0 -0
- data/spec/api/class20230301_api_spec.rb +260 -0
- data/spec/api/core_api_spec.rb +46 -0
- data/spec/api/developer_api_spec.rb +160 -0
- data/spec/api/management_api_spec.rb +103 -0
- data/spec/api/official_api_spec.rb +135 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/address_no_non_null_request_spec.rb +62 -0
- data/spec/models/address_response_spec.rb +62 -0
- data/spec/models/client_request_spec.rb +52 -0
- data/spec/models/client_response_spec.rb +58 -0
- data/spec/models/company_response_spec.rb +64 -0
- data/spec/models/create_employee_request_bank_account_spec.rb +58 -0
- data/spec/models/create_employee_request_manager_spec.rb +58 -0
- data/spec/models/create_employee_request_spec.rb +204 -0
- data/spec/models/currency_request_spec.rb +28 -0
- data/spec/models/currency_response_spec.rb +28 -0
- data/spec/models/disconnect_response_spec.rb +38 -0
- data/spec/models/employee_response_spec.rb +222 -0
- data/spec/models/employment_no_null_enum_request_spec.rb +78 -0
- data/spec/models/employment_response_spec.rb +78 -0
- data/spec/models/group_no_null_enum_request_spec.rb +56 -0
- data/spec/models/group_response_spec.rb +56 -0
- data/spec/models/id_and_message_response_spec.rb +40 -0
- data/spec/models/identity_response_spec.rb +46 -0
- data/spec/models/inline_response400_spec.rb +40 -0
- data/spec/models/inline_response401_spec.rb +54 -0
- data/spec/models/inline_response409_spec.rb +50 -0
- data/spec/models/introspect_response_spec.rb +52 -0
- data/spec/models/location_no_non_null_request_spec.rb +58 -0
- data/spec/models/location_response_spec.rb +58 -0
- data/spec/models/message_response_spec.rb +34 -0
- data/spec/models/mode_request_spec.rb +28 -0
- data/spec/models/mode_response_spec.rb +28 -0
- data/spec/models/payrun_response_spec.rb +78 -0
- data/spec/models/payslip_response_contributions_spec.rb +40 -0
- data/spec/models/payslip_response_deductions_spec.rb +40 -0
- data/spec/models/payslip_response_earnings_spec.rb +46 -0
- data/spec/models/payslip_response_spec.rb +116 -0
- data/spec/models/payslip_response_taxes_spec.rb +46 -0
- data/spec/models/provider_request_spec.rb +28 -0
- data/spec/models/provider_response_spec.rb +28 -0
- data/spec/models/scopes_request_spec.rb +28 -0
- data/spec/models/scopes_response_spec.rb +28 -0
- data/spec/models/time_off_balance_response_spec.rb +80 -0
- data/spec/models/time_off_entry_response_spec.rb +108 -0
- data/spec/models/timesheet_response_spec.rb +76 -0
- data/spec/models/token_request_spec.rb +62 -0
- data/spec/models/token_response_spec.rb +62 -0
- data/spec/spec_helper.rb +111 -0
- metadata +349 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
# OpenapiClient::PayslipResponseContributions
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | |
|
8
|
+
| **amount** | **Float** | if USD/EUR/GBP, in cent | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'openapi_client'
|
14
|
+
|
15
|
+
instance = OpenapiClient::PayslipResponseContributions.new(
|
16
|
+
name: Private Health Insurance (Employer),
|
17
|
+
amount: 3454
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# OpenapiClient::PayslipResponseDeductions
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | |
|
8
|
+
| **amount** | **Float** | if USD/EUR/GBP, in cent | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'openapi_client'
|
14
|
+
|
15
|
+
instance = OpenapiClient::PayslipResponseDeductions.new(
|
16
|
+
name: Private Insurance Premium (Employee),
|
17
|
+
amount: 3454
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# OpenapiClient::PayslipResponseEarnings
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | |
|
8
|
+
| **amount** | **Float** | if USD/EUR/GBP, in cent | |
|
9
|
+
| **hours** | **Float** | hours, if applicable | |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'openapi_client'
|
15
|
+
|
16
|
+
instance = OpenapiClient::PayslipResponseEarnings.new(
|
17
|
+
name: salary,
|
18
|
+
amount: 834234,
|
19
|
+
hours: 80
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# OpenapiClient::PayslipResponseTaxes
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | |
|
8
|
+
| **amount** | **Float** | if USD/EUR/GBP, in cent | |
|
9
|
+
| **employer_tax** | **Boolean** | | |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'openapi_client'
|
15
|
+
|
16
|
+
instance = OpenapiClient::PayslipResponseTaxes.new(
|
17
|
+
name: Income Tax,
|
18
|
+
amount: 10025,
|
19
|
+
employer_tax: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# OpenapiClient::ProviderRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
|
8
|
+
## Example
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'openapi_client'
|
12
|
+
|
13
|
+
instance = OpenapiClient::ProviderRequest.new()
|
14
|
+
```
|
15
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# OpenapiClient::ProviderResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
|
8
|
+
## Example
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'openapi_client'
|
12
|
+
|
13
|
+
instance = OpenapiClient::ProviderResponse.new()
|
14
|
+
```
|
15
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# OpenapiClient::TimeOffBalanceResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **employee_id** | **String** | The Affix-assigned id of the individual | |
|
8
|
+
| **remote_id** | **String** | the remote system-assigned id of the individual | |
|
9
|
+
| **balance** | **Float** | | |
|
10
|
+
| **used** | **Float** | | |
|
11
|
+
| **policy_name** | **String** | The name of the policy, as assigned by the remote system | |
|
12
|
+
| **policy_type** | **String** | | |
|
13
|
+
| **remote_created_at** | **Date** | | |
|
14
|
+
| **remote_modified_at** | **Date** | | |
|
15
|
+
|
16
|
+
## Example
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'openapi_client'
|
20
|
+
|
21
|
+
instance = OpenapiClient::TimeOffBalanceResponse.new(
|
22
|
+
employee_id: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw,
|
23
|
+
remote_id: 19202938,
|
24
|
+
balance: 24.5,
|
25
|
+
used: 12,
|
26
|
+
policy_name: Comp/In Lieu Time,
|
27
|
+
policy_type: null,
|
28
|
+
remote_created_at: Sun Oct 11 00:00:00 UTC 2020,
|
29
|
+
remote_modified_at: Sun Oct 11 00:00:00 UTC 2020
|
30
|
+
)
|
31
|
+
```
|
32
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# OpenapiClient::TimeOffEntryResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | The Affix-assigned id of the time off entry | |
|
8
|
+
| **remote_id** | **String** | the remote system-assigned id of the time off entry | |
|
9
|
+
| **employee_id** | **String** | the Affix-assigned id of the individual | |
|
10
|
+
| **start_date** | **Date** | | |
|
11
|
+
| **end_date** | **Date** | | |
|
12
|
+
| **amount** | **Float** | | |
|
13
|
+
| **unit** | **String** | | |
|
14
|
+
| **status** | **String** | | |
|
15
|
+
| **employee_note** | **String** | | |
|
16
|
+
| **request_type** | **String** | | |
|
17
|
+
| **remote_created_at** | **Date** | | |
|
18
|
+
| **remote_modified_at** | **Date** | | |
|
19
|
+
|
20
|
+
## Example
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
require 'openapi_client'
|
24
|
+
|
25
|
+
instance = OpenapiClient::TimeOffEntryResponse.new(
|
26
|
+
id: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw,
|
27
|
+
remote_id: 19202938,
|
28
|
+
employee_id: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw,
|
29
|
+
start_date: Sun Oct 11 00:00:00 UTC 2020,
|
30
|
+
end_date: Wed Oct 14 00:00:00 UTC 2020,
|
31
|
+
amount: 3,
|
32
|
+
unit: days,
|
33
|
+
status: approved,
|
34
|
+
employee_note: Visiting my family,
|
35
|
+
request_type: vacation,
|
36
|
+
remote_created_at: Sun Oct 11 00:00:00 UTC 2020,
|
37
|
+
remote_modified_at: Mon Oct 12 00:00:00 UTC 2020
|
38
|
+
)
|
39
|
+
```
|
40
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# OpenapiClient::TimesheetResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | The Affix-assigned id of the time off entry | |
|
8
|
+
| **remote_id** | **String** | the remote system-assigned id of the time off entry | |
|
9
|
+
| **employee_id** | **String** | the Affix-assigned id of the individual | |
|
10
|
+
| **start_time** | **Time** | | |
|
11
|
+
| **end_time** | **Time** | | |
|
12
|
+
| **hours_worked** | **Float** | | |
|
13
|
+
| **remote_created_at** | **Date** | | |
|
14
|
+
| **remote_modified_at** | **Date** | | |
|
15
|
+
|
16
|
+
## Example
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'openapi_client'
|
20
|
+
|
21
|
+
instance = OpenapiClient::TimesheetResponse.new(
|
22
|
+
id: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw,
|
23
|
+
remote_id: 19202938,
|
24
|
+
employee_id: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw,
|
25
|
+
start_time: 2020-10-11T08:00Z,
|
26
|
+
end_time: 2020-10-11T17:00Z,
|
27
|
+
hours_worked: 8,
|
28
|
+
remote_created_at: Sun Oct 11 00:00:00 UTC 2020,
|
29
|
+
remote_modified_at: Mon Oct 12 00:00:00 UTC 2020
|
30
|
+
)
|
31
|
+
```
|
32
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# OpenapiClient::TokenRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **client_id** | **String** | The client ID you received when you first created the application | |
|
8
|
+
| **client_secret** | **String** | The client secret. Since there can be multiple `client_secret`s (to allow for rotation of secrets without downtime to your customers), any current `client_secret` is valid Please email me after signup and I will set both your client secret and redirect_uri (required) when you reach out. | |
|
9
|
+
| **grant_type** | **String** | This is a hardcoded value required by the OAuth 2.1 spec | |
|
10
|
+
| **code** | **String** | This is the code you received in the query string | |
|
11
|
+
| **redirect_uri** | **String** | Indicates the URI to return the user to after authorization is complete, which is the endpoint on your server to receive the authorization_code. Must be identical to the redirect URI provided in the original link. Please email me after signup and I will set both your client secret and redirect_uri (required) when you reach out. | |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'openapi_client'
|
17
|
+
|
18
|
+
instance = OpenapiClient::TokenRequest.new(
|
19
|
+
client_id: 00000000-00000000-00000000-00000000,
|
20
|
+
client_secret: ffffffff-ffffffff-ffffffff-ffffffff,
|
21
|
+
grant_type: authorization_code,
|
22
|
+
code: Y2xpZW50IzkzMTU4MGQwLWYwYjctNGJiOC1iYmZmLWI4MTNlYzMxNTVjYXxjb2RlIzE1MmIwYjk3LTg2ZWMtNDZlNC1hZDUyLWY5ZTAxNzE2MDIwNAo=,
|
23
|
+
redirect_uri: https://example.com
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# OpenapiClient::TokenResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **access_token** | **String** | The issued access_token | [readonly] |
|
8
|
+
| **mode** | [**ModeResponse**](ModeResponse.md) | | |
|
9
|
+
| **provider** | [**ProviderResponse**](ProviderResponse.md) | | |
|
10
|
+
| **scopes** | [**Array<ScopesResponse>**](ScopesResponse.md) | One or more scope values indicating which parts of the user's account you wish to access. Note, slight deviation from the OAuth 2.1 spec in that the param is scopes (plural) is used vs scope (singular) | [readonly] |
|
11
|
+
| **token_type** | **String** | The token type to pass in the `Authorization` header | [readonly] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'openapi_client'
|
17
|
+
|
18
|
+
instance = OpenapiClient::TokenResponse.new(
|
19
|
+
access_token: Y2xpZW50IzkzMTU4MGQwLWYwYjctNGJiOC1iYmZmLWI4MTNlYzMxNTVjYXx0b2tlbiM4ZDY5NzMwZi1kNzI1LTQ1ZjYtYTVlOC1mZmQ0NWE3ZjhkNDE=,
|
20
|
+
mode: null,
|
21
|
+
provider: null,
|
22
|
+
scopes: ["identity","census"],
|
23
|
+
token_type: Bearer
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
data/git_push.sh
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
3
|
+
#
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
|
5
|
+
|
6
|
+
git_user_id=$1
|
7
|
+
git_repo_id=$2
|
8
|
+
release_note=$3
|
9
|
+
git_host=$4
|
10
|
+
|
11
|
+
if [ "$git_host" = "" ]; then
|
12
|
+
git_host="github.com"
|
13
|
+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
14
|
+
fi
|
15
|
+
|
16
|
+
if [ "$git_user_id" = "" ]; then
|
17
|
+
git_user_id="GIT_USER_ID"
|
18
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
19
|
+
fi
|
20
|
+
|
21
|
+
if [ "$git_repo_id" = "" ]; then
|
22
|
+
git_repo_id="GIT_REPO_ID"
|
23
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
24
|
+
fi
|
25
|
+
|
26
|
+
if [ "$release_note" = "" ]; then
|
27
|
+
release_note="Minor update"
|
28
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
29
|
+
fi
|
30
|
+
|
31
|
+
# Initialize the local directory as a Git repository
|
32
|
+
git init
|
33
|
+
|
34
|
+
# Adds the files in the local repository and stages them for commit.
|
35
|
+
git add .
|
36
|
+
|
37
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
38
|
+
git commit -m "$release_note"
|
39
|
+
|
40
|
+
# Sets the new remote
|
41
|
+
git_remote=`git remote`
|
42
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
43
|
+
|
44
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
45
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
46
|
+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
47
|
+
else
|
48
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
|
49
|
+
fi
|
50
|
+
|
51
|
+
fi
|
52
|
+
|
53
|
+
git pull origin master
|
54
|
+
|
55
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
56
|
+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
57
|
+
git push origin master 2>&1 | grep -v 'To https'
|
58
|
+
|