From 7bf173c464c1b4e4720ca0bd12b176f09b363296 Mon Sep 17 00:00:00 2001 From: Rakuyo Date: Sat, 2 Apr 2022 09:30:52 +0800 Subject: [PATCH 1/4] Restructuring the directory --- ...JSONPreview.podspec => JSONPreview.podspec | 4 +-- .../project.pbxproj | 24 ++++++------------ .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../Core/HighlightColor.swift | 0 .../Core/HighlightStyle.swift | 0 .../Core/JSONDecorator.swift | 0 .../{JSONPreview => }/Core/JSONLexer.swift | 0 .../{JSONPreview => }/Core/JSONPreview.swift | 0 .../{JSONPreview => }/Core/JSONSlice.swift | 0 .../{JSONPreview => }/Core/JSONTextView.swift | 0 .../Core/LineNumberCell.swift | 0 .../Core/LineNumberTableView.swift | 0 .../Core/String+ValidURL.swift | 0 .../{JSONPreview => }/Other/AppDelegate.swift | 0 .../AppIcon.appiconset/Contents.json | 0 .../AppIcon.appiconset/icon-1024.png | Bin .../AppIcon.appiconset/icon-20-ipad.png | Bin .../AppIcon.appiconset/icon-20@2x-ipad.png | Bin .../AppIcon.appiconset/icon-20@2x.png | Bin .../AppIcon.appiconset/icon-20@3x.png | Bin .../AppIcon.appiconset/icon-29-ipad.png | Bin .../AppIcon.appiconset/icon-29.png | Bin .../AppIcon.appiconset/icon-29@2x-ipad.png | Bin .../AppIcon.appiconset/icon-29@2x.png | Bin .../AppIcon.appiconset/icon-29@3x.png | Bin .../AppIcon.appiconset/icon-40.png | Bin .../AppIcon.appiconset/icon-40@2x.png | Bin .../AppIcon.appiconset/icon-40@3x.png | Bin .../AppIcon.appiconset/icon-60@2x.png | Bin .../AppIcon.appiconset/icon-60@3x.png | Bin .../AppIcon.appiconset/icon-76.png | Bin .../AppIcon.appiconset/icon-76@2x.png | Bin .../AppIcon.appiconset/icon-83.5@2x.png | Bin .../Other/Assets.xcassets/Contents.json | 0 .../expand.imageset/Contents.json | 0 .../expand.imageset/expand@2x.png | Bin .../expand.imageset/expand@3x.png | Bin .../fold.imageset/Contents.json | 0 .../fold.imageset/folded@2x.png | Bin .../fold.imageset/folded@3x.png | Bin .../Other/Base.lproj/LaunchScreen.storyboard | 4 +-- .../Other/Base.lproj/Main.storyboard | 0 .../{JSONPreview => }/Other/Info.plist | 0 .../Other/ViewController.swift | 0 .../Info.plist | 0 .../JSONPreviewTests.swift | 0 .../Info.plist | 0 .../JSONPreviewUITests.swift | 0 JSONPreview/default.png => default.png | Bin JSONPreview/push.sh => push.sh | 0 51 files changed, 12 insertions(+), 20 deletions(-) rename JSONPreview/JSONPreview.podspec => JSONPreview.podspec (87%) rename {JSONPreview/JSONPreview.xcodeproj => JSONPreview.xcodeproj}/project.pbxproj (94%) rename {JSONPreview/JSONPreview.xcodeproj => JSONPreview.xcodeproj}/project.xcworkspace/contents.xcworkspacedata (100%) rename {JSONPreview/JSONPreview.xcodeproj => JSONPreview.xcodeproj}/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename JSONPreview/{JSONPreview => }/Core/HighlightColor.swift (100%) rename JSONPreview/{JSONPreview => }/Core/HighlightStyle.swift (100%) rename JSONPreview/{JSONPreview => }/Core/JSONDecorator.swift (100%) rename JSONPreview/{JSONPreview => }/Core/JSONLexer.swift (100%) rename JSONPreview/{JSONPreview => }/Core/JSONPreview.swift (100%) rename JSONPreview/{JSONPreview => }/Core/JSONSlice.swift (100%) rename JSONPreview/{JSONPreview => }/Core/JSONTextView.swift (100%) rename JSONPreview/{JSONPreview => }/Core/LineNumberCell.swift (100%) rename JSONPreview/{JSONPreview => }/Core/LineNumberTableView.swift (100%) rename JSONPreview/{JSONPreview => }/Core/String+ValidURL.swift (100%) rename JSONPreview/{JSONPreview => }/Other/AppDelegate.swift (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-1024.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-29.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-40.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-76.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/Contents.json (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/expand.imageset/Contents.json (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/expand.imageset/expand@2x.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/expand.imageset/expand@3x.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/fold.imageset/Contents.json (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/fold.imageset/folded@2x.png (100%) rename JSONPreview/{JSONPreview => }/Other/Assets.xcassets/fold.imageset/folded@3x.png (100%) rename JSONPreview/{JSONPreview => }/Other/Base.lproj/LaunchScreen.storyboard (97%) rename JSONPreview/{JSONPreview => }/Other/Base.lproj/Main.storyboard (100%) rename JSONPreview/{JSONPreview => }/Other/Info.plist (100%) rename JSONPreview/{JSONPreview => }/Other/ViewController.swift (100%) rename {JSONPreview/JSONPreviewTests => JSONPreviewTests}/Info.plist (100%) rename {JSONPreview/JSONPreviewTests => JSONPreviewTests}/JSONPreviewTests.swift (100%) rename {JSONPreview/JSONPreviewUITests => JSONPreviewUITests}/Info.plist (100%) rename {JSONPreview/JSONPreviewUITests => JSONPreviewUITests}/JSONPreviewUITests.swift (100%) rename JSONPreview/default.png => default.png (100%) rename JSONPreview/push.sh => push.sh (100%) diff --git a/JSONPreview/JSONPreview.podspec b/JSONPreview.podspec similarity index 87% rename from JSONPreview/JSONPreview.podspec rename to JSONPreview.podspec index 2ce4937..e451d10 100755 --- a/JSONPreview/JSONPreview.podspec +++ b/JSONPreview.podspec @@ -29,10 +29,10 @@ Pod::Spec.new do |s| s.module_name = 'JSONPreview' - s.source_files = 'JSONPreview/JSONPreview/Core/*' + s.source_files = 'JSONPreview/Core/*' s.resource_bundle = { - 'JSONPreviewBundle' => [ 'JSONPreview/JSONPreview/Other/*.xcassets' ] + 'JSONPreviewBundle' => [ 'JSONPreview/Other/*.xcassets' ] } end diff --git a/JSONPreview/JSONPreview.xcodeproj/project.pbxproj b/JSONPreview.xcodeproj/project.pbxproj similarity index 94% rename from JSONPreview/JSONPreview.xcodeproj/project.pbxproj rename to JSONPreview.xcodeproj/project.pbxproj index fdcf1a5..793ad79 100644 --- a/JSONPreview/JSONPreview.xcodeproj/project.pbxproj +++ b/JSONPreview.xcodeproj/project.pbxproj @@ -7,11 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 3A134BCD251486B3002AAFA6 /* JSONPreview.podspec in Resources */ = {isa = PBXBuildFile; fileRef = 3A134BCB251486B3002AAFA6 /* JSONPreview.podspec */; }; - 3A134BCE251486B3002AAFA6 /* push.sh in Resources */ = {isa = PBXBuildFile; fileRef = 3A134BCC251486B3002AAFA6 /* push.sh */; }; - 3A134C6625148A31002AAFA6 /* default.png in Resources */ = {isa = PBXBuildFile; fileRef = 3A134C6525148A31002AAFA6 /* default.png */; }; - 3A134C7425148CB0002AAFA6 /* README_CN.md in Resources */ = {isa = PBXBuildFile; fileRef = 3A134C7225148CB0002AAFA6 /* README_CN.md */; }; - 3A134C7525148CB0002AAFA6 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 3A134C7325148CB0002AAFA6 /* README.md */; }; 3A1F069E2508D1D800C16862 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1F069D2508D1D800C16862 /* AppDelegate.swift */; }; 3A1F06A22508D1D800C16862 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A1F06A12508D1D800C16862 /* ViewController.swift */; }; 3A1F06A52508D1D800C16862 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3A1F06A32508D1D800C16862 /* Main.storyboard */; }; @@ -28,6 +23,7 @@ 3A9DB22D2509D7F4002E7B15 /* HighlightColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A9DB22C2509D7F4002E7B15 /* HighlightColor.swift */; }; 3A9DB22F2509DA7A002E7B15 /* HighlightStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A9DB22E2509DA7A002E7B15 /* HighlightStyle.swift */; }; 3A9DB33D250A0DB4002E7B15 /* LineNumberTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A9DB33C250A0DB4002E7B15 /* LineNumberTableView.swift */; }; + AE5465DE27F7DDEA00201BD0 /* default.png in Resources */ = {isa = PBXBuildFile; fileRef = AE5465DD27F7DDEA00201BD0 /* default.png */; }; AE71889A26FADA8300A16878 /* String+ValidURL.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE71889926FADA8300A16878 /* String+ValidURL.swift */; }; /* End PBXBuildFile section */ @@ -51,9 +47,6 @@ /* Begin PBXFileReference section */ 3A134BCB251486B3002AAFA6 /* JSONPreview.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = JSONPreview.podspec; sourceTree = SOURCE_ROOT; }; 3A134BCC251486B3002AAFA6 /* push.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = push.sh; sourceTree = SOURCE_ROOT; }; - 3A134C6525148A31002AAFA6 /* default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = default.png; sourceTree = SOURCE_ROOT; }; - 3A134C7225148CB0002AAFA6 /* README_CN.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = README_CN.md; path = ../../README_CN.md; sourceTree = ""; }; - 3A134C7325148CB0002AAFA6 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../../README.md; sourceTree = ""; }; 3A1F069A2508D1D800C16862 /* JSONPreview.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JSONPreview.app; sourceTree = BUILT_PRODUCTS_DIR; }; 3A1F069D2508D1D800C16862 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 3A1F06A12508D1D800C16862 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -76,6 +69,9 @@ 3A9DB22C2509D7F4002E7B15 /* HighlightColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HighlightColor.swift; sourceTree = ""; }; 3A9DB22E2509DA7A002E7B15 /* HighlightStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HighlightStyle.swift; sourceTree = ""; }; 3A9DB33C250A0DB4002E7B15 /* LineNumberTableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LineNumberTableView.swift; sourceTree = ""; }; + AE5465D927F7DDC800201BD0 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; }; + AE5465DA27F7DDC800201BD0 /* README_CN.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README_CN.md; sourceTree = SOURCE_ROOT; }; + AE5465DD27F7DDEA00201BD0 /* default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = default.png; sourceTree = SOURCE_ROOT; }; AE71889926FADA8300A16878 /* String+ValidURL.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+ValidURL.swift"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -127,11 +123,11 @@ 3A1F069C2508D1D800C16862 /* JSONPreview */ = { isa = PBXGroup; children = ( - 3A134C7325148CB0002AAFA6 /* README.md */, - 3A134C7225148CB0002AAFA6 /* README_CN.md */, + AE5465DA27F7DDC800201BD0 /* README_CN.md */, + AE5465D927F7DDC800201BD0 /* README.md */, 3A134BCC251486B3002AAFA6 /* push.sh */, 3A134BCB251486B3002AAFA6 /* JSONPreview.podspec */, - 3A134C6525148A31002AAFA6 /* default.png */, + AE5465DD27F7DDEA00201BD0 /* default.png */, 3A1F06CD2508D20700C16862 /* Core */, 3A1F06CE2508D20C00C16862 /* Other */, ); @@ -291,13 +287,9 @@ buildActionMask = 2147483647; files = ( 3A1F06AA2508D1DC00C16862 /* LaunchScreen.storyboard in Resources */, - 3A134C7425148CB0002AAFA6 /* README_CN.md in Resources */, 3A1F06A72508D1DC00C16862 /* Assets.xcassets in Resources */, 3A1F06A52508D1D800C16862 /* Main.storyboard in Resources */, - 3A134BCE251486B3002AAFA6 /* push.sh in Resources */, - 3A134BCD251486B3002AAFA6 /* JSONPreview.podspec in Resources */, - 3A134C7525148CB0002AAFA6 /* README.md in Resources */, - 3A134C6625148A31002AAFA6 /* default.png in Resources */, + AE5465DE27F7DDEA00201BD0 /* default.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/JSONPreview/JSONPreview.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/JSONPreview.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from JSONPreview/JSONPreview.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to JSONPreview.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/JSONPreview/JSONPreview.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/JSONPreview.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from JSONPreview/JSONPreview.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to JSONPreview.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/JSONPreview/JSONPreview/Core/HighlightColor.swift b/JSONPreview/Core/HighlightColor.swift similarity index 100% rename from JSONPreview/JSONPreview/Core/HighlightColor.swift rename to JSONPreview/Core/HighlightColor.swift diff --git a/JSONPreview/JSONPreview/Core/HighlightStyle.swift b/JSONPreview/Core/HighlightStyle.swift similarity index 100% rename from JSONPreview/JSONPreview/Core/HighlightStyle.swift rename to JSONPreview/Core/HighlightStyle.swift diff --git a/JSONPreview/JSONPreview/Core/JSONDecorator.swift b/JSONPreview/Core/JSONDecorator.swift similarity index 100% rename from JSONPreview/JSONPreview/Core/JSONDecorator.swift rename to JSONPreview/Core/JSONDecorator.swift diff --git a/JSONPreview/JSONPreview/Core/JSONLexer.swift b/JSONPreview/Core/JSONLexer.swift similarity index 100% rename from JSONPreview/JSONPreview/Core/JSONLexer.swift rename to JSONPreview/Core/JSONLexer.swift diff --git a/JSONPreview/JSONPreview/Core/JSONPreview.swift b/JSONPreview/Core/JSONPreview.swift similarity index 100% rename from JSONPreview/JSONPreview/Core/JSONPreview.swift rename to JSONPreview/Core/JSONPreview.swift diff --git a/JSONPreview/JSONPreview/Core/JSONSlice.swift b/JSONPreview/Core/JSONSlice.swift similarity index 100% rename from JSONPreview/JSONPreview/Core/JSONSlice.swift rename to JSONPreview/Core/JSONSlice.swift diff --git a/JSONPreview/JSONPreview/Core/JSONTextView.swift b/JSONPreview/Core/JSONTextView.swift similarity index 100% rename from JSONPreview/JSONPreview/Core/JSONTextView.swift rename to JSONPreview/Core/JSONTextView.swift diff --git a/JSONPreview/JSONPreview/Core/LineNumberCell.swift b/JSONPreview/Core/LineNumberCell.swift similarity index 100% rename from JSONPreview/JSONPreview/Core/LineNumberCell.swift rename to JSONPreview/Core/LineNumberCell.swift diff --git a/JSONPreview/JSONPreview/Core/LineNumberTableView.swift b/JSONPreview/Core/LineNumberTableView.swift similarity index 100% rename from JSONPreview/JSONPreview/Core/LineNumberTableView.swift rename to JSONPreview/Core/LineNumberTableView.swift diff --git a/JSONPreview/JSONPreview/Core/String+ValidURL.swift b/JSONPreview/Core/String+ValidURL.swift similarity index 100% rename from JSONPreview/JSONPreview/Core/String+ValidURL.swift rename to JSONPreview/Core/String+ValidURL.swift diff --git a/JSONPreview/JSONPreview/Other/AppDelegate.swift b/JSONPreview/Other/AppDelegate.swift similarity index 100% rename from JSONPreview/JSONPreview/Other/AppDelegate.swift rename to JSONPreview/Other/AppDelegate.swift diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/Contents.json b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/Contents.json rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-1024.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-1024.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-1024.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-1024.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-40.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-40.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-40.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-40.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-76.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-76.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-76.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-76.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png b/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png rename to JSONPreview/Other/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/Contents.json b/JSONPreview/Other/Assets.xcassets/Contents.json similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/Contents.json rename to JSONPreview/Other/Assets.xcassets/Contents.json diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/expand.imageset/Contents.json b/JSONPreview/Other/Assets.xcassets/expand.imageset/Contents.json similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/expand.imageset/Contents.json rename to JSONPreview/Other/Assets.xcassets/expand.imageset/Contents.json diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/expand.imageset/expand@2x.png b/JSONPreview/Other/Assets.xcassets/expand.imageset/expand@2x.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/expand.imageset/expand@2x.png rename to JSONPreview/Other/Assets.xcassets/expand.imageset/expand@2x.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/expand.imageset/expand@3x.png b/JSONPreview/Other/Assets.xcassets/expand.imageset/expand@3x.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/expand.imageset/expand@3x.png rename to JSONPreview/Other/Assets.xcassets/expand.imageset/expand@3x.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/fold.imageset/Contents.json b/JSONPreview/Other/Assets.xcassets/fold.imageset/Contents.json similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/fold.imageset/Contents.json rename to JSONPreview/Other/Assets.xcassets/fold.imageset/Contents.json diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/fold.imageset/folded@2x.png b/JSONPreview/Other/Assets.xcassets/fold.imageset/folded@2x.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/fold.imageset/folded@2x.png rename to JSONPreview/Other/Assets.xcassets/fold.imageset/folded@2x.png diff --git a/JSONPreview/JSONPreview/Other/Assets.xcassets/fold.imageset/folded@3x.png b/JSONPreview/Other/Assets.xcassets/fold.imageset/folded@3x.png similarity index 100% rename from JSONPreview/JSONPreview/Other/Assets.xcassets/fold.imageset/folded@3x.png rename to JSONPreview/Other/Assets.xcassets/fold.imageset/folded@3x.png diff --git a/JSONPreview/JSONPreview/Other/Base.lproj/LaunchScreen.storyboard b/JSONPreview/Other/Base.lproj/LaunchScreen.storyboard similarity index 97% rename from JSONPreview/JSONPreview/Other/Base.lproj/LaunchScreen.storyboard rename to JSONPreview/Other/Base.lproj/LaunchScreen.storyboard index 6e33b48..d95dc10 100644 --- a/JSONPreview/JSONPreview/Other/Base.lproj/LaunchScreen.storyboard +++ b/JSONPreview/Other/Base.lproj/LaunchScreen.storyboard @@ -1,9 +1,9 @@ - + - + diff --git a/JSONPreview/JSONPreview/Other/Base.lproj/Main.storyboard b/JSONPreview/Other/Base.lproj/Main.storyboard similarity index 100% rename from JSONPreview/JSONPreview/Other/Base.lproj/Main.storyboard rename to JSONPreview/Other/Base.lproj/Main.storyboard diff --git a/JSONPreview/JSONPreview/Other/Info.plist b/JSONPreview/Other/Info.plist similarity index 100% rename from JSONPreview/JSONPreview/Other/Info.plist rename to JSONPreview/Other/Info.plist diff --git a/JSONPreview/JSONPreview/Other/ViewController.swift b/JSONPreview/Other/ViewController.swift similarity index 100% rename from JSONPreview/JSONPreview/Other/ViewController.swift rename to JSONPreview/Other/ViewController.swift diff --git a/JSONPreview/JSONPreviewTests/Info.plist b/JSONPreviewTests/Info.plist similarity index 100% rename from JSONPreview/JSONPreviewTests/Info.plist rename to JSONPreviewTests/Info.plist diff --git a/JSONPreview/JSONPreviewTests/JSONPreviewTests.swift b/JSONPreviewTests/JSONPreviewTests.swift similarity index 100% rename from JSONPreview/JSONPreviewTests/JSONPreviewTests.swift rename to JSONPreviewTests/JSONPreviewTests.swift diff --git a/JSONPreview/JSONPreviewUITests/Info.plist b/JSONPreviewUITests/Info.plist similarity index 100% rename from JSONPreview/JSONPreviewUITests/Info.plist rename to JSONPreviewUITests/Info.plist diff --git a/JSONPreview/JSONPreviewUITests/JSONPreviewUITests.swift b/JSONPreviewUITests/JSONPreviewUITests.swift similarity index 100% rename from JSONPreview/JSONPreviewUITests/JSONPreviewUITests.swift rename to JSONPreviewUITests/JSONPreviewUITests.swift diff --git a/JSONPreview/default.png b/default.png similarity index 100% rename from JSONPreview/default.png rename to default.png diff --git a/JSONPreview/push.sh b/push.sh similarity index 100% rename from JSONPreview/push.sh rename to push.sh From e7657637b024c8cae3f47505c5fe5a7d6942ece6 Mon Sep 17 00:00:00 2001 From: Rakuyo Date: Sat, 2 Apr 2022 09:35:48 +0800 Subject: [PATCH 2/4] Use apple-generic as a build rule --- JSONPreview.xcodeproj/project.pbxproj | 6 ++++-- JSONPreview/Other/Info.plist | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/JSONPreview.xcodeproj/project.pbxproj b/JSONPreview.xcodeproj/project.pbxproj index 793ad79..a0d898d 100644 --- a/JSONPreview.xcodeproj/project.pbxproj +++ b/JSONPreview.xcodeproj/project.pbxproj @@ -501,7 +501,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 202109231031; + CURRENT_PROJECT_VERSION = 11; DEVELOPMENT_TEAM = 5C9JW4S9DE; INFOPLIST_FILE = "$(SRCROOT)/JSONPreview/Other/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; @@ -514,6 +514,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; }; @@ -522,7 +523,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 202109231031; + CURRENT_PROJECT_VERSION = 11; DEVELOPMENT_TEAM = 5C9JW4S9DE; INFOPLIST_FILE = "$(SRCROOT)/JSONPreview/Other/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; @@ -535,6 +536,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; }; name = Release; }; diff --git a/JSONPreview/Other/Info.plist b/JSONPreview/Other/Info.plist index b729d58..669cdc4 100644 --- a/JSONPreview/Other/Info.plist +++ b/JSONPreview/Other/Info.plist @@ -17,7 +17,7 @@ CFBundleShortVersionString 1.3.3 CFBundleVersion - 202111241752 + $(CURRENT_PROJECT_VERSION) LSRequiresIPhoneOS UILaunchStoryboardName From c445c2ef12e90665a879bb97cfca80f0a948c900 Mon Sep 17 00:00:00 2001 From: Rakuyo Date: Sat, 2 Apr 2022 09:37:03 +0800 Subject: [PATCH 3/4] update push.sh --- push.sh | 111 +++++++++++++++++++++++--------------------------------- 1 file changed, 46 insertions(+), 65 deletions(-) diff --git a/push.sh b/push.sh index 7fe064b..af23f02 100755 --- a/push.sh +++ b/push.sh @@ -1,82 +1,63 @@ #!/bin/zsh # Authoer: Rakuyo -# Update Date: 2020.04.07 +# Update Date: 2022.04.02 -# Starting time -start=$(date +%s) -startM=$(date +%M) - -# log color configuration -Cyan='\033[0;36m' -Default='\033[0;m' - -# Get path -project_path=$(cd `dirname $0` ; pwd); +project_path=$(cd `dirname $0` ; pwd) cd $project_path -# Read podspec file while read line do - - # Get name if [[ $line =~ "s.name" ]] ; then name=`echo $line | cut -d = -f 2 | cut -d \' -f 2` fi - # Get the version number if [[ $line =~ "s.version" ]] ; then version=`echo $line | cut -d = -f 2 | cut -d \' -f 2` - break # End loop + break fi - -done < $(find ./ -name '*.podspec') - -# current time -dateString=$(date "+%Y%m%d%H%M") - -# info file path -if [[ -f "Other/Info.plist" ]]; then - infoPlist=$project_path"/Other/Info.plist" +done < $(find ./ -name '*.podspec') + +lintLib(){ + pod lib lint $name.podspec --allow-warnings --skip-tests +} + +release(){ + release_branch=release/$version + + git checkout -b $release_branch develop + + agvtool new-marketing-version $version + + agvtool next-version -all + + build=$(agvtool what-version | tail -n2 | awk -F ' ' '{print $NF}') + + git_message="[Release] version: $version build: $build" + + git add . && git commit -m $git_message + + git checkout master + git merge --no-ff -m 'Merge branch '$release_branch'' $release_branch + git push origin master + git tag $version + git push origin $version + git checkout develop + git merge --no-ff -m 'Merge tag '$version' into develop' $version + git push origin develop + git branch -d $release_branch + + pod trunk push $name.podspec --allow-warnings --skip-tests +} + +echo "Whether to skip local verification? [Y/N]?" +if read -t 5 is_skip_lint; then + case $is_skip_lint in + (N | n) + lintLib && release;; + (*) + release;; + esac else - infoPlist=$project_path"/"${project_path##*/}"/Other/Info.plist" + release fi - -# Update the info.plist file -/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $version" $infoPlist -/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $dateString" $infoPlist - -# add info.plist -git add $infoPlist - -echo "${Default}========================================================" -echo " The info.plist file has been updated" -echo "${Default}========================================================" - -# commit information -message="[Release Script] Version updated to $version $dateString" - -# Commit git -git add *.podspec && git commit -m $message && git push -git tag $version && git push origin $version - -echo "${Default}========================================================" -echo " Git push complete" -echo "${Default}========================================================" - -echo "${Default}========================================================" -echo " Start push ${Cyan}$name${Default} at $(date "+%F %r")" -echo "${Default}========================================================" - -# Push -pod trunk push $name.podspec --allow-warnings --skip-tests - -# Calculate the time difference -time=$(( $(date +%s) - $start )) -timeM=$(( $(date +%M) - $startM )) - -echo "${Default}========================================================" -echo " finish push ${Cyan}$name${Default}, time consuming $time second" -echo "${Default}========================================================" - -say -v Mei-Jia "The push of $name is completed, it takes about $timeM minutes" From 0345aadda74af584ec2a93188ee849d05ef054f4 Mon Sep 17 00:00:00 2001 From: Rakuyo Date: Sat, 2 Apr 2022 09:40:12 +0800 Subject: [PATCH 4/4] [Release] version: 1.3.4 build: 12 --- JSONPreview.podspec | 2 +- JSONPreview.xcodeproj/project.pbxproj | 4 ++-- JSONPreviewTests/Info.plist | 4 ++-- JSONPreviewUITests/Info.plist | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/JSONPreview.podspec b/JSONPreview.podspec index e451d10..8e3e112 100755 --- a/JSONPreview.podspec +++ b/JSONPreview.podspec @@ -5,7 +5,7 @@ Pod::Spec.new do |s| s.name = 'JSONPreview' - s.version = '1.3.3' + s.version = '1.3.4' s.summary = '🎨 A view that can be highlighted after formatting JSON.' diff --git a/JSONPreview.xcodeproj/project.pbxproj b/JSONPreview.xcodeproj/project.pbxproj index a0d898d..8ffc3f4 100644 --- a/JSONPreview.xcodeproj/project.pbxproj +++ b/JSONPreview.xcodeproj/project.pbxproj @@ -501,7 +501,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEVELOPMENT_TEAM = 5C9JW4S9DE; INFOPLIST_FILE = "$(SRCROOT)/JSONPreview/Other/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; @@ -523,7 +523,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 12; DEVELOPMENT_TEAM = 5C9JW4S9DE; INFOPLIST_FILE = "$(SRCROOT)/JSONPreview/Other/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; diff --git a/JSONPreviewTests/Info.plist b/JSONPreviewTests/Info.plist index 64d65ca..976150a 100644 --- a/JSONPreviewTests/Info.plist +++ b/JSONPreviewTests/Info.plist @@ -15,8 +15,8 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 1.0 + 1.3.4 CFBundleVersion - 1 + 12 diff --git a/JSONPreviewUITests/Info.plist b/JSONPreviewUITests/Info.plist index 64d65ca..976150a 100644 --- a/JSONPreviewUITests/Info.plist +++ b/JSONPreviewUITests/Info.plist @@ -15,8 +15,8 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 1.0 + 1.3.4 CFBundleVersion - 1 + 12