Skip to content

Commit

Permalink
renaming to xcoder
Browse files Browse the repository at this point in the history
making build/release better
splitting the sort into two different commands
  • Loading branch information
g-Off committed Dec 11, 2018
1 parent 2c578bf commit e516fe2
Show file tree
Hide file tree
Showing 21 changed files with 429 additions and 413 deletions.
37 changes: 28 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
SWIFTC_FLAGS = -Xswiftc "-target" -Xswiftc "x86_64-apple-macosx10.12"
CONFIGURATION = release
TOOL_NAME = xcoder
VERSION = 0.3.0

REPO = https://github.com/g-Off/$(TOOL_NAME)
RELEASE_TAR = $(REPO)/archive/$(VERSION).tar.gz
SHA = $(shell curl -L -s $(RELEASE_TAR) | shasum -a 256 | sed 's/ .*//')

all: build
PREFIX = /usr/local
INSTALL_PATH = $(PREFIX)/bin/$(TOOL_NAME)
BUILD_PATH = $(shell swift build --show-bin-path -c $(CONFIGURATION))/$(TOOL_NAME)

SWIFTC_FLAGS = -Xswiftc "-target" -Xswiftc "x86_64-apple-macosx10.12"
CONFIGURATION = debug

debug: CONFIGURATION = debug
debug: generate_version
debug: build

generate_version:
@sed 's/__VERSION__/$(VERSION)/g' Version.swift.template > Sources/xcoder/Version.swift

release_sha:
@echo $(SHA)

build:
swift build --configuration $(CONFIGURATION) $(SWIFTC_FLAGS)

release: CONFIGURATION = release
release:
swift build --configuration $(CONFIGURATION) $(SWIFTC_FLAGS)
install: CONFIGURATION = release
install: SWIFTC_FLAGS += --static-swift-stdlib --disable-sandbox
install: clean build
mkdir -p $(PREFIX)/bin
cp -f $(BUILD_PATH) $(INSTALL_PATH)

test:
swift test $(SWIFTC_FLAGS)

xcode: generate_version
xcode:
swift package generate-xcodeproj --xcconfig-overrides=overrides.xcconfig
swift package generate-xcodeproj --xcconfig-overrides=Overrides.xcconfig
xed .

clean:
swift package clean
swift package clean
17 changes: 13 additions & 4 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
{
"object": {
"pins": [
{
"package": "CommandRegistry",
"repositoryURL": "https://github.com/g-Off/CommandRegistry.git",
"state": {
"branch": "master",
"revision": "142aa27445e7998c5201b5ec9682698195d6701a",
"version": null
}
},
{
"package": "SwiftPM",
"repositoryURL": "https://github.com/apple/swift-package-manager.git",
"state": {
"branch": null,
"revision": "6983434787dec4e543e9d398a0a9acf63ccd4da1",
"version": "0.2.1"
"revision": "235aacc514cb81a6881364b0fedcb3dd083228f3",
"version": "0.3.0"
}
},
{
"package": "XcodeProject",
"repositoryURL": "https://github.com/g-Off/XcodeProject.git",
"state": {
"branch": null,
"revision": "c4215ece309e60d646e510786fe0f60960419837",
"version": "0.3.1"
"revision": "a1e12a8659684039258b79761c65abb9ec98fc94",
"version": "0.4.0"
}
}
]
Expand Down
34 changes: 12 additions & 22 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,42 +1,32 @@
// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

// swift-tools-version:4.2
import PackageDescription

let package = Package(
name: "Bullwinkle",
name: "Xcoder",
products: [
.executable(
name: "bullwinkle",
targets: ["bullwinkle"]),
name: "xcoder",
targets: ["xcoder"]),
.library(
name: "MooseKit",
targets: ["MooseKit"]),
name: "XcoderKit",
targets: ["XcoderKit"]),
],
dependencies: [
.package(
url: "https://github.com/g-Off/XcodeProject.git",
from: "0.3.1"
),
.package(
url: "https://github.com/apple/swift-package-manager.git",
from: "0.1.0"
)
.package(url: "https://github.com/g-Off/XcodeProject.git", from: "0.4.0"),
.package(url: "https://github.com/g-Off/CommandRegistry.git", .branch("master"))
],
targets: [
.target(
name: "bullwinkle",
name: "xcoder",
dependencies: [
"XcodeProject",
"Utility",
"MooseKit"
"XcoderKit"
]
),
.target(
name: "MooseKit",
name: "XcoderKit",
dependencies: [
"XcodeProject",
"Utility"
"CommandRegistry"
]
)
]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Bullwinkle
# xcoder

A simple command line tool for sorting and syncing an Xcode project file.

Expand Down
9 changes: 0 additions & 9 deletions Sources/Bullwinkle/main.swift

This file was deleted.

77 changes: 0 additions & 77 deletions Sources/MooseKit/Bullwinkle.swift

This file was deleted.

16 changes: 0 additions & 16 deletions Sources/MooseKit/Command.swift

This file was deleted.

35 changes: 0 additions & 35 deletions Sources/MooseKit/CompletionToolCommand.swift

This file was deleted.

Loading

0 comments on commit e516fe2

Please sign in to comment.