Giter Club home page Giter Club logo

runscriptplugin's Introduction

RunScriptPlugin

SwiftPackage Plugin for executing arbitrary ShellScript.

Feature

  • BuildToolPlugin: RunScriptPlugin
  • CommandPlugin: RunScriptCommandPlugin
  • XcodeBuildToolPlugin: RunScriptPlugin
  • XcodeCommandPlugin: RunScriptCommandPlugin

Usage

Place the file named runscript.yml(or .runscript.yml) in the root of the project. Write the shell script you want to run in this file.

The format is as follows.

prebuild: # prebuild Command
  - name: "Hello"
    script: "echo Hello" # Write scripts directly
  - name: "Show current path"
    script: "pwd"
  - name: "Write file"
    script: "echo Hello >> test.txt"

  - name: "SwiftLint"
    launchPath: "/bin/bash" # bash, zsh, etc. can be specified
    script: "swiftlint lint --fix"

  - name: "SwiftLint" # Another way to write ↑↑
    launchPath: "/usr/local/bin/swiftlint"
    arguments:
      - "lint"
      - "--fix"

  - name: "Update schema"
    file: "update_schema.sh" # Execute .sh file

build: # build Command
   - name: "Hello"
     script: "echo Hello"

command: # Command Plugin
  - name: "Hello from Command"
    script: "echo 'Hello from Command'"

all: # run in `prebuild`, `build`...
   - name: "Hello(all)"
     script: "echo Hello(all)"

Example

  • SwiftLint You can run Lint in SPM without using the SwiftLint plugin.
- name: "SwiftLint"
  script: "swiftlint lint"
  • Build Log
- name: "Build Log"
  script: "echo \"[$(date)] Build >> build.log\""
  • Theos(Orion) install You can install the Tweak from the Build button in SPM.
- name: "Theos make package and install"
  script: "make do"
  • SwiftFormat
- name: "SwiftFormat"
  script: "swiftformat ."
  • SwiftGen
- name: "SwiftGen"
  script: "swiftgen config run"

runscriptplugin's People

Contributors

p-x9 avatar saarthakmaini avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.