Skip to content

Commit 89d519c

Browse files
committed
Fix release process, fix Jazzy CI, remove CocoaPods
* Fix `make release`: the `installables` target depended on `clean`, which deleted build artifacts before `install` could copy them. Move cleanup into the recipe body so it runs after `build`. * Remove CocoaPods support: delete `SourceKittenFramework.podspec`, the `cocoapods` gem from `Gemfile`, and the `make publish` target. CocoaPods trunk is going read-only on December 2, 2026: https://blog.cocoapods.org/CocoaPods-Specs-Repo/ BrewTestBot auto-bumps the Homebrew formula, so `make publish` had no remaining use. * Fix Jazzy CI: `macos-13` and Ruby 2.7 are both EOL. Update to `macos-15` and Ruby 3.3. Bump `actions/checkout` to v4. * Update `Releasing.md`: use `gh release create` instead of the web UI, update the example version, and document the missing step of adding an empty changelog section after releasing. * Remove CocoaPods reference from `CONTRIBUTING.md`.
1 parent 6529c17 commit 89d519c

File tree

8 files changed

+115
-94
lines changed

8 files changed

+115
-94
lines changed

.bcr/source.template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"url": "https://github.com/jpsim/SourceKitten/archive/refs/tags/{TAG}.tar.gz",
2+
"url": "https://github.com/jpsim/SourceKitten/releases/download/{TAG}/SourceKitten-{TAG}.tar.gz",
33
"integrity": "",
44
"strip_prefix": "SourceKitten-{TAG}"
55
}

.github/workflows/jazzy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ on:
88

99
jobs:
1010
Jazzy:
11-
runs-on: macos-13
11+
runs-on: macos-15
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
- uses: ruby/setup-ruby@v1
1515
with:
16-
ruby-version: 2.7
17-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
16+
ruby-version: '3.3'
17+
bundler-cache: true
1818
- run: swift build
1919
- name: Generate documentation json
2020
run: swift run sourcekitten doc --spm --module-name SourceKittenFramework > SourceKittenFramework.json

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All changes should be made via pull requests on GitHub.
55
When issuing a pull request, please add a summary of your changes to
66
the `CHANGELOG.md` file.
77

8-
We follow the same syntax as [CocoaPods' `CHANGELOG.md`](https://github.com/CocoaPods/CocoaPods/blob/master/CHANGELOG.md):
8+
We follow this syntax for the changelog:
99

1010
1. One Markdown unnumbered list item describing the change.
1111
2. 2 trailing spaces on the last line describing the change.

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
source 'https://rubygems.org'
22

3-
gem 'cocoapods'
43
gem "jazzy"

Gemfile.lock

Lines changed: 50 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
CFPropertyList (3.0.7)
5-
base64
6-
nkf
7-
rexml
8-
activesupport (7.1.3.2)
4+
CFPropertyList (3.0.8)
5+
activesupport (7.2.3.1)
96
base64
7+
benchmark (>= 0.3)
108
bigdecimal
11-
concurrent-ruby (~> 1.0, >= 1.0.2)
9+
concurrent-ruby (~> 1.0, >= 1.3.1)
1210
connection_pool (>= 2.2.5)
1311
drb
1412
i18n (>= 1.6, < 2)
15-
minitest (>= 5.1)
16-
mutex_m
17-
tzinfo (~> 2.0)
18-
addressable (2.8.6)
19-
public_suffix (>= 2.0.2, < 6.0)
13+
logger (>= 1.4.2)
14+
minitest (>= 5.1, < 6)
15+
securerandom (>= 0.3)
16+
tzinfo (~> 2.0, >= 2.0.5)
17+
addressable (2.8.9)
18+
public_suffix (>= 2.0.2, < 8.0)
2019
algoliasearch (1.27.5)
2120
httpclient (~> 2.8, >= 2.8.3)
2221
json (>= 1.5.1)
2322
atomos (0.1.3)
24-
base64 (0.2.0)
25-
bigdecimal (3.1.6)
23+
base64 (0.3.0)
24+
benchmark (0.5.0)
25+
bigdecimal (4.1.0)
2626
claide (1.1.0)
27-
cocoapods (1.15.2)
27+
cocoapods (1.16.2)
2828
addressable (~> 2.8)
2929
claide (>= 1.0.2, < 2.0)
30-
cocoapods-core (= 1.15.2)
30+
cocoapods-core (= 1.16.2)
3131
cocoapods-deintegrate (>= 1.0.3, < 2.0)
3232
cocoapods-downloader (>= 2.1, < 3.0)
3333
cocoapods-plugins (>= 1.0.0, < 2.0)
@@ -41,8 +41,8 @@ GEM
4141
molinillo (~> 0.8.0)
4242
nap (~> 1.0)
4343
ruby-macho (>= 2.3.0, < 3.0)
44-
xcodeproj (>= 1.23.0, < 2.0)
45-
cocoapods-core (1.15.2)
44+
xcodeproj (>= 1.27.0, < 2.0)
45+
cocoapods-core (1.16.2)
4646
activesupport (>= 5.0, < 8)
4747
addressable (~> 2.8)
4848
algoliasearch (~> 1.0)
@@ -62,72 +62,76 @@ GEM
6262
netrc (~> 0.11)
6363
cocoapods-try (1.2.0)
6464
colored2 (3.1.2)
65-
concurrent-ruby (1.2.3)
66-
connection_pool (2.4.1)
67-
drb (2.2.0)
68-
ruby2_keywords
65+
concurrent-ruby (1.3.6)
66+
connection_pool (3.0.2)
67+
drb (2.2.3)
6968
escape (0.0.4)
70-
ethon (0.16.0)
69+
ethon (0.18.0)
7170
ffi (>= 1.15.0)
72-
ffi (1.16.3)
71+
logger
72+
ffi (1.17.4)
73+
ffi (1.17.4-arm64-darwin)
7374
fourflusher (2.3.1)
7475
fuzzy_match (2.0.4)
7576
gh_inspector (1.1.3)
76-
httpclient (2.8.3)
77-
i18n (1.14.1)
77+
httpclient (2.9.0)
78+
mutex_m
79+
i18n (1.14.8)
7880
concurrent-ruby (~> 1.0)
79-
jazzy (0.14.4)
81+
jazzy (0.15.4)
82+
activesupport (>= 5.0, < 8)
8083
cocoapods (~> 1.5)
84+
logger
8185
mustache (~> 1.1)
8286
open4 (~> 1.3)
8387
redcarpet (~> 3.4)
84-
rexml (~> 3.2)
88+
rexml (>= 3.2.7, < 4.0)
8589
rouge (>= 2.0.6, < 5.0)
8690
sassc (~> 2.1)
8791
sqlite3 (~> 1.3)
8892
xcinvoke (~> 0.3.0)
89-
json (2.7.1)
93+
json (2.19.3)
9094
liferaft (0.0.6)
91-
mini_portile2 (2.8.5)
92-
minitest (5.22.2)
95+
logger (1.7.0)
96+
mini_portile2 (2.8.9)
97+
minitest (5.27.0)
9398
molinillo (0.8.0)
94-
mustache (1.1.1)
95-
mutex_m (0.2.0)
96-
nanaimo (0.3.0)
99+
mustache (1.1.2)
100+
mutex_m (0.3.0)
101+
nanaimo (0.4.0)
97102
nap (1.1.0)
98103
netrc (0.11.0)
99-
nkf (0.2.0)
100104
open4 (1.3.4)
101105
public_suffix (4.0.7)
102-
redcarpet (3.6.0)
103-
rexml (3.3.9)
104-
rouge (4.2.0)
106+
redcarpet (3.6.1)
107+
rexml (3.4.4)
108+
rouge (4.7.0)
105109
ruby-macho (2.5.1)
106-
ruby2_keywords (0.0.5)
107110
sassc (2.4.0)
108111
ffi (~> 1.9)
109-
sqlite3 (1.7.2)
112+
securerandom (0.4.1)
113+
sqlite3 (1.7.3)
110114
mini_portile2 (~> 2.8.0)
111-
typhoeus (1.4.1)
112-
ethon (>= 0.9.0)
115+
typhoeus (1.6.0)
116+
ethon (>= 0.18.0)
113117
tzinfo (2.0.6)
114118
concurrent-ruby (~> 1.0)
115119
xcinvoke (0.3.0)
116120
liferaft (~> 0.0.6)
117-
xcodeproj (1.25.0)
121+
xcodeproj (1.27.0)
118122
CFPropertyList (>= 2.3.3, < 4.0)
119123
atomos (~> 0.1.3)
120124
claide (>= 1.0.2, < 2.0)
121125
colored2 (~> 3.1)
122-
nanaimo (~> 0.3.0)
123-
rexml (>= 3.3.2, < 4.0)
126+
nanaimo (~> 0.4.0)
127+
rexml (>= 3.3.6, < 4.0)
124128

125129
PLATFORMS
130+
arm64-darwin-25
126131
ruby
127132

128133
DEPENDENCIES
129-
cocoapods
130134
jazzy
131135

132136
BUNDLED WITH
133-
2.3.8
137+
2.7.2

Makefile

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ SOURCEKITTENFRAMEWORK_PLIST=Source/SourceKittenFramework/Info.plist
2121

2222
VERSION_STRING="$(shell ./script/get-version)"
2323

24-
.PHONY: all clean install package test uninstall
24+
.PHONY: all clean install package test uninstall release
2525

2626
all: build
2727

@@ -50,7 +50,9 @@ uninstall:
5050
rm -rf "$(FRAMEWORKS_FOLDER)/SourceKittenFramework.framework"
5151
rm -f "$(BINARIES_FOLDER)/sourcekitten"
5252

53-
installables: clean build
53+
installables: build
54+
rm -f "$(OUTPUT_PACKAGE)"
55+
rm -rf "$(TEMPORARY_FOLDER)"
5456
install -d "$(TEMPORARY_FOLDER)$(BINARIES_FOLDER)"
5557
install "$(SOURCEKITTEN_EXECUTABLE)" "$(TEMPORARY_FOLDER)$(BINARIES_FOLDER)"
5658

@@ -66,7 +68,40 @@ package: installables
6668
--version "$(VERSION_STRING)" \
6769
"$(OUTPUT_PACKAGE)"
6870

69-
release: package
71+
release:
72+
$(eval ARGS := $(filter-out $@,$(MAKECMDGOALS)))
73+
$(eval VERSION := $(word 1,$(ARGS)))
74+
$(eval RELEASE_NAME := $(wordlist 2,100,$(ARGS)))
75+
@if [ -z "$(VERSION)" ] || [ -z "$(RELEASE_NAME)" ]; then \
76+
echo "usage: make release <version> <release name>"; \
77+
exit 1; \
78+
fi
79+
@# Set version
80+
@sed -i '' 's/## Main/## $(VERSION)/g' CHANGELOG.md
81+
@sed 's/__VERSION__/$(VERSION)/g' script/Version.swift.template > Source/SourceKittenFramework/Version.swift
82+
@sed -e '3s/.*/ version = "$(VERSION)",/' -i '' MODULE.bazel
83+
@# Commit, tag, push
84+
git commit -am "Release $(VERSION)"
85+
git tag -a "$(VERSION)" -m "$(VERSION): $(RELEASE_NAME)"
86+
git push origin main
87+
git push origin "$(VERSION)"
88+
@# Build pkg
89+
$(MAKE) package
90+
@# Download source tarball for BCR stable URL
91+
curl -fsSL --retry 5 "https://github.com/jpsim/SourceKitten/archive/refs/tags/$(VERSION).tar.gz" \
92+
-o "SourceKitten-$(VERSION).tar.gz"
93+
@# Create GitHub release
94+
gh release create "$(VERSION)" \
95+
"$(OUTPUT_PACKAGE)" \
96+
"SourceKitten-$(VERSION).tar.gz" \
97+
--title "$(VERSION): $(RELEASE_NAME)" \
98+
--notes "$$(sed -n '/^## $(VERSION)/,/^## /{/^## $(VERSION)/d;/^## /d;p;}' CHANGELOG.md)"
99+
rm -f "SourceKitten-$(VERSION).tar.gz"
100+
@# Add empty changelog section
101+
@printf '## Main\n\n#### Breaking\n\n* None.\n\n#### Enhancements\n\n* None.\n\n#### Bug Fixes\n\n* None.\n\n' | cat - CHANGELOG.md > /tmp/CHANGELOG.md.tmp
102+
@mv /tmp/CHANGELOG.md.tmp CHANGELOG.md
103+
git commit -am "Add empty changelog section"
104+
git push origin main
70105

71106
docker_test:
72107
docker run -v `pwd`:`pwd` -w `pwd` --name sourcekitten --rm swift:5.10-focal swift test --parallel
@@ -78,10 +113,6 @@ docker_htop:
78113
display_compilation_time:
79114
$(BUILD_TOOL) $(XCODEFLAGS) OTHER_SWIFT_FLAGS="-Xfrontend -debug-time-function-bodies" clean build-for-testing | grep -E ^[1-9]{1}[0-9]*.[0-9]+ms | sort -n
80115

81-
publish:
82-
brew update && brew bump-formula-pr --tag=$(shell git describe --tags) --revision=$(shell git rev-parse HEAD) sourcekitten
83-
pod trunk push --verbose
84-
85116
update_clang_headers:
86117
rm -rf Source/Clang_C/include
87118
svn export http://llvm.org/svn/llvm-project/cfe/trunk/include/clang-c
@@ -107,11 +138,6 @@ update_fixtures_docker:
107138
get_version:
108139
@echo $(VERSION_STRING)
109140

110-
set_version:
111-
$(eval NEW_VERSION := $(filter-out $@,$(MAKECMDGOALS)))
112-
@sed -i '' 's/## Main/## $(NEW_VERSION)/g' CHANGELOG.md
113-
@sed 's/__VERSION__/$(NEW_VERSION)/g' script/Version.swift.template > Source/SourceKittenFramework/Version.swift
114-
@sed -e '3s/.*/ version = "$(NEW_VERSION)",/' -i '' MODULE.bazel
115141

116142
%:
117143
@:

Releasing.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,29 @@
22

33
For SourceKitten contributors, follow these steps to cut a release:
44

5-
1. Update version number: `make set_version 0.6.2`
6-
2. Come up with a witty feline themed release name. Past names include:
5+
1. Come up with a witty feline themed release name. Past names include:
76
* Objective-Cat
87
* Cat-astrophic
98
* SourceClangKitLibKitten
109
* Grumpy Cat
11-
3. Commit & push to the `main` branch.
12-
4. Tag: `git tag -a 0.6.2 -m "0.6.2: Objective-Cat"; git push origin 0.6.2`
13-
5. Make sure you have the latest stable Xcode version installed and
10+
* Yarn Ball
11+
2. Make sure you have the latest stable Xcode version installed and
1412
`xcode-select`ed.
15-
6. Create the pkg installer: `make release`
16-
7. Create a GitHub release: https://github.com/jpsim/SourceKitten/releases/new
17-
* Specify the tag you just pushed from the dropdown.
18-
* Set the release title to the new version number & release name.
19-
* Add the changelog section to the release description text box.
20-
* Upload the pkg installer you just built to the GitHub
21-
release binaries.
22-
* Click "Publish release".
23-
8. Publish to Homebrew and CocoaPods trunk: `make publish`
13+
3. Run `make release <version> <name>`, e.g.:
14+
```
15+
make release 0.37.3 Yarn Ball
16+
```
17+
This will:
18+
* Update the version in `CHANGELOG.md`, `Version.swift`, and
19+
`MODULE.bazel`.
20+
* Commit and push to `main`.
21+
* Create and push an annotated tag.
22+
* Build the pkg installer.
23+
* Download the source tarball and upload it as a release asset
24+
(required by the Bazel Central Registry for a stable URL).
25+
* Create the GitHub release with the changelog, pkg, and source
26+
tarball attached.
27+
* Add an empty changelog section and push to `main`.
28+
4. Homebrew will be updated automatically by BrewTestBot within ~3
29+
hours. The BCR GitHub app will open a PR to update the Bazel
30+
Central Registry.

SourceKittenFramework.podspec

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)