Skip to content

Commit

Permalink
Use swift-argument-parser to get current version
Browse files Browse the repository at this point in the history
  • Loading branch information
subdan committed Nov 27, 2020
1 parent 8a24357 commit a112164
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Scripts/increment_major_version.command
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cd "$( dirname "${BASH_SOURCE[0]}" )"
cd ..
perl -i -pe 's/\b(\d+)(?=.\d+")/$1+1/e' FigmaExport.podspec
perl -i -pe 's/\b(\d+)(?=.\d+")/$1+1/e' ./Sources/FigmaExport/Subcommands/VersionOptions.swift
perl -i -pe 's/\b(\d+)(?=.\d+")/$1+1/e' ./Sources/FigmaExport/main.swift
2 changes: 1 addition & 1 deletion Scripts/increment_minor_version.command
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cd "$( dirname "${BASH_SOURCE[0]}" )"
cd ..
perl -i -pe 's/\b(\d+)(?=\D*$)/$1+1/e' FigmaExport.podspec
perl -i -pe 's/\b(\d+)(?=\D*$)/$1+1/e' ./Sources/FigmaExport/Subcommands/VersionOptions.swift
perl -i -pe 's/\b(\d+)(?=\D*$)/$1+1/e' ./Sources/FigmaExport/main.swift
14 changes: 0 additions & 14 deletions Sources/FigmaExport/Subcommands/VersionOptions.swift

This file was deleted.

4 changes: 1 addition & 3 deletions Sources/FigmaExport/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ struct FigmaExportCommand: ParsableCommand {
commandName: "figma-export",
abstract: "Exports resources from Figma",
discussion: "Exports resources (colors, icons, images) from Figma to Xcode / Android Studio project",
version: "0.18.3",
subcommands: [
ExportColors.self,
ExportIcons.self,
Expand All @@ -45,9 +46,6 @@ struct FigmaExportCommand: ParsableCommand {
defaultSubcommand: ExportColors.self
)

@OptionGroup()
var versionOptions: VersionOptions

}

FigmaExportCommand.main()

0 comments on commit a112164

Please sign in to comment.