Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bcr/source.template.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"url": "https://github.com/jpsim/SourceKitten/archive/refs/tags/{TAG}.tar.gz",
"url": "https://github.com/jpsim/SourceKitten/releases/download/{TAG}/SourceKitten-{TAG}.tar.gz",
"integrity": "",
"strip_prefix": "SourceKitten-{TAG}"
}
8 changes: 4 additions & 4 deletions .github/workflows/jazzy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ on:

jobs:
Jazzy:
runs-on: macos-13
runs-on: macos-15
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
ruby-version: '3.3'
bundler-cache: true
- run: swift build
- name: Generate documentation json
run: swift run sourcekitten doc --spm --module-name SourceKittenFramework > SourceKittenFramework.json
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All changes should be made via pull requests on GitHub.
When issuing a pull request, please add a summary of your changes to
the `CHANGELOG.md` file.

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

1. One Markdown unnumbered list item describing the change.
2. 2 trailing spaces on the last line describing the change.
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
source 'https://rubygems.org'

gem 'cocoapods'
gem "jazzy"
96 changes: 50 additions & 46 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.7)
base64
nkf
rexml
activesupport (7.1.3.2)
CFPropertyList (3.0.8)
activesupport (7.2.3.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
logger (>= 1.4.2)
minitest (>= 5.1, < 6)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.9)
public_suffix (>= 2.0.2, < 8.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
base64 (0.2.0)
bigdecimal (3.1.6)
base64 (0.3.0)
benchmark (0.5.0)
bigdecimal (4.1.0)
claide (1.1.0)
cocoapods (1.15.2)
cocoapods (1.16.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.15.2)
cocoapods-core (= 1.16.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -41,8 +41,8 @@ GEM
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.15.2)
xcodeproj (>= 1.27.0, < 2.0)
cocoapods-core (1.16.2)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
Expand All @@ -62,72 +62,76 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
drb (2.2.0)
ruby2_keywords
concurrent-ruby (1.3.6)
connection_pool (3.0.2)
drb (2.2.3)
escape (0.0.4)
ethon (0.16.0)
ethon (0.18.0)
ffi (>= 1.15.0)
ffi (1.16.3)
logger
ffi (1.17.4)
ffi (1.17.4-arm64-darwin)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.14.1)
httpclient (2.9.0)
mutex_m
i18n (1.14.8)
concurrent-ruby (~> 1.0)
jazzy (0.14.4)
jazzy (0.15.4)
activesupport (>= 5.0, < 8)
cocoapods (~> 1.5)
logger
mustache (~> 1.1)
open4 (~> 1.3)
redcarpet (~> 3.4)
rexml (~> 3.2)
rexml (>= 3.2.7, < 4.0)
rouge (>= 2.0.6, < 5.0)
sassc (~> 2.1)
sqlite3 (~> 1.3)
xcinvoke (~> 0.3.0)
json (2.7.1)
json (2.19.3)
liferaft (0.0.6)
mini_portile2 (2.8.5)
minitest (5.22.2)
logger (1.7.0)
mini_portile2 (2.8.9)
minitest (5.27.0)
molinillo (0.8.0)
mustache (1.1.1)
mutex_m (0.2.0)
nanaimo (0.3.0)
mustache (1.1.2)
mutex_m (0.3.0)
nanaimo (0.4.0)
nap (1.1.0)
netrc (0.11.0)
nkf (0.2.0)
open4 (1.3.4)
public_suffix (4.0.7)
redcarpet (3.6.0)
rexml (3.3.9)
rouge (4.2.0)
redcarpet (3.6.1)
rexml (3.4.4)
rouge (4.7.0)
ruby-macho (2.5.1)
ruby2_keywords (0.0.5)
sassc (2.4.0)
ffi (~> 1.9)
sqlite3 (1.7.2)
securerandom (0.4.1)
sqlite3 (1.7.3)
mini_portile2 (~> 2.8.0)
typhoeus (1.4.1)
ethon (>= 0.9.0)
typhoeus (1.6.0)
ethon (>= 0.18.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcinvoke (0.3.0)
liferaft (~> 0.0.6)
xcodeproj (1.25.0)
xcodeproj (1.27.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (>= 3.3.2, < 4.0)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)

PLATFORMS
arm64-darwin-25
ruby

DEPENDENCIES
cocoapods
jazzy

BUNDLED WITH
2.3.8
2.7.2
50 changes: 38 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SOURCEKITTENFRAMEWORK_PLIST=Source/SourceKittenFramework/Info.plist

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

.PHONY: all clean install package test uninstall
.PHONY: all clean install package test uninstall release

all: build

Expand Down Expand Up @@ -50,7 +50,9 @@ uninstall:
rm -rf "$(FRAMEWORKS_FOLDER)/SourceKittenFramework.framework"
rm -f "$(BINARIES_FOLDER)/sourcekitten"

installables: clean build
installables: build
rm -f "$(OUTPUT_PACKAGE)"
rm -rf "$(TEMPORARY_FOLDER)"
install -d "$(TEMPORARY_FOLDER)$(BINARIES_FOLDER)"
install "$(SOURCEKITTEN_EXECUTABLE)" "$(TEMPORARY_FOLDER)$(BINARIES_FOLDER)"

Expand All @@ -66,7 +68,40 @@ package: installables
--version "$(VERSION_STRING)" \
"$(OUTPUT_PACKAGE)"

release: package
release:
$(eval ARGS := $(filter-out $@,$(MAKECMDGOALS)))
$(eval VERSION := $(word 1,$(ARGS)))
$(eval RELEASE_NAME := $(wordlist 2,100,$(ARGS)))
@if [ -z "$(VERSION)" ] || [ -z "$(RELEASE_NAME)" ]; then \
echo "usage: make release <version> <release name>"; \
exit 1; \
fi
@# Set version
@sed -i '' 's/## Main/## $(VERSION)/g' CHANGELOG.md
@sed 's/__VERSION__/$(VERSION)/g' script/Version.swift.template > Source/SourceKittenFramework/Version.swift
@sed -e '3s/.*/ version = "$(VERSION)",/' -i '' MODULE.bazel
@# Commit, tag, push
git commit -am "Release $(VERSION)"
git tag -a "$(VERSION)" -m "$(VERSION): $(RELEASE_NAME)"
git push origin main
git push origin "$(VERSION)"
@# Build pkg
$(MAKE) package
@# Download source tarball for BCR stable URL
curl -fsSL --retry 5 "https://github.com/jpsim/SourceKitten/archive/refs/tags/$(VERSION).tar.gz" \
-o "SourceKitten-$(VERSION).tar.gz"
@# Create GitHub release
gh release create "$(VERSION)" \
"$(OUTPUT_PACKAGE)" \
"SourceKitten-$(VERSION).tar.gz" \
--title "$(VERSION): $(RELEASE_NAME)" \
--notes "$$(sed -n '/^## $(VERSION)/,/^## /{/^## $(VERSION)/d;/^## /d;p;}' CHANGELOG.md)"
rm -f "SourceKitten-$(VERSION).tar.gz"
@# Add empty changelog section
@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
@mv /tmp/CHANGELOG.md.tmp CHANGELOG.md
git commit -am "Add empty changelog section"
git push origin main

docker_test:
docker run -v `pwd`:`pwd` -w `pwd` --name sourcekitten --rm swift:5.10-focal swift test --parallel
Expand All @@ -78,10 +113,6 @@ docker_htop:
display_compilation_time:
$(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

publish:
brew update && brew bump-formula-pr --tag=$(shell git describe --tags) --revision=$(shell git rev-parse HEAD) sourcekitten
pod trunk push --verbose

update_clang_headers:
rm -rf Source/Clang_C/include
svn export http://llvm.org/svn/llvm-project/cfe/trunk/include/clang-c
Expand All @@ -107,11 +138,6 @@ update_fixtures_docker:
get_version:
@echo $(VERSION_STRING)

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

%:
@:
35 changes: 21 additions & 14 deletions Releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,29 @@

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

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

This file was deleted.

Loading