diff --git a/README.en.md b/README.en.md index f28d683..ce700d8 100644 --- a/README.en.md +++ b/README.en.md @@ -15,7 +15,7 @@ responses in a controlled test environment. [![iOS 15+](https://img.shields.io/badge/iOS-15%2B-111111?logo=apple)](project.yml) [![Swift 5.9](https://img.shields.io/badge/Swift-5.9-F05138)](project.yml) [![Go 1.23+](https://img.shields.io/badge/Go-1.23%2B-00ADD8?logo=go)](Core/go.mod) -[![Version](https://img.shields.io/badge/version-v1.0.5-2563EB)](docs/CHANGELOG.md) +[![Version](https://img.shields.io/badge/version-v1.0.7-2563EB)](docs/CHANGELOG.md) [Features](#feature-overview) · [How It Works](#how-it-works) · diff --git a/README.md b/README.md index 08468e0..ad649a9 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ [![iOS 15+](https://img.shields.io/badge/iOS-15%2B-111111?logo=apple)](project.yml) [![Swift 5.9](https://img.shields.io/badge/Swift-5.9-F05138)](project.yml) [![Go 1.23+](https://img.shields.io/badge/Go-1.23%2B-00ADD8?logo=go)](Core/go.mod) -[![Version](https://img.shields.io/badge/version-v1.0.5-2563EB)](docs/CHANGELOG.md) +[![Version](https://img.shields.io/badge/version-v1.0.7-2563EB)](docs/CHANGELOG.md) [功能概览](#功能概览) · [工作原理](#工作原理) · diff --git a/Shared/AppRemoteConfiguration.swift b/Shared/AppRemoteConfiguration.swift index bc9b422..507a6b8 100644 --- a/Shared/AppRemoteConfiguration.swift +++ b/Shared/AppRemoteConfiguration.swift @@ -23,7 +23,7 @@ struct AppRemoteConfiguration: Decodable, Equatable { let communityPromptClients: [String] static let fallback = AppRemoteConfiguration( - latestVersion: "1.0.5", + latestVersion: "1.0.7", minimumSupportedVersion: "1.0.0", communityPromptClients: [ ThirdPartyProxyClient.surge.rawValue, diff --git a/Tests/PaopaoLocationSpooferTests/AppRemoteConfigurationTests.swift b/Tests/PaopaoLocationSpooferTests/AppRemoteConfigurationTests.swift index 00fd303..2f73c3f 100644 --- a/Tests/PaopaoLocationSpooferTests/AppRemoteConfigurationTests.swift +++ b/Tests/PaopaoLocationSpooferTests/AppRemoteConfigurationTests.swift @@ -62,7 +62,7 @@ final class AppRemoteConfigurationTests: XCTestCase { func testFallbackMatchesCurrentProjectPolicy() { let configuration = AppRemoteConfiguration.fallback - XCTAssertEqual(configuration.latestVersion, "1.0.5") + XCTAssertEqual(configuration.latestVersion, "1.0.7") XCTAssertEqual(configuration.minimumSupportedVersion, "1.0.0") XCTAssertFalse(configuration.requestsCommunityPrompt(for: .shadowrocket)) for client in ThirdPartyProxyClient.allCases where client != .shadowrocket { diff --git a/Tests/update_and_contribution_contract_test.sh b/Tests/update_and_contribution_contract_test.sh index 5026b1a..e821c19 100644 --- a/Tests/update_and_contribution_contract_test.sh +++ b/Tests/update_and_contribution_contract_test.sh @@ -33,6 +33,15 @@ assert set(config["communityPromptClients"]) == { } PY +LATEST_VERSION="$(python3 -c 'import json, sys; print(json.load(open(sys.argv[1], encoding="utf-8"))["latestVersion"])' "$ROOT/version.txt")" + +grep -Fq "latestVersion: \"$LATEST_VERSION\"" "$CONFIG" \ + || fail "Shared/AppRemoteConfiguration.swift fallback latestVersion must match version.txt ($LATEST_VERSION)" +grep -Fq "version-v$LATEST_VERSION" "$ROOT/README.md" \ + || fail "README.md version badge must match version.txt ($LATEST_VERSION)" +grep -Fq "version-v$LATEST_VERSION" "$ROOT/README.en.md" \ + || fail "README.en.md version badge must match version.txt ($LATEST_VERSION)" + grep -q 'static let fallback = AppRemoteConfiguration' "$CONFIG" \ || fail "the app must ship a built-in remote-configuration fallback" grep -q 'timeoutIntervalForRequest = 1.5' "$CONFIG" \