Skip to content

Commit

Permalink
Merge pull request #58 from SwiftBuildTools/update-readme-for-0.2.0
Browse files Browse the repository at this point in the history
Update readme for 0.2.0
  • Loading branch information
ScottRobbins committed Dec 2, 2020
2 parents b6c92f7 + 4444f3b commit b53f0d7
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .changes.yml
Expand Up @@ -15,4 +15,4 @@ files:
- Removed
- Fixed
- Security
automaticallyRegenerate: true

@@ -0,0 +1,7 @@
{
"createdAtDate" : "2020-12-02T04:52:22Z",
"tags" : [
"Removed"
],
"description" : "Remove automatic regeneration of files"
}
@@ -0,0 +1,7 @@
{
"createdAtDate" : "2020-12-02T04:42:21Z",
"tags" : [
"Changed"
],
"description" : "CI now uses swiftenv to ensure correct swift version is used on macOS"
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -24,6 +24,10 @@ This file is auto-generated by Changes. Any modifications made to it will be ove
- Updated Swift Argument Parser to 0.3.1
- Add id to change entries and use as filename
- Do not include version in release info json
- CI now uses swiftenv to ensure correct swift version is used on macOS

### Removed
- Remove automatic regeneration of files

### Fixed
- Fixed formatting in test files
Expand Down
8 changes: 4 additions & 4 deletions README.md
@@ -1,6 +1,6 @@
# Changes

Changes is CLI tool (and in the future a framework) for creating Changelog entries and generating Changelogs and other documents from those.
Changes is CLI tool (and in the future a framework) for tracking metadata around changes made to code, generating Changelogs and other documents from those entries.

**Note:** This is still in early development. API is subject to breakage between minor versions below 1.0.0

Expand Down Expand Up @@ -52,19 +52,19 @@ supports (if any are missing please open an issue).
1. Download the needed binary

```bash
$ curl -OL https://github.com/SwiftBuildTools/Changes/releases/download/<version>/changes-swift-5-2-<target>.tar.gz
$ curl -OL https://github.com/SwiftBuildTools/Changes/releases/download/<version>/changes-swift-5-3-1-<target>-<dynamic|static>.tar.gz
```

Or

```bash
$ wget https://github.com/SwiftBuildTools/Changes/releases/download/<version>/changes-swift-5-2-<target>.tar.gz
$ wget https://github.com/SwiftBuildTools/Changes/releases/download/<version>/changes-swift-5-3-1-<target>-<dynamic|static>.tar.gz
```

2. Unpackage the binary

```bash
$ tar -xvzf changes-swift-5-2-<target>.tar.gz
$ tar -xvzf changes-swift-5-2-<target>-<dynamic|static>.tar.gz
```

Put this executable somewhere in your PATH.
Expand Down
1 change: 0 additions & 1 deletion Sources/ChangesCLI/ChangelogManagerConfig.swift
Expand Up @@ -3,7 +3,6 @@ struct ChangesConfig: Codable {
let identifier: String
let path: String
let tags: [String]
let automaticallyRegenerate: Bool
let footerText: String?
}

Expand Down
1 change: 0 additions & 1 deletion Sources/ChangesCLI/Commands/Add.swift
Expand Up @@ -116,7 +116,6 @@ struct Add: ParsableCommand {
try outputFolder.createFile(named: "\(UUID().uuidString).json").write(
outputString
)
try ChangelogGenerator().regenerateAutomaticallyRegeneratableFiles()
}

private func getTags(with config: ChangesConfig) -> [String] {
Expand Down
1 change: 0 additions & 1 deletion Sources/ChangesCLI/Commands/Init.swift
Expand Up @@ -25,7 +25,6 @@ struct Init: ParsableCommand {
identifier: "changelog",
path: "./CHANGELOG.md",
tags: tags,
automaticallyRegenerate: true,
footerText: nil
)
]
Expand Down
9 changes: 2 additions & 7 deletions Sources/ChangesCLI/Commands/Regenerate.swift
Expand Up @@ -12,7 +12,7 @@ struct Regenerate: ParsableCommand {
"Specify the files you would like to regenerate."
)
)
var identifiers: [String] = []
var identifiers: [String]

func validate() throws {
let loadedConfig = try ConfigurationLoader().load()
Expand All @@ -26,11 +26,6 @@ struct Regenerate: ParsableCommand {
}

func run() throws {
if identifiers.isEmpty {
try ChangelogGenerator().regenerateAutomaticallyRegeneratableFiles()
}
else {
try ChangelogGenerator().regenerateFiles(identifiers: identifiers)
}
try ChangelogGenerator().regenerateFiles(identifiers: identifiers)
}
}
1 change: 0 additions & 1 deletion Sources/ChangesCLI/Commands/ReleaseCommand.swift
Expand Up @@ -17,7 +17,6 @@ struct ReleaseCommand: ParsableCommand {
func run() throws {
let version = self.version ?? getVersion()
try ReleaseCreator().createRelease(version: version)
try ChangelogGenerator().regenerateAutomaticallyRegeneratableFiles()
}

private func getVersion() -> Version {
Expand Down
7 changes: 0 additions & 7 deletions Sources/ChangesCLI/Generate/ChangelogGenerator.swift
Expand Up @@ -24,13 +24,6 @@ struct ChangelogGenerator {
try regenerateFiles(files, loadedConfig: loadedConfig)
}

func regenerateAutomaticallyRegeneratableFiles() throws {
let loadedConfig = try ConfigurationLoader().load()

let files = loadedConfig.config.files.filter(\.automaticallyRegenerate)
try regenerateFiles(files, loadedConfig: loadedConfig)
}

private func regenerateFiles(
_ files: [ChangesConfig.ChangelogFile],
loadedConfig: LoadedChangesConfig
Expand Down

0 comments on commit b53f0d7

Please sign in to comment.