diff --git a/Makefile b/Makefile index 7c9a33d..b709451 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,18 @@ -VERSION = 0.0.4 +VERSION = 0.0.5 include CodeQL.mk -.PHONY: githubRelease -githubRelease: +.PHONY: updateVersion +updateVersion: sed -i '' 's|\(version: "\)\(.*\)\("\)|\1$(VERSION)\3|' Sources/LeakDetect/Command.swift + sed -i '' 's|\(download\/\)\(.*\)\(\/\)|\1$(VERSION)\3|' action.yml + sed -i '' 's|\(LeakDetect@\)\(.*\)|\1$(VERSION)|' README.md + sed -i '' 's|\(LeakDetect@\)\(.*\)|\1$(VERSION)|' README_ZH.md +.PHONY: githubRelease +githubRelease: updateVersion git add Sources/LeakDetect/Command.swift + git add action.yml git add Makefile git commit -m "Update to $(VERSION)" @@ -63,12 +69,12 @@ graph: single: leakDetect \ --sdk macosx \ - --file fixture/temp.swift + --file fixture/temp.swift \ + --reporter +# git clone https://github.com/antranapp/LeakDetector .PHONY: proj proj: - # git clone https://github.com/antranapp/LeakDetector - leakDetect \ --module LeakDetectorDemo \ --file LeakDetector/LeakDetectorDemo.xcworkspace diff --git a/README.md b/README.md index f99de0a..1801e5e 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,38 @@ leakDetect \ leakDetect \ --module "SCHEME NAME" \ --file Sample.xcodeproj + +# spm +leakDetect \ + --module TARGET_NAME \ + --file . + +# file +leakDetect \ + --sdk macosx \ + --file xxx.swift +``` + +## Usage(Github Action) + +```yaml +jobs: + build: + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v3 + - uses: yume190/LeakDetect@0.0.5 + with: + # https://github.com/antranapp/LeakDetector + module: LeakDetectorDemo + file: LeakDetectorDemo.xcworkspace + token: ${{secrets.GITHUB_TOKEN}} ``` +### Mode + #### [Assign](LeakDetectKit/Assign/AssignClosureVisitor.swift) Detect assign instance function. diff --git a/README_ZH.md b/README_ZH.md index e932841..b46d368 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -33,6 +33,26 @@ leakDetect \ --file xxx.swift ``` +## Usage(Github Action) + +```yaml +jobs: + build: + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v3 + - uses: yume190/LeakDetect@0.0.5 + with: + # https://github.com/antranapp/LeakDetector + module: LeakDetectorDemo + file: LeakDetectorDemo.xcworkspace + token: ${{secrets.GITHUB_TOKEN}} +``` + +### Mode + #### [Assign](LeakDetectKit/Assign/AssignClosureVisitor.swift) 偵測 assign `instance function`. diff --git a/Sources/LeakDetect/Command.swift b/Sources/LeakDetect/Command.swift index d2c3b44..2287dbb 100644 --- a/Sources/LeakDetect/Command.swift +++ b/Sources/LeakDetect/Command.swift @@ -22,7 +22,7 @@ struct Command: AsyncParsableCommand { leakDetect --module LeakDetectorDemo --file LeakDetectorDemo.xcworkspace """, - version: "0.0.4" + version: "0.0.5" ) @Flag(name: [.customLong("verbose", withSingleDash: false), .short], help: "verbose")