seatsio 44.1.0 → 45.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +2 -0
- data/Gemfile.lock +2 -2
- data/lib/seatsio/charts.rb +0 -5
- data/lib/seatsio/domain.rb +7 -85
- data/lib/seatsio/events/change_object_status_request.rb +1 -2
- data/lib/seatsio/events.rb +16 -13
- data/lib/seatsio/seasons.rb +3 -4
- data/lib/seatsio/version.rb +1 -1
- data/release.mjs +24 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdd4179789ae397639cc2adeb699ef08bba663c37fad94fd5f7b548288a903f0
|
4
|
+
data.tar.gz: 2bb0b732ffc21d52031c58888433f5378c97c9c86b70753c66b9edc88a0255e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d15e85bef5d066ed46bc0b78e89eea0111ad1d2a9f8b07db6c294b3cd6a4c78cf0423b47e70b780319499d99d027052408a82f4d2586c44decb1ddd53c8462a5
|
7
|
+
data.tar.gz: 65c45a2ffd2260d5ddc72152c43e97acfc1c62fa927d96d66aed92a98072318d7df8ba9d33ad559af5f334e8856c2c0db46b7e4036e3299dc13eb37cdef77ee3
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
seatsio (
|
4
|
+
seatsio (45.0.0)
|
5
5
|
rest-client (~> 2.0, >= 2.0.2)
|
6
6
|
|
7
7
|
GEM
|
@@ -20,7 +20,7 @@ GEM
|
|
20
20
|
mime-types (3.3.1)
|
21
21
|
mime-types-data (~> 3.2015)
|
22
22
|
mime-types-data (3.2021.0225)
|
23
|
-
minitest (5.18.
|
23
|
+
minitest (5.18.1)
|
24
24
|
minitest-parallel_fork (1.3.0)
|
25
25
|
minitest (>= 5.15.0)
|
26
26
|
netrc (0.11.0)
|
data/lib/seatsio/charts.rb
CHANGED
@@ -105,11 +105,6 @@ module Seatsio
|
|
105
105
|
@http_client.post("charts/#{chart_key}/version/draft/actions/publish")
|
106
106
|
end
|
107
107
|
|
108
|
-
def save_social_distancing_rulesets(chart_key, rulesets)
|
109
|
-
payload = {"socialDistancingRulesets": rulesets}
|
110
|
-
@http_client.post("charts/#{chart_key}/social-distancing-rulesets", payload)
|
111
|
-
end
|
112
|
-
|
113
108
|
def list(chart_filter: nil, tag: nil, expand_events: nil, with_validation: false)
|
114
109
|
cursor = Pagination::Cursor.new(Chart, 'charts', @http_client)
|
115
110
|
cursor.set_query_param('filter', chart_filter)
|
data/lib/seatsio/domain.rb
CHANGED
@@ -8,7 +8,7 @@ module Seatsio
|
|
8
8
|
|
9
9
|
attr_reader :id, :key, :status, :name, :published_version_thumbnail_url,
|
10
10
|
:draft_version_thumbnail_url, :events, :tags, :archived,
|
11
|
-
:categories, :validation
|
11
|
+
:categories, :validation
|
12
12
|
|
13
13
|
def initialize(data)
|
14
14
|
@id = data['id']
|
@@ -21,21 +21,6 @@ module Seatsio
|
|
21
21
|
@tags = data['tags']
|
22
22
|
@archived = data['archived']
|
23
23
|
@validation = data['validation']
|
24
|
-
@social_distancing_rulesets = data['socialDistancingRulesets'].map {
|
25
|
-
|key, r| [key, SocialDistancingRuleset.new(r['name'],
|
26
|
-
number_of_disabled_seats_to_the_sides: r['numberOfDisabledSeatsToTheSides'],
|
27
|
-
disable_seats_in_front_and_behind: r['disableSeatsInFrontAndBehind'],
|
28
|
-
disable_diagonal_seats_in_front_and_behind: r['disableDiagonalSeatsInFrontAndBehind'],
|
29
|
-
number_of_disabled_aisle_seats: r['numberOfDisabledAisleSeats'],
|
30
|
-
max_group_size: r['maxGroupSize'],
|
31
|
-
max_occupancy_absolute: r['maxOccupancyAbsolute'],
|
32
|
-
max_occupancy_percentage: r['maxOccupancyPercentage'],
|
33
|
-
one_group_per_table: r['oneGroupPerTable'],
|
34
|
-
fixed_group_layout: r['fixedGroupLayout'],
|
35
|
-
disabled_seats: r['disabledSeats'],
|
36
|
-
enabled_seats: r['enabledSeats'],
|
37
|
-
index: r['index'])]
|
38
|
-
}.to_h
|
39
24
|
end
|
40
25
|
end
|
41
26
|
|
@@ -161,16 +146,18 @@ module Seatsio
|
|
161
146
|
|
162
147
|
class Event
|
163
148
|
|
164
|
-
attr_accessor :id, :key, :chart_key, :supports_best_available,
|
149
|
+
attr_accessor :id, :key, :chart_key, :name, :date, :supports_best_available,
|
165
150
|
:table_booking_config, :for_sale_config, :created_on, :updated_on, :channels,
|
166
|
-
:
|
151
|
+
:is_top_level_season, :is_partial_season,
|
167
152
|
:is_event_in_season, :top_level_season_key,
|
168
|
-
:
|
153
|
+
:object_categories, :categories
|
169
154
|
|
170
155
|
def initialize(data)
|
171
156
|
@id = data['id']
|
172
157
|
@key = data['key']
|
173
158
|
@chart_key = data['chartKey']
|
159
|
+
@name = data['name']
|
160
|
+
@date = Date.iso8601(data['date']) if data['date']
|
174
161
|
@supports_best_available = data['supportsBestAvailable']
|
175
162
|
@table_booking_config = TableBookingConfig::from_json(data['tableBookingConfig'])
|
176
163
|
@for_sale_config = ForSaleConfig.new(data['forSaleConfig']) if data['forSaleConfig']
|
@@ -179,7 +166,6 @@ module Seatsio
|
|
179
166
|
@channels = data['channels'].map {
|
180
167
|
|d| Channel.new(d['key'], d['name'], d['color'], d['index'], d['objects'])
|
181
168
|
} if data['channels']
|
182
|
-
@social_distancing_ruleset_key = data['socialDistancingRulesetKey']
|
183
169
|
@is_top_level_season = data['isTopLevelSeason']
|
184
170
|
@is_partial_season = data['isPartialSeason']
|
185
171
|
@is_event_in_season = data['isEventInSeason']
|
@@ -391,7 +377,7 @@ module Seatsio
|
|
391
377
|
:category_key, :entrance, :object_type, :hold_token, :category_label,
|
392
378
|
:ticket_type, :num_booked, :num_free, :num_held, :for_sale, :section,
|
393
379
|
:is_accessible, :is_companion_seat, :has_restricted_view, :displayed_object_type,
|
394
|
-
:left_neighbour, :right_neighbour, :is_available, :
|
380
|
+
:left_neighbour, :right_neighbour, :is_available, :channel,
|
395
381
|
:book_as_a_whole, :distance_to_focal_point, :holds, :num_seats
|
396
382
|
|
397
383
|
def initialize(data)
|
@@ -420,7 +406,6 @@ module Seatsio
|
|
420
406
|
@left_neighbour = data['leftNeighbour']
|
421
407
|
@right_neighbour = data['rightNeighbour']
|
422
408
|
@is_available = data['isAvailable']
|
423
|
-
@is_disabled_by_social_distancing = data['isDisabledBySocialDistancing']
|
424
409
|
@channel = data['channel']
|
425
410
|
@book_as_a_whole = data['bookAsAWhole']
|
426
411
|
@distance_to_focal_point = data['distanceToFocalPoint']
|
@@ -578,67 +563,4 @@ module Seatsio
|
|
578
563
|
end
|
579
564
|
object_details
|
580
565
|
end
|
581
|
-
|
582
|
-
class SocialDistancingRuleset
|
583
|
-
attr_reader :name, :number_of_disabled_seats_to_the_sides, :disable_seats_in_front_and_behind,
|
584
|
-
:disable_diagonal_seats_in_front_and_behind, :number_of_disabled_aisle_seats, :max_group_size, :max_occupancy_absolute,
|
585
|
-
:max_occupancy_percentage, :one_group_per_table, :fixed_group_layout, :disabled_seats, :enabled_seats, :index
|
586
|
-
|
587
|
-
def initialize(name, number_of_disabled_seats_to_the_sides: 0, disable_seats_in_front_and_behind: false, disable_diagonal_seats_in_front_and_behind: false,
|
588
|
-
number_of_disabled_aisle_seats: 0, max_group_size: 0, max_occupancy_absolute: 0, max_occupancy_percentage: 0, one_group_per_table: false,
|
589
|
-
fixed_group_layout: false, disabled_seats: [], enabled_seats: [], index: 0)
|
590
|
-
@name = name
|
591
|
-
@number_of_disabled_seats_to_the_sides = number_of_disabled_seats_to_the_sides
|
592
|
-
@disable_seats_in_front_and_behind = disable_seats_in_front_and_behind
|
593
|
-
@disable_diagonal_seats_in_front_and_behind = disable_diagonal_seats_in_front_and_behind
|
594
|
-
@number_of_disabled_aisle_seats = number_of_disabled_aisle_seats
|
595
|
-
@max_group_size = max_group_size
|
596
|
-
@max_occupancy_absolute = max_occupancy_absolute
|
597
|
-
@max_occupancy_percentage = max_occupancy_percentage
|
598
|
-
@one_group_per_table = one_group_per_table
|
599
|
-
@fixed_group_layout = fixed_group_layout
|
600
|
-
@disabled_seats = disabled_seats
|
601
|
-
@enabled_seats = enabled_seats
|
602
|
-
@index = index
|
603
|
-
end
|
604
|
-
|
605
|
-
def self.fixed(name, disabled_seats: [], index: 0)
|
606
|
-
SocialDistancingRuleset.new(name, index: index, disabled_seats: disabled_seats, fixed_group_layout: true)
|
607
|
-
end
|
608
|
-
|
609
|
-
def self.rule_based(name, number_of_disabled_seats_to_the_sides: 0, disable_seats_in_front_and_behind: false, disable_diagonal_seats_in_front_and_behind: false,
|
610
|
-
number_of_disabled_aisle_seats: 0, max_group_size: 0, max_occupancy_absolute: 0, max_occupancy_percentage: 0, one_group_per_table: false,
|
611
|
-
disabled_seats: [], enabled_seats: [], index: 0)
|
612
|
-
SocialDistancingRuleset.new(name,
|
613
|
-
number_of_disabled_seats_to_the_sides: number_of_disabled_seats_to_the_sides,
|
614
|
-
disable_seats_in_front_and_behind: disable_seats_in_front_and_behind,
|
615
|
-
disable_diagonal_seats_in_front_and_behind: disable_diagonal_seats_in_front_and_behind,
|
616
|
-
number_of_disabled_aisle_seats: number_of_disabled_aisle_seats,
|
617
|
-
max_group_size: max_group_size,
|
618
|
-
max_occupancy_absolute: max_occupancy_absolute,
|
619
|
-
max_occupancy_percentage: max_occupancy_percentage,
|
620
|
-
one_group_per_table: one_group_per_table,
|
621
|
-
fixed_group_layout: false,
|
622
|
-
disabled_seats: disabled_seats,
|
623
|
-
enabled_seats: enabled_seats,
|
624
|
-
index: index)
|
625
|
-
end
|
626
|
-
|
627
|
-
def == (other)
|
628
|
-
name == other.name &&
|
629
|
-
number_of_disabled_seats_to_the_sides == other.number_of_disabled_seats_to_the_sides &&
|
630
|
-
disable_seats_in_front_and_behind == other.disable_seats_in_front_and_behind &&
|
631
|
-
disable_diagonal_seats_in_front_and_behind == other.disable_diagonal_seats_in_front_and_behind &&
|
632
|
-
number_of_disabled_aisle_seats == other.number_of_disabled_aisle_seats &&
|
633
|
-
max_group_size == other.max_group_size &&
|
634
|
-
max_occupancy_absolute == other.max_occupancy_absolute &&
|
635
|
-
max_occupancy_percentage == other.max_occupancy_percentage &&
|
636
|
-
one_group_per_table == other.one_group_per_table &&
|
637
|
-
fixed_group_layout == other.fixed_group_layout &&
|
638
|
-
disabled_seats == other.disabled_seats &&
|
639
|
-
enabled_seats == other.enabled_seats &&
|
640
|
-
index == other.index
|
641
|
-
end
|
642
|
-
end
|
643
|
-
|
644
566
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
def create_change_object_status_request(object_or_objects, status, hold_token, order_id, event_key_or_keys, keep_extra_data, ignore_channels, channel_keys,
|
1
|
+
def create_change_object_status_request(object_or_objects, status, hold_token, order_id, event_key_or_keys, keep_extra_data, ignore_channels, channel_keys, allowed_previous_statuses, rejected_previous_statuses)
|
2
2
|
result = {}
|
3
3
|
result[:objects] = normalize(object_or_objects)
|
4
4
|
result[:status] = status
|
@@ -12,7 +12,6 @@ def create_change_object_status_request(object_or_objects, status, hold_token, o
|
|
12
12
|
result[:keepExtraData] = keep_extra_data if keep_extra_data != nil
|
13
13
|
result[:ignoreChannels] = ignore_channels if ignore_channels != nil
|
14
14
|
result[:channelKeys] = channel_keys if channel_keys != nil
|
15
|
-
result[:ignoreSocialDistancing] = ignore_social_distancing if ignore_social_distancing != nil
|
16
15
|
result[:allowedPreviousStatuses] = allowed_previous_statuses if allowed_previous_statuses != nil
|
17
16
|
result[:rejectedPreviousStatuses] = rejected_previous_statuses if rejected_previous_statuses != nil
|
18
17
|
result
|
data/lib/seatsio/events.rb
CHANGED
@@ -18,10 +18,10 @@ module Seatsio
|
|
18
18
|
@channels = ChannelsClient.new(@http_client)
|
19
19
|
end
|
20
20
|
|
21
|
-
def create(chart_key: nil, event_key: nil,
|
21
|
+
def create(chart_key: nil, event_key: nil, name: nil, date: nil, table_booking_config: nil, object_categories: nil, categories: nil)
|
22
22
|
payload = build_event_request(chart_key: chart_key, event_key: event_key,
|
23
|
+
name: name, date: date,
|
23
24
|
table_booking_config: table_booking_config,
|
24
|
-
social_distancing_ruleset_key: social_distancing_ruleset_key,
|
25
25
|
object_categories: object_categories, categories: categories)
|
26
26
|
response = @http_client.post("events", payload)
|
27
27
|
Event.new(response)
|
@@ -33,12 +33,13 @@ module Seatsio
|
|
33
33
|
Events.new(response).events
|
34
34
|
end
|
35
35
|
|
36
|
-
def update(key:, chart_key: nil, event_key: nil,
|
36
|
+
def update(key:, chart_key: nil, event_key: nil, name: nil, date: nil, table_booking_config: nil, object_categories: nil, categories: nil)
|
37
37
|
payload = build_event_request(
|
38
38
|
chart_key: chart_key,
|
39
39
|
event_key: event_key,
|
40
|
+
name: name,
|
41
|
+
date: date,
|
40
42
|
table_booking_config: table_booking_config,
|
41
|
-
social_distancing_ruleset_key: social_distancing_ruleset_key,
|
42
43
|
object_categories: object_categories,
|
43
44
|
categories: categories)
|
44
45
|
@http_client.post("/events/#{key}", payload)
|
@@ -69,12 +70,12 @@ module Seatsio
|
|
69
70
|
response
|
70
71
|
end
|
71
72
|
|
72
|
-
def book(event_key_or_keys, object_or_objects, hold_token: nil, order_id: nil, keep_extra_data: nil, ignore_channels: nil, channel_keys: nil
|
73
|
-
self.change_object_status(event_key_or_keys, object_or_objects, Seatsio::EventObjectInfo::BOOKED, hold_token: hold_token, order_id: order_id, keep_extra_data: keep_extra_data, ignore_channels: ignore_channels, channel_keys: channel_keys
|
73
|
+
def book(event_key_or_keys, object_or_objects, hold_token: nil, order_id: nil, keep_extra_data: nil, ignore_channels: nil, channel_keys: nil)
|
74
|
+
self.change_object_status(event_key_or_keys, object_or_objects, Seatsio::EventObjectInfo::BOOKED, hold_token: hold_token, order_id: order_id, keep_extra_data: keep_extra_data, ignore_channels: ignore_channels, channel_keys: channel_keys)
|
74
75
|
end
|
75
76
|
|
76
|
-
def change_object_status(event_key_or_keys, object_or_objects, status, hold_token: nil, order_id: nil, keep_extra_data: nil, ignore_channels: nil, channel_keys: nil,
|
77
|
-
request = create_change_object_status_request(object_or_objects, status, hold_token, order_id, event_key_or_keys, keep_extra_data, ignore_channels, channel_keys,
|
77
|
+
def change_object_status(event_key_or_keys, object_or_objects, status, hold_token: nil, order_id: nil, keep_extra_data: nil, ignore_channels: nil, channel_keys: nil, allowed_previous_statuses: nil, rejected_previous_statuses: nil)
|
78
|
+
request = create_change_object_status_request(object_or_objects, status, hold_token, order_id, event_key_or_keys, keep_extra_data, ignore_channels, channel_keys, allowed_previous_statuses, rejected_previous_statuses)
|
78
79
|
request[:params] = {
|
79
80
|
:expand => 'objects'
|
80
81
|
}
|
@@ -91,8 +92,8 @@ module Seatsio
|
|
91
92
|
ChangeObjectStatusInBatchResult.new(response).results
|
92
93
|
end
|
93
94
|
|
94
|
-
def hold(event_key_or_keys, object_or_objects, hold_token, order_id: nil, keep_extra_data: nil, ignore_channels: nil, channel_keys: nil
|
95
|
-
change_object_status(event_key_or_keys, object_or_objects, Seatsio::EventObjectInfo::HELD, hold_token: hold_token, order_id: order_id, keep_extra_data: keep_extra_data, ignore_channels: ignore_channels, channel_keys: channel_keys
|
95
|
+
def hold(event_key_or_keys, object_or_objects, hold_token, order_id: nil, keep_extra_data: nil, ignore_channels: nil, channel_keys: nil)
|
96
|
+
change_object_status(event_key_or_keys, object_or_objects, Seatsio::EventObjectInfo::HELD, hold_token: hold_token, order_id: order_id, keep_extra_data: keep_extra_data, ignore_channels: ignore_channels, channel_keys: channel_keys)
|
96
97
|
end
|
97
98
|
|
98
99
|
def change_best_available_object_status(key, number, status, categories: nil, hold_token: nil, extra_data: nil, ticket_types: nil, order_id: nil, keep_extra_data: nil, ignore_channels: nil, channel_keys: nil, try_to_prevent_orphan_seats: nil)
|
@@ -168,12 +169,13 @@ module Seatsio
|
|
168
169
|
payload
|
169
170
|
end
|
170
171
|
|
171
|
-
def build_event_request(chart_key: nil, event_key: nil,
|
172
|
+
def build_event_request(chart_key: nil, event_key: nil, name: nil, date: nil, table_booking_config: nil, object_categories: nil, categories: nil)
|
172
173
|
result = {}
|
173
174
|
result["chartKey"] = chart_key if chart_key
|
174
175
|
result["eventKey"] = event_key if event_key
|
176
|
+
result["name"] = name if name
|
177
|
+
result["date"] = date.iso8601 if date
|
175
178
|
result["tableBookingConfig"] = table_booking_config_to_request(table_booking_config) if table_booking_config != nil
|
176
|
-
result["socialDistancingRulesetKey"] = social_distancing_ruleset_key if social_distancing_ruleset_key != nil
|
177
179
|
result["objectCategories"] = object_categories if object_categories != nil
|
178
180
|
result["categories"] = categories_to_request(categories) if categories != nil
|
179
181
|
result
|
@@ -191,8 +193,9 @@ module Seatsio
|
|
191
193
|
params.each do |param|
|
192
194
|
r = {}
|
193
195
|
r["eventKey"] = param[:event_key] if param[:event_key] != nil
|
196
|
+
r["name"] = param[:name] if param[:name]
|
197
|
+
r["date"] = param[:date].iso8601 if param[:date]
|
194
198
|
r["tableBookingConfig"] = table_booking_config_to_request(param[:table_booking_config]) if param[:table_booking_config] != nil
|
195
|
-
r["socialDistancingRulesetKey"] = param[:social_distancing_ruleset_key] if param[:social_distancing_ruleset_key] != nil
|
196
199
|
r["objectCategories"] = param[:object_categories] if param[:object_categories] != nil
|
197
200
|
r["categories"] = categories_to_request(param[:categories]) if param[:categories] != nil
|
198
201
|
result.push(r)
|
data/lib/seatsio/seasons.rb
CHANGED
@@ -14,9 +14,9 @@ module Seatsio
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def create(chart_key:, key: nil, number_of_events: nil, event_keys: nil,
|
17
|
-
table_booking_config: nil
|
17
|
+
table_booking_config: nil)
|
18
18
|
request = build_create_season_request(chart_key: chart_key, key: key, number_of_events: number_of_events, event_keys: event_keys,
|
19
|
-
table_booking_config: table_booking_config
|
19
|
+
table_booking_config: table_booking_config)
|
20
20
|
response = @http_client.post('seasons', request)
|
21
21
|
Season.new(response)
|
22
22
|
end
|
@@ -55,14 +55,13 @@ module Seatsio
|
|
55
55
|
|
56
56
|
private
|
57
57
|
|
58
|
-
def build_create_season_request(chart_key: nil, key: nil, number_of_events: nil, event_keys: nil, table_booking_config: nil
|
58
|
+
def build_create_season_request(chart_key: nil, key: nil, number_of_events: nil, event_keys: nil, table_booking_config: nil)
|
59
59
|
request = {}
|
60
60
|
request['chartKey'] = chart_key if chart_key
|
61
61
|
request['key'] = key if key
|
62
62
|
request['numberOfEvents'] = number_of_events if number_of_events
|
63
63
|
request['eventKeys'] = event_keys if event_keys
|
64
64
|
request['tableBookingConfig'] = table_booking_config_to_request(table_booking_config) if table_booking_config != nil
|
65
|
-
request['socialDistancingRulesetKey'] = social_distancing_ruleset_key if social_distancing_ruleset_key != nil
|
66
65
|
request
|
67
66
|
end
|
68
67
|
|
data/lib/seatsio/version.rb
CHANGED
data/release.mjs
CHANGED
@@ -20,13 +20,14 @@
|
|
20
20
|
$.verbose = false
|
21
21
|
|
22
22
|
const versionToBump = getVersionToBump()
|
23
|
-
const
|
23
|
+
const latestReleaseTag = await fetchLatestReleasedVersionNumber()
|
24
|
+
const latestVersion = removeLeadingV(latestReleaseTag)
|
24
25
|
const nextVersion = await determineNextVersionNumber(latestVersion)
|
25
26
|
|
26
|
-
await
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
await assertChangesSinceRelease(latestReleaseTag)
|
28
|
+
await bumpVersionInFiles()
|
29
|
+
await commitAndPush()
|
30
|
+
await release()
|
30
31
|
|
31
32
|
function getVersionToBump() {
|
32
33
|
if (!argv.v || !(argv.v === 'minor' || argv.v === 'major')) {
|
@@ -44,8 +45,7 @@ function removeLeadingV(tagName) {
|
|
44
45
|
|
45
46
|
async function fetchLatestReleasedVersionNumber() {
|
46
47
|
let result = await $`gh release view --json tagName`
|
47
|
-
|
48
|
-
return removeLeadingV(tagName)
|
48
|
+
return JSON.parse(result).tagName
|
49
49
|
}
|
50
50
|
|
51
51
|
async function determineNextVersionNumber(previous) {
|
@@ -70,11 +70,6 @@ async function replaceInFile(filename, latestVersion, nextVersion) {
|
|
70
70
|
.then(() => gitAdd(filename))
|
71
71
|
}
|
72
72
|
|
73
|
-
async function pullLastVersion() {
|
74
|
-
await $`git checkout master`
|
75
|
-
await $`git pull origin master`
|
76
|
-
}
|
77
|
-
|
78
73
|
async function gitAdd(filename) {
|
79
74
|
return await $`git add ${filename}`
|
80
75
|
}
|
@@ -84,8 +79,24 @@ async function commitAndPush() {
|
|
84
79
|
await $`git push origin master`
|
85
80
|
}
|
86
81
|
|
82
|
+
async function getCurrentCommitHash() {
|
83
|
+
return (await $`git rev-parse HEAD`).stdout.trim()
|
84
|
+
}
|
85
|
+
|
86
|
+
async function getCommitHashOfTag(tag) {
|
87
|
+
return (await $`git rev-list -n 1 ${tag}`).stdout.trim()
|
88
|
+
}
|
89
|
+
|
90
|
+
async function assertChangesSinceRelease(releaseTag) {
|
91
|
+
let masterCommitHash = await getCurrentCommitHash()
|
92
|
+
let releaseCommitHash = await getCommitHashOfTag(releaseTag)
|
93
|
+
if(masterCommitHash === releaseCommitHash) {
|
94
|
+
throw new Error("No changes on master since release tagged " + releaseTag)
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
87
98
|
async function release() {
|
88
|
-
|
99
|
+
const newTag = 'v' + nextVersion
|
89
100
|
return await $`gh release create ${newTag} --generate-notes`.catch(error => {
|
90
101
|
console.error('something went wrong while creating the release. Please revert the version change!')
|
91
102
|
throw error
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seatsio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 45.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seats.io
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|