Skip to content

Commit

Permalink
feat(ad-hoc): update dependencies (#130)
Browse files Browse the repository at this point in the history
* Update cocoapods
* Update mint dependencies: swiftlint and xcodegen
* Use latest phone number metadata
* Change GH runner to latest macos-13
* Fix project configuration
* Run bash scripts in "strict" mode
  • Loading branch information
andrii-vysotskyi-cko authored Jul 6, 2023
1 parent 167c026 commit b17ddfe
Show file tree
Hide file tree
Showing 23 changed files with 50 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
jobs:
create-release:
name: Create Release
runs-on: macos-12
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push_podspecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
jobs:
push-podspecs:
runs-on: macos-12
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Bootstrap Project
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: macos-12
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Bootstrap Project
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:
jobs:
run-tests:
runs-on: macos-12
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Bootstrap Project
Expand Down
1 change: 0 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ type_name:

opt_in_rules:
- anonymous_argument_in_multiline_closure
- anyobject_protocol
- closure_end_indentation
- closure_spacing
- collection_alignment
Expand Down
4 changes: 2 additions & 2 deletions Example/Scripts/BootstrapProject.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

set -e
set -euo pipefail

# Installs brew dependencies
brew bundle
brew bundle -q

# Installs mint dependencies if needed
if ! [[ "$@" =~ '--skip-mint-bootstrap' ]]; then
Expand Down
2 changes: 2 additions & 0 deletions Example/Scripts/Lint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

set -euo pipefail

mint run swiftlint lint --strict
2 changes: 2 additions & 0 deletions Example/Scripts/SwiftGen/SwiftGen.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

set -euo pipefail

mint run swiftgen config run
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GEM
specs:
CFPropertyList (3.0.6)
rexml
activesupport (7.0.4.3)
activesupport (7.0.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -15,10 +15,10 @@ GEM
json (>= 1.5.1)
atomos (0.1.3)
claide (1.1.0)
cocoapods (1.12.0)
cocoapods (1.12.1)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.12.0)
cocoapods-core (= 1.12.1)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.6.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -33,7 +33,7 @@ GEM
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.12.0)
cocoapods-core (1.12.1)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
Expand Down Expand Up @@ -62,10 +62,10 @@ GEM
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.12.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
json (2.6.3)
minitest (5.18.0)
minitest (5.18.1)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
Expand Down
4 changes: 2 additions & 2 deletions Mintfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
yonaskolb/xcodegen@2.34.0
realm/SwiftLint@0.51.0
yonaskolb/xcodegen@2.35.0
realm/SwiftLint@0.52.3
SwiftGen/[email protected]
krzysztofzablocki/[email protected]
4 changes: 2 additions & 2 deletions Scripts/BootstrapProject.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

set -e
set -euo pipefail

# Exports version as environment variable
export CURRENT_VERSION="$(cat Version.resolved)"

# Installs brew dependencies
brew bundle
brew bundle -q

# Installs mint dependencies
mint bootstrap
Expand Down
11 changes: 9 additions & 2 deletions Scripts/CMark/CreateXcframework.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#!/bin/sh

set -e
set -euo pipefail

SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
OUTPUT_DIR="$SCRIPT_DIR/../../Vendor"
WORK_DIR=$(mktemp -d)

# Script expects revision as a first and only argument
test $# -eq 1

# Go to temporary directory
cd $(mktemp -d)
cd $WORK_DIR

# Clone library
git clone --depth 1 --branch $1 https://github.com/commonmark/cmark .
Expand Down Expand Up @@ -46,3 +47,9 @@ xcodebuild -create-xcframework \

# Write metadata
echo $1 > "$OUTPUT_DIR/cmark.xcframework.version"

function cleanup {
rm -rf $WORK_DIR
}

trap cleanup EXIT
2 changes: 1 addition & 1 deletion Scripts/CreateDocumentation.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -euo pipefail

OUTPUT_DIR="Docs"

Expand Down
2 changes: 1 addition & 1 deletion Scripts/CreateRelease.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -euo pipefail

# Creates XCFramework
source Scripts/CreateXcframework.sh
Expand Down
4 changes: 2 additions & 2 deletions Scripts/CreateXcframework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
OUTPUT_DIR=".build/framework"

function build_framework {(
set -e
set -euo pipefail

xcodebuild archive \
-scheme $1 \
Expand All @@ -27,7 +27,7 @@ function build_framework {(
zip $1.xcframework.zip -r $1.xcframework -x '.*' -x '__MACOSX'
)}

set -e
set -euo pipefail

rm -rf $OUTPUT_DIR
mkdir -p $OUTPUT_DIR
Expand Down
2 changes: 2 additions & 0 deletions Scripts/Lint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

set -euo pipefail

mint run swiftlint lint --strict
2 changes: 2 additions & 0 deletions Scripts/Sourcery.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -euo pipefail

mint run sourcery \
--sources $PROJECT_DIR/Sources/$TARGET_NAME/Sources \
--templates $PROJECT_DIR/Templates \
Expand Down
2 changes: 2 additions & 0 deletions Scripts/SwiftGen.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

set -euo pipefail

mint run swiftgen config run --config "${TARGET_ROOT}/swiftgen.yml"
6 changes: 4 additions & 2 deletions Scripts/UpdatePhoneNumberMetadata.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#!/bin/bash

#!/bin/sh
set -euo pipefail

SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
OUTPUT_DIR="$SCRIPT_DIR/../Sources/ProcessOut/Resources/PhoneNumberMetadata"
WORK_DIR=$(mktemp -d)

# Validates arguments acount
test $# -eq 1

# Go to temporary directory
cd $(mktemp -d)
cd $WORK_DIR

# Clone Google's libphonenumber
git clone --depth 1 --branch $1 https://github.com/google/libphonenumber libphonenumber
Expand Down
2 changes: 1 addition & 1 deletion Scripts/UpdateVersion.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -euo pipefail

VERSION=$(cat Version.resolved)
VERSION_REGEX="^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$"
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.13.11
v8.13.15
4 changes: 4 additions & 0 deletions project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ targets:
basedOnDependencyAnalysis: false
- path: Scripts/SwiftGen.sh
name: SwiftGen
outputFiles:
- $(TARGET_ROOT)/Sources/Generated/Assets+Generated.swift
- $(TARGET_ROOT)/Sources/Generated/Files+Generated.swift
- $(TARGET_ROOT)/Sources/Generated/Strings+Generated.swift
basedOnDependencyAnalysis: false
- path: Scripts/Sourcery.sh
name: Sourcery
Expand Down

0 comments on commit b17ddfe

Please sign in to comment.