-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from rockbruno/homebrew-implementation
Homebrew
- Loading branch information
Showing
13 changed files
with
133 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
bundle install | ||
bundle exec pod install | ||
bundle exec fastlane beta | ||
./Pods/SwiftInfo/swiftinfo | ||
./Pods/SwiftInfo/bin/swiftinfo | ||
echo "-------" | ||
echo "This bash script runs SwiftInfo outside of fastlane so you can see the output, but check out the Fastfile to see how you could use this in a real project." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
class Swiftinfo < Formula | ||
desc "📊 Extract and analyze the evolution of an iOS app's code." | ||
homepage "https://github.com/rockbruno/SwiftInfo" | ||
version "2.3.0" | ||
url "https://github.com/rockbruno/SwiftInfo/releases/download/#{version}/swiftinfo.zip" | ||
# TODO: Try something to provide a SHA automatically | ||
|
||
depends_on :xcode => ["10.2", :build] | ||
|
||
def install | ||
bin.install Dir["bin/*"] | ||
include.install Dir["include/*"] | ||
end | ||
|
||
test do | ||
system bin/"swiftinfo", "-version" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,47 @@ | ||
prepare: | ||
swift build -c release --disable-sandbox | ||
./prepare_for_release.sh | ||
SHELL = /bin/bash | ||
|
||
REPODIR = $(shell pwd) | ||
BUILDDIR = $(REPODIR)/.build | ||
RELEASEBUILDDIR = $(BUILDDIR)/release | ||
TEMPPRODUCTDIR = $(BUILDDIR)/_PRODUCT | ||
PRODUCTDIR = $(RELEASEBUILDDIR)/_PRODUCT | ||
|
||
.DEFAULT_GOAL = all | ||
|
||
.PHONY: all | ||
all: build | ||
|
||
.PHONY: build | ||
build: | ||
@swift build \ | ||
-c release \ | ||
--disable-sandbox \ | ||
--build-path "$(BUILDDIR)" | ||
@rm -rf "$(PRODUCTDIR)" | ||
@rm -rf "$(TEMPPRODUCTDIR)" | ||
@mkdir -p "$(TEMPPRODUCTDIR)" | ||
@mkdir -p "$(TEMPPRODUCTDIR)/include/swiftinfo" | ||
@cp -a "$(RELEASEBUILDDIR)/." "$(TEMPPRODUCTDIR)/include/swiftinfo" | ||
@cp -a "$(TEMPPRODUCTDIR)/." "$(PRODUCTDIR)" | ||
@rm -rf "$(TEMPPRODUCTDIR)" | ||
@mkdir -p "$(PRODUCTDIR)/bin" | ||
@rm -rf $(PRODUCTDIR)/include/swiftinfo/*.build | ||
@rm -rf $(PRODUCTDIR)/include/swiftinfo/*.product | ||
@rm -rf $(PRODUCTDIR)/include/swiftinfo/ModuleCache | ||
@rm -f "$(PRODUCTDIR)/include/swiftinfo/SwiftInfo.swiftdoc" | ||
@rm -f "$(PRODUCTDIR)/include/swiftinfo/SwiftInfo.swiftmodule" | ||
@mv "$(PRODUCTDIR)/include/swiftinfo/swiftinfo" "$(PRODUCTDIR)/bin" | ||
@cp -a "$(REPODIR)/Sources/Csourcekitd/." "$(PRODUCTDIR)/include/swiftinfo/Csourcekitd" | ||
@rm -f "$(RELEASEBUILDDIR)/swiftinfo" | ||
@ln -s "$(PRODUCTDIR)/bin/swiftinfo" "$(RELEASEBUILDDIR)/swiftinfo" | ||
@cp "$(REPODIR)/LICENSE" "$(PRODUCTDIR)/LICENSE" | ||
|
||
.PHONY: package | ||
package: | ||
tar -zcvf "swiftinfo-2.2.0.tar.gz" ./bin | ||
rm -f "$(PRODUCTDIR)/swiftinfo.zip" | ||
cd $(PRODUCTDIR) && zip -r ./swiftinfo.zip ./ | ||
echo "ZIP created at: $(PRODUCTDIR)/swiftinfo.zip" | ||
|
||
.PHONY: clean | ||
clean: | ||
@rm -rf "$(BUILDDIR)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.