Skip to content

Commit 566748b

Browse files
authored
Merge pull request #149 from Comcast/release/2.4.0
Release 2.4.0
2 parents 50c270c + 66eb289 commit 566748b

File tree

82 files changed

+1531
-326
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1531
-326
lines changed
+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Generate Release
2+
run-name: Generate Release ${{ fromJSON(inputs.major) }}.${{ fromJSON(inputs.minor) }}.${{ fromJSON(inputs.patch) }}
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
major:
8+
description: 'Major version'
9+
required: true
10+
default: '1'
11+
type: choice
12+
options:
13+
- '1'
14+
- '2'
15+
minor:
16+
description: 'Minor version'
17+
required: true
18+
type: number
19+
patch:
20+
description: 'Patch version'
21+
required: true
22+
type: number
23+
24+
jobs:
25+
bump-version-and-raise-pr:
26+
runs-on: ubuntu-latest
27+
permissions:
28+
contents: write
29+
pull-requests: write
30+
env:
31+
version: ${{ fromJSON(inputs.major) }}.${{ fromJSON(inputs.minor) }}.${{ fromJSON(inputs.patch) }}
32+
branch: ${{ inputs.major == 2 && 'develop' || 'develop_1.x' }}
33+
target: ${{ inputs.major == 2 && 'main' || 'main_1.x' }}
34+
steps:
35+
- name: Check minor has no decimals
36+
run: ${{ !contains(fromJSON(inputs.minor), '.') }}
37+
38+
- name: Check patch has no decimals
39+
run: ${{ !contains(fromJSON(inputs.patch), '.') }}
40+
41+
- name: Checkout ${{ env.target }}
42+
uses: actions/checkout@v4
43+
with:
44+
ref: ${{ env.target }}
45+
fetch-depth: 0
46+
47+
- name: Ensure tag does not exist
48+
run: |
49+
if git show-ref --tags --verify --quiet "refs/tags/$version"; then
50+
echo "::error::Tag $version exists" && exit 1
51+
else
52+
echo "Tag $version does not exist"
53+
fi
54+
55+
- name: Ensure branch does not exist
56+
run: |
57+
if git show-ref --verify --quiet "refs/remotes/origin/release/$version"; then
58+
echo "::error::Release branch release/$version exists" && exit 1
59+
else
60+
echo "Release branch release/$version does not exist"
61+
fi
62+
63+
- name: Merge in ${{ env.branch }}
64+
run: |
65+
git config user.name github-actions
66+
git config user.email [email protected]
67+
git merge origin/${{ env.branch }}
68+
69+
- name: Update version in txt file
70+
run: sed -i "s/[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}/$version/" ./mambaSharedFramework/Resources/version.txt
71+
72+
- name: Update version in xcodeproj file
73+
run: sed -i "s/MARKETING_VERSION = [0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\};/MARKETING_VERSION = $version;/" ./mamba.xcodeproj/project.pbxproj
74+
75+
- name: Update version in podspec file
76+
run: sed -i "s/= \"[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\"/= \"$version\"/" ./mamba.podspec
77+
78+
- name: Create pull request
79+
uses: peter-evans/create-pull-request@v7
80+
with:
81+
title: Release ${{ env.version }}
82+
commit-message: Bump version to ${{ env.version }}
83+
branch: release/${{ env.version }}
84+
body: |
85+
Automated version bump to ${{ env.version }} generated by [create-pull-request][1].
86+
87+
[1]: https://github.com/peter-evans/create-pull-request

.github/workflows/publish-release.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish Release
2+
on:
3+
push:
4+
branches:
5+
- 'main'
6+
- 'main_1.x'
7+
8+
jobs:
9+
get-version:
10+
name: Get version for release
11+
runs-on: ubuntu-latest
12+
outputs:
13+
version: ${{ steps.version.outputs.version }}
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
- id: version
18+
run: echo "version=`cat ./mambaSharedFramework/Resources/version.txt`" >> "$GITHUB_OUTPUT"
19+
20+
publish-release:
21+
name: Publish release ${{ needs.get-version.outputs.version }}
22+
runs-on: ubuntu-latest
23+
needs: get-version
24+
permissions:
25+
contents: write
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Create release
29+
uses: elgohr/Github-Release-Action@v5
30+
env:
31+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
with:
33+
title: ${{ needs.get-version.outputs.version }}
34+
tag: ${{ needs.get-version.outputs.version }}

Package.swift

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// swift-tools-version:5.3
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
//
4+
// Package.swift
5+
// mamba
6+
//
7+
// Copyright © 2020 Comcast Cable Communications Management, LLC
8+
// Licensed under the Apache License, Version 2.0 (the "License");
9+
// you may not use this file except in compliance with the License.
10+
// You may obtain a copy of the License at
11+
//
12+
// http://www.apache.org/licenses/LICENSE-2.0
13+
//
14+
// Unless required by applicable law or agreed to in writing, software
15+
// distributed under the License is distributed on an "AS IS" BASIS,
16+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
// See the License for the specific language governing permissions and
18+
// limitations under the License.
19+
//
20+
21+
import PackageDescription
22+
23+
let package = Package(
24+
name: "mamba",
25+
products: [
26+
.library(
27+
name: "mamba",
28+
targets: ["mamba"]
29+
)
30+
],
31+
targets: [
32+
.target(
33+
name: "mamba",
34+
dependencies: [.target(name: "HLSObjectiveC")],
35+
path: "mambaSharedFramework",
36+
exclude: [
37+
"HLS ObjectiveC",
38+
"PlaylistParserError",
39+
"mamba.h"
40+
],
41+
resources: [
42+
.process("Resources")
43+
]
44+
),
45+
.target(
46+
name: "PlaylistParserError",
47+
path: "mambaSharedFramework/PlaylistParserError"
48+
),
49+
.target(
50+
name: "HLSObjectiveC",
51+
dependencies: ["PlaylistParserError"],
52+
path: "mambaSharedFramework/HLS ObjectiveC",
53+
exclude: [
54+
"PrototypeRapidParseArray.include",
55+
"RapidParser_LookingForEForEXTINFState_ParseArray.include",
56+
"RapidParser_LookingForEForEXTState_ParseArray.include",
57+
"RapidParser_LookingForHashForEXTINFState_ParseArray.include",
58+
"RapidParser_LookingForHashForEXTState_ParseArray.include",
59+
"RapidParser_LookingForIForEXTINFState_ParseArray.include",
60+
"RapidParser_LookingForNewlineForEXTINFState_ParseArray.include",
61+
"RapidParser_LookingForNewLineForEXTState_ParseArray.include",
62+
"RapidParser_LookingForNewLineForHashState_ParseArray.include",
63+
"RapidParser_LookingForNForEXTINFState_ParseArray.include",
64+
"RapidParser_LookingForTForEXTINFState_ParseArray.include",
65+
"RapidParser_LookingForXForEXTINFState_ParseArray.include",
66+
"RapidParser_LookingForXForEXTState_ParseArray.include",
67+
"RapidParser_ScanningState_ParseArray.include",
68+
]
69+
)
70+
]
71+
)

mamba.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "mamba"
4-
s.version = "2.3.0"
4+
s.version = "2.4.0"
55
s.license = { :type => 'Apache License, Version 2.0',
66
:text => <<-LICENSE
77
Copyright 2017 Comcast Cable Communications Management, LLC

0 commit comments

Comments
 (0)