Skip to content

Commit

Permalink
ci: try to improve documentation generation scriot
Browse files Browse the repository at this point in the history
It sems Swift package DocC tool does no manage iOS, relies on macOS, and cannot handle UIKit

Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
  • Loading branch information
pylapp committed Oct 4, 2024
1 parent 694c083 commit e522d3c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//

import SwiftUI
import UIKit

// MARK: - Accessible Navigation Title Modifier

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
// Software description: A SwiftUI components library with code examples for Orange Unified Design System
//

import UIKit

// ଘ( ・ω・)_/゚・:*:・。☆
// [File to generate with the tokenator]

Expand Down Expand Up @@ -66,23 +64,23 @@ extension TypographyRawTokens {

// WARNING: values in pixels and not in points, do not use as is!

public static let fontLetterSpacing150: TypographyFontLetterSpacingRawToken = 150 / UIScreen.main.scale
public static let fontLetterSpacing175: TypographyFontLetterSpacingRawToken = 175 / UIScreen.main.scale
public static let fontLetterSpacing200: TypographyFontLetterSpacingRawToken = 200 / UIScreen.main.scale
public static let fontLetterSpacing250: TypographyFontLetterSpacingRawToken = 250 / UIScreen.main.scale
public static let fontLetterSpacing300: TypographyFontLetterSpacingRawToken = 300 / UIScreen.main.scale
public static let fontLetterSpacing350: TypographyFontLetterSpacingRawToken = 350 / UIScreen.main.scale
public static let fontLetterSpacing450: TypographyFontLetterSpacingRawToken = 450 / UIScreen.main.scale
public static let fontLetterSpacing550: TypographyFontLetterSpacingRawToken = 550 / UIScreen.main.scale
public static let fontLetterSpacing650: TypographyFontLetterSpacingRawToken = 650 / UIScreen.main.scale
public static let fontLetterSpacing750: TypographyFontLetterSpacingRawToken = 750 / UIScreen.main.scale
public static let fontLetterSpacing850: TypographyFontLetterSpacingRawToken = 850 / UIScreen.main.scale
public static let fontLetterSpacing950: TypographyFontLetterSpacingRawToken = 950 / UIScreen.main.scale
public static let fontLetterSpacing1050: TypographyFontLetterSpacingRawToken = 1050 / UIScreen.main.scale
public static let fontLetterSpacing1150: TypographyFontLetterSpacingRawToken = 1150 / UIScreen.main.scale
public static let fontLetterSpacing1250: TypographyFontLetterSpacingRawToken = 1250 / UIScreen.main.scale
public static let fontLetterSpacing1450: TypographyFontLetterSpacingRawToken = 1450 / UIScreen.main.scale
public static let fontLetterSpacing1850: TypographyFontLetterSpacingRawToken = 1850 / UIScreen.main.scale
public static let fontLetterSpacing150: TypographyFontLetterSpacingRawToken = 150
public static let fontLetterSpacing175: TypographyFontLetterSpacingRawToken = 175
public static let fontLetterSpacing200: TypographyFontLetterSpacingRawToken = 200
public static let fontLetterSpacing250: TypographyFontLetterSpacingRawToken = 250
public static let fontLetterSpacing300: TypographyFontLetterSpacingRawToken = 300
public static let fontLetterSpacing350: TypographyFontLetterSpacingRawToken = 350
public static let fontLetterSpacing450: TypographyFontLetterSpacingRawToken = 450
public static let fontLetterSpacing550: TypographyFontLetterSpacingRawToken = 550
public static let fontLetterSpacing650: TypographyFontLetterSpacingRawToken = 650
public static let fontLetterSpacing750: TypographyFontLetterSpacingRawToken = 750
public static let fontLetterSpacing850: TypographyFontLetterSpacingRawToken = 850
public static let fontLetterSpacing950: TypographyFontLetterSpacingRawToken = 950
public static let fontLetterSpacing1050: TypographyFontLetterSpacingRawToken = 1050
public static let fontLetterSpacing1150: TypographyFontLetterSpacingRawToken = 1150
public static let fontLetterSpacing1250: TypographyFontLetterSpacingRawToken = 1250
public static let fontLetterSpacing1450: TypographyFontLetterSpacingRawToken = 1450
public static let fontLetterSpacing1850: TypographyFontLetterSpacingRawToken = 1850

// MARK: Primitive token - Typography - Font family

Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let package = Package(
name: "OUDS",
defaultLocalization: "en",
platforms: [.iOS(.v15),
.macOS(.v11)], // macOS v11 required for swift-docc-plugin, not official support of OUDS for macOS!
.macOS(.v12)], // macOS v12 required for swift-docc-plugin, not official support of OUDS for macOS!

// Products define the executables and libraries a package produces, making them visible to other packages.
products: [
Expand Down
5 changes: 3 additions & 2 deletions generateDoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,9 @@ _ "👍 Documention folder created at '$DOCS_DIRECTORY'!"

# WARNING
# The version of swift-docc-plugin (https://github.com/swiftlang/swift-docc-plugin) we use (here 1.4.2 according to the Package.resolved file)
# does not seem to manage very weell Swift Packages with several targets.
# does not seem to manage very well Swift Packages with several targets.
# Consider using this version of the tool or submit an issue / pull request for updates to https://github.com/Orange-OpenSource/ouds-ios
# It fails also with iOS frameworks with UIKit (https://forums.swift.org/t/generate-documentation-failing-on-import-uikit/55202)
# Related issue: https://github.com/Orange-OpenSource/ouds-ios/issues/95
# (╯°□°)╯︵ ┻━┻

Expand Down Expand Up @@ -331,4 +332,4 @@ exit $EXIT_OK
# In case of performances issues due to the large amount of files in the Git repository:
# run "git clean -fd ; git reset --hard ; rm -rf .build"
# Or use "git prune"
# Or reclone the repository
# Or reclone the repository

0 comments on commit e522d3c

Please sign in to comment.