Skip to content

Commit

Permalink
Rename to mkjson
Browse files Browse the repository at this point in the history
  • Loading branch information
mfussenegger committed Mar 13, 2019
1 parent f46541b commit ec3e3a6
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 36 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.stack-work/
fake-json.cabal
*~
mkjson.cabal
*~
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# fake-json
# mkjson

[![Build status](https://dev.azure.com/mfussenegger/fake-json/_apis/build/status/fake-json-CI?branchName=master)](https://dev.azure.com/mfussenegger/fake-json/_build/latest?definitionId=2)
[![Build status](https://dev.azure.com/mfussenegger/mkjson/_apis/build/status/mkjson-CI?branchName=master)](https://dev.azure.com/mfussenegger/mkjson/_build/latest?definitionId=2)

`fake-json` is a CLI to generate JSON records.
`mkjson` is a CLI to generate JSON records.


Static JSON:

```
fake-json x=10 y=20 foo=bar
mkjson x=10 y=20 foo=bar
{"foo":"bar","x":10,"y":20}
```

Generated random data:

```
fake-json --num 3 id="uuid4()" x="randomInt(0, 10)"
mkjson --num 3 id="uuid4()" x="randomInt(0, 10)"
{"id":"2c6ce42f-5f7d-4e65-a1a1-8b39f6cfce19","x":6}
{"id":"d4c1af69-3cdd-417d-98e0-d3774f5fa1be","x":8}
{"id":"8fc064c9-57ba-4d78-b205-57899776e757","x":6}
Expand All @@ -27,7 +27,7 @@ argument. Each pair will result in a field within the JSON object.
To generate infinite records, use:

```
fake-json --num Inf
mkjson --num Inf
```


Expand Down Expand Up @@ -55,7 +55,7 @@ To generate infinite records, use:
## Installation

Get a pre-build binary from the
[releases](https://github.com/mfussenegger/fake-json/releases) page or build it
[releases](https://github.com/mfussenegger/mkjson/releases) page or build it
yourself:

Install stack:
Expand All @@ -64,10 +64,10 @@ Install stack:
curl -sSL https://get.haskellstack.org/ | sh
```

Install fake-json:
Install mkjson:

```bash
git clone https://github.com/mfussenegger/fake-json.git
cd fake-json
git clone https://github.com/mfussenegger/mkjson.git
cd mkjson
stack install
```
24 changes: 12 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ jobs:
- script: curl -sSL https://get.haskellstack.org/ | sh
displayName: Install stack

- script: stack build --pedantic --flag fake-json:-static
- script: stack build --pedantic --flag mkjson:-static
displayName: Build

- script: stack test
displayName: Run tests

- task: PublishPipelineArtifact@0
inputs:
artifactName: 'fake-json-linux-x86_64'
artifactName: 'mkjson-linux-x86_64'
targetPath: '.stack-work/install/x86_64-linux/lts-13.12/8.6.4/bin/'

- job: MacOSTest
Expand All @@ -25,15 +25,15 @@ jobs:
- script: curl -sSL https://get.haskellstack.org/ | sh
displayName: Install stack

- script: stack build --pedantic --flag fake-json:-static
- script: stack build --pedantic --flag mkjson:-static
displayName: Build

- script: stack test
displayName: Run tests

- task: PublishPipelineArtifact@0
inputs:
artifactName: 'fake-json-osx-x86_64'
artifactName: 'mkjson-osx-x86_64'
targetPath: '.stack-work/install/x86_64-osx/lts-13.12/8.6.4/bin/'

- job: WindowsTest
Expand All @@ -43,15 +43,15 @@ jobs:
- script: choco install haskell-stack
displayName: Install stack

- script: stack build --pedantic --flag fake-json:-static
- script: stack build --pedantic --flag mkjson:-static
displayName: Build

- script: stack test
displayName: Run tests

- task: PublishPipelineArtifact@0
inputs:
artifactName: 'fake-json-windows-x86_64'
artifactName: 'mkjson-windows-x86_64'
targetPath: '.stack-work\install\f33caf5a\bin'

- job: Release
Expand All @@ -64,25 +64,25 @@ jobs:
- script: mkdir -p $(System.DefaultWorkingDirectory)/artifacts/
- task: DownloadPipelineArtifact@0
inputs:
artifactName: 'fake-json-windows-x86_64'
artifactName: 'mkjson-windows-x86_64'
targetPath: $(System.DefaultWorkingDirectory)/artifacts/

- task: DownloadPipelineArtifact@0
inputs:
artifactName: 'fake-json-osx-x86_64'
artifactName: 'mkjson-osx-x86_64'
targetPath: $(System.DefaultWorkingDirectory)/artifacts/
- script: mv $(System.DefaultWorkingDirectory)/artifacts/fake-json{,-osx-x86_64}
- script: mv $(System.DefaultWorkingDirectory)/artifacts/mkjson{,-osx-x86_64}

- task: DownloadPipelineArtifact@0
inputs:
artifactName: 'fake-json-linux-x86_64'
artifactName: 'mkjson-linux-x86_64'
targetPath: $(System.DefaultWorkingDirectory)/artifacts/
- script: mv $(System.DefaultWorkingDirectory)/artifacts/fake-json{,-linux-x86_64}
- script: mv $(System.DefaultWorkingDirectory)/artifacts/mkjson{,-linux-x86_64}

- task: GithubRelease@0
inputs:
gitHubConnection: 'GitHub connection'
repositoryName: mfussenegger/fake-json
repositoryName: mfussenegger/mkjson
target: '$(build.sourceVersion)'
assets: $(System.DefaultWorkingDirectory)/artifacts/*
tagSource: 'auto'
Expand Down
24 changes: 12 additions & 12 deletions package.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
name: fake-json
name: mkjson
version: 0.1.0.0
github: "mfussenegger/fake-json"
github: "mfussenegger/mkjson"
license: MIT
author: "Mathias Fußenegger"
maintainer: "[email protected]"
copyright: "2018 Mathias Fußenegger"
copyright: "2019 Mathias Fußenegger"

extra-source-files:
- README.md
- ChangeLog.md

description: |
Please see the README on GitHub at <https://github.com/mfussenegger/fake-json#readme>
Please see the README on GitHub at <https://github.com/mfussenegger/mkjson#readme>
ghc-options:
- -Wall
Expand Down Expand Up @@ -50,13 +50,13 @@ library:
source-dirs: src

executables:
fake-json:
mkjson:
main: Main.hs
source-dirs: app
ghc-options:
- -rtsopts
dependencies:
- fake-json
- mkjson
when:
- condition: flag(static)
ld-options:
Expand All @@ -65,30 +65,30 @@ executables:
- fPIC

tests:
fake-json-test:
mkjson-test:
main: spec.hs
source-dirs: tests
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- fake-json
- mkjson

fake-json-doctest:
mkjson-doctest:
main: doctests.hs
source-dirs: tests
dependencies:
- fake-json
- mkjson
- Glob
- doctest

benchmarks:
fake-json-benchmarks:
mkjson-benchmarks:
main: bench.hs
source-dirs: benchmarks
dependencies:
- fake-json
- mkjson
- criterion

flags:
Expand Down

0 comments on commit ec3e3a6

Please sign in to comment.