Skip to content

Commit 3b44503

Browse files
committed
test & bump scripts
1 parent 4bc67a7 commit 3b44503

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

bump.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
if [ -z "$1" ]; then
6+
echo "Usage: ./bump.sh <new_version>"
7+
echo "Example: ./bump.sh 0.0.2"
8+
exit 1
9+
fi
10+
11+
NEW_VERSION=$1
12+
13+
echo "Bumping version to $NEW_VERSION..."
14+
15+
# Update config.json - both podVersion and the tag in podSource
16+
jq ".podVersion = \"$NEW_VERSION\" | .podSource = \"{\\\"git\\\":\\\"https://github.com/fastcomments/fastcomments-swift.git\\\",\\\"tag\\\":\\\"$NEW_VERSION\\\"}\"" config.json > config.json.tmp && mv config.json.tmp config.json
17+
echo "✓ Updated config.json podVersion and podSource tag to $NEW_VERSION"
18+
19+
# Update README.md - replace version in Swift Package Manager example
20+
sed -i "s/fastcomments-swift\.git\", from: \"[0-9]\+\.[0-9]\+\.[0-9]\+\"/fastcomments-swift.git\", from: \"$NEW_VERSION\"/g" README.md
21+
echo "✓ Updated README.md version reference to $NEW_VERSION"
22+
23+
echo "Done! Version bumped to $NEW_VERSION"

test.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
echo "Running FastComments Swift SDK tests..."
6+
7+
# Run tests
8+
echo "Running tests..."
9+
swift test --verbose
10+
11+
echo ""
12+
echo "✓ All tests passed!"

0 commit comments

Comments
 (0)