Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f0a2724
update
Jerry-Wang-Developer Feb 22, 2020
bdb47bc
update
Jerry-Wang-Developer Feb 22, 2020
b1ebed6
update
Jerry-Wang-Developer Feb 22, 2020
ca0cc8b
update
Jerry-Wang-Developer Feb 22, 2020
714f928
update
Jerry-Wang-Developer Feb 22, 2020
3c423f1
Update entrypoint.sh
Jerry-Wang-Developer Feb 22, 2020
cca7575
update
Jerry-Wang-Developer Feb 22, 2020
e6bb294
update
Jerry-Wang-Developer Feb 22, 2020
3ac3ffd
update
Jerry-Wang-Developer Feb 22, 2020
272a37d
add
Jerry-Wang-Developer Feb 22, 2020
6a818a2
update
Jerry-Wang-Developer Feb 22, 2020
02104dc
update
Jerry-Wang-Developer Feb 22, 2020
5aff033
update
Jerry-Wang-Developer Feb 22, 2020
ac079fd
update
Jerry-Wang-Developer Feb 22, 2020
dea7843
update
Jerry-Wang-Developer Feb 22, 2020
718de22
update
Jerry-Wang-Developer Feb 22, 2020
7dfaf0e
update
Jerry-Wang-Developer Feb 22, 2020
6ea2344
add
Jerry-Wang-Developer Feb 22, 2020
ee91098
update
Jerry-Wang-Developer Feb 22, 2020
86752d3
update
Jerry-Wang-Developer Feb 22, 2020
a8005b9
update
Jerry-Wang-Developer Feb 22, 2020
397c451
update
Jerry-Wang-Developer Feb 22, 2020
3a5119c
update\
Jerry-Wang-Developer Feb 23, 2020
fda3a66
update
Jerry-Wang-Developer Feb 23, 2020
f7631d8
update
Jerry-Wang-Developer Feb 23, 2020
e74d38b
update
Jerry-Wang-Developer Feb 23, 2020
02a456a
update
Jerry-Wang-Developer Feb 23, 2020
d58f67c
update
Jerry-Wang-Developer Feb 23, 2020
42e9c81
update
Jerry-Wang-Developer Feb 23, 2020
cc3be8e
update
Jerry-Wang-Developer Feb 23, 2020
898eebb
update
Jerry-Wang-Developer Feb 23, 2020
715e219
update
Jerry-Wang-Developer Feb 23, 2020
c6492a4
Update
Jerry-Wang-Developer Mar 14, 2020
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
30 changes: 30 additions & 0 deletions .github/workflows/code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Code Review

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x

- name: npm install
run: |
npm install --save-dev danger
npm install --save-dev @babel/plugin-transform-flow-strip-types
npm install --save-dev @babel/core
env:
CI: true

- name: Danger JS Action
uses: danger/danger-js@9.2.10
with:
args: "--dangerfile ./dangerfile.js"
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
10 changes: 7 additions & 3 deletions .github/workflows/danger-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Danger-Test

on:
push:
pull_request:
branches:
- master
- develop
Expand All @@ -16,8 +16,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Danger JS Action
uses: ./scripts/run-danger/
uses: ./ #danger/danger-js@9.1.8
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

# - name: Danger JS Action
# uses: ./scripts/run-danger/

8 changes: 0 additions & 8 deletions .github/workflows/hello.workflow

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v
with:
python-version: '3.7'
- name: Run python for test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,4 @@ fastlane/test_output

iOSInjectionProject/
*.DS_Store
__pycache__/
33 changes: 33 additions & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
--allman false
--binarygrouping none
--closingparen balanced
--commas always
--conflictmarkers reject
--decimalgrouping none
--elseposition same-line
--empty void
--exponentcase lowercase
--exponentgrouping disabled
--fractiongrouping disabled
--fragment false
--header ignore
--hexgrouping none
--hexliteralcase uppercase
--ifdef indent
--importgrouping alphabetized
--indent 4
--indentcase false
--linebreaks lf
--octalgrouping none
--operatorfunc spaced
--patternlet hoist
--ranges spaced
--self insert
--selfrequired
--semicolons never
--stripunusedargs closure-only
--trailingclosures
--trimwhitespace always
--wraparguments preserve
--wrapcollections preserve
--xcodeindentation disabled
3 changes: 3 additions & 0 deletions Configuration/Debug/Debug.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ BundleIdentifier = cn.com.hsbcchina.tech.test
BundleShortVersion = 1.0.0

APIDomain = www.baidu.com

PRODUCT_NAME = $(inherited) α

2 changes: 2 additions & 0 deletions Configuration/Release/Release.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ BundleIdentifier = cn.com.hsbcchina.tech
BundleShortVersion = 2.30.0

APIDomain = www.baidu.com

PRODUCT_NAME = $(inherited) α
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:12

RUN npm install --save-dev @babel/plugin-transform-flow-strip-types
RUN npm install --save-dev @babel/core
RUN npm install --save-dev danger

ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
10 changes: 6 additions & 4 deletions X3.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@
isa = PBXNativeTarget;
buildConfigurationList = 1BA42C2C23F41CBF0073A423 /* Build configuration list for PBXNativeTarget "X3" */;
buildPhases = (
1BA42CEF23F45DC70073A423 /* ShellScript */,
1BA42BFE23F41CBC0073A423 /* Sources */,
1BA42BFF23F41CBC0073A423 /* Frameworks */,
1BA42C0023F41CBC0073A423 /* Resources */,
1BA42CEF23F45DC70073A423 /* ShellScript */,
);
buildRules = (
);
Expand Down Expand Up @@ -309,7 +309,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n./scripts/run-scripts.sh\n";
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n./scripts/run-scripts.sh\n\ncd BuildTools\nswift run -c release swiftformat \"$SRCROOT\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -491,7 +491,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Apple Development: taoli zheng (KNPJFG8XBK)";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = "";
CURRENT_PROJECT_VERSION = 20200222121535;
DEVELOPMENT_ASSET_PATHS = "\"X3/Preview Content\"";
DEVELOPMENT_TEAM = 3P8FAFCTA3;
ENABLE_PREVIEWS = YES;
Expand All @@ -506,6 +506,7 @@
PROVISIONING_PROFILE_SPECIFIER = x3;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
Expand All @@ -516,7 +517,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Apple Development: taoli zheng (KNPJFG8XBK)";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = "";
CURRENT_PROJECT_VERSION = 20200222121535;
DEVELOPMENT_ASSET_PATHS = "\"X3/Preview Content\"";
DEVELOPMENT_TEAM = 3P8FAFCTA3;
ENABLE_PREVIEWS = YES;
Expand All @@ -531,6 +532,7 @@
PROVISIONING_PROFILE_SPECIFIER = x3;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
Expand Down
98 changes: 98 additions & 0 deletions X3.xcodeproj/xcshareddata/xcschemes/X3.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1BA42C0123F41CBC0073A423"
BuildableName = "&#x6c47;&#x4e30;&#x79d1;&#x6280;.app"
BlueprintName = "X3"
ReferencedContainer = "container:X3.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1BA42C1723F41CBF0073A423"
BuildableName = "X3Tests.xctest"
BlueprintName = "X3Tests"
ReferencedContainer = "container:X3.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1BA42C2223F41CBF0073A423"
BuildableName = "X3UITests.xctest"
BlueprintName = "X3UITests"
ReferencedContainer = "container:X3.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1BA42C0123F41CBC0073A423"
BuildableName = "&#x6c47;&#x4e30;&#x79d1;&#x6280;.app"
BlueprintName = "X3"
ReferencedContainer = "container:X3.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1BA42C0123F41CBC0073A423"
BuildableName = "&#x6c47;&#x4e30;&#x79d1;&#x6280;.app"
BlueprintName = "X3"
ReferencedContainer = "container:X3.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
4 changes: 2 additions & 2 deletions X3/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>$(BundleShortVersion)</string>
<string>2.30.0</string>
<key>CFBundleVersion</key>
<string>20200214033412</string>
<string>20200222121535</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
Expand Down
4 changes: 2 additions & 2 deletions X3Tests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>2.30.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>20200222121535</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions X3UITests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>2.30.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>20200222121535</string>
</dict>
</plist>
12 changes: 12 additions & 0 deletions dangerfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import {message, warn, markdown, danger} from "danger"

message("ha ha ha")

danger.git.modified_files.length

// Encourage smaller PRs
var bigPRThreshold = 30;
if (danger.github.pr.additions + danger.github.pr.deletions > bigPRThreshold) {
warn(':exclamation: Big PR (' + ++errorCount + ')');
markdown('> (' + errorCount + ') : Pull Request size seems relatively large. If Pull Request contains multiple changes, split each into separate PR will helps faster, easier review.');
}
6 changes: 6 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh -l

echo $(which danger)

# Run danger
danger --dangerfile "./" ci
8 changes: 8 additions & 0 deletions scripts/deprecated/check_tool.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This script use to check whether the specify tool is installed.

import os
import subprocess

def is_tool_installed(tool):
devnull = open(os.devnull, 'w')
return subprocess.run(['which', tool], stdout = devnull).returncode == 0
5 changes: 5 additions & 0 deletions scripts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"devDependencies": {
"danger": "^9.2.10"
}
}
9 changes: 0 additions & 9 deletions scripts/run-danger/Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions scripts/run-danger/entrypoint.sh

This file was deleted.

7 changes: 7 additions & 0 deletions scripts/swiftformat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import subprocess

def swiftformat(file, config):
print("format " + file)
subprocess.run(["swiftformat", file, "--config", config])


Loading