Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added install action in the Makefile. #29

Merged
merged 4 commits into from
Nov 27, 2019
Merged
Show file tree
Hide file tree
Changes from 3 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
13 changes: 13 additions & 0 deletions Documentation/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@ Once installed, you can use xcdiff directly:
xcdiff --help
```

### Make

1. Clone the repository
```sh
git clone https://github.com/bloomberg/xcdiff.git
cd xcdiff
```

2. Build and copy to `/usr/local/bin `
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can trim /usr/local/bin -> /usr/local/bin :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely sorry for my typos.

```sh
make install
```

## Framework

### Swift Package Manager
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@ VERSION_PATCH = 0
VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)
GIT_SHORT_HASH = $(shell git rev-parse --short HEAD)

TOOL_NAME = xcdiff
PREFIX = /usr/local
INSTALL_PATH = $(PREFIX)/bin/
BUILD_PATH = .build/release/$(TOOL_NAME)

clean:
xcrun swift package clean

build:
install: build
mkdir -p $(PREFIX)/bin
cp -f $(BUILD_PATH) $(INSTALL_PATH)

build: clean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder, wouldn't be better to leave the opportunity for the incremental build?

install: clean build
    mkdir -p $(PREFIX)/bin
    cp -f $(BUILD_PATH) $(INSTALL_PATH)

build:
    xcrun swift build --disable-sandbox -c release

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the suggestion. Makes sense👌

xcrun swift build --disable-sandbox -c release

test:
Expand Down