imxieyi / waifu2x-mac

Waifu2x-ios port to macOS, still in Core ML and Metal
MIT License
445 stars 47 forks source link

Bash script to build project #10

Closed guimondmm closed 5 years ago

guimondmm commented 5 years ago

Sorry for the new pull request. Branch master wasn't in my protected branches, and I managed to completely mess it up with careless git commands. Because I've only added this one file, it was easier for me to start from scratch, and copy the file over than to pore through the git history and try to revert the mistake I did. 😅

Anyhow, this is the pretty much the same build script as in the previous pull request. I've only reflowed it for better legibility, made sure the script only exited with exit code 0 if the build was successful, and added a check for xcodebuild's exit code.

I have absolutely zero experience with Travis CI, but I tried it, and it build and deploys successfully with my sample config file:

os: osx
osx_image: xcode10.1
script: "./build.sh"
before_deploy:
- cd build
- GZIP=-9 tar -zcvf waifu2x-mac.tgz .
- export RELEASE_TITLE=$(date '+%Y%m%d%H%M%S')-$TRAVIS_JOB_NUMBER
deploy:
  provider: releases
  name: $RELEASE_TITLE
  api_key:
    secure: <encrypted-github-oauth-token>
  file: waifu2x-mac.tgz
  skip_cleanup: true
  draft: true
guimondmm commented 5 years ago

Script now asks to download Xcode automatically if it's not installed, and performs more checks. It's really a build script on autopilot at this point. I'll use it for other projects too.

I'll quickly update the README when I get the chance.

imxieyi commented 5 years ago

Looks good to me. I will consider adding an instrument panel as suggested in #4.