Skip to content

Commit

Permalink
Merge branch 'master' into rfc101-style
Browse files Browse the repository at this point in the history
  • Loading branch information
piegamesde committed Mar 13, 2024
2 parents c6675d1 + 4e2a748 commit ede9808
Show file tree
Hide file tree
Showing 19 changed files with 1,248 additions and 82 deletions.
32 changes: 0 additions & 32 deletions .buildkite/pipeline.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# © 2019-2023 Serokell <[email protected]>
# © 2019-2023 Lars Jellema <[email protected]>
#
# SPDX-License-Identifier: MPL-2.0

name: CI
on:
pull_request:
push:
branches:
- master

env:
CDN_DISTRIBUTION_ID: E13UN1J1JFIWUZ
CDN_BUCKET: s3://nixfmt.serokell.io

jobs:
check:
runs-on: [self-hosted, nix]
steps:
- uses: actions/checkout@v4

- name: reuse lint
run: nix shell .#packages.x86_64-linux.reuse -c reuse lint

# - name: hlint
# run: nix build -L .#checks.x86_64-linux.hlint
# if: success() || failure()

# - name: stylish-haskell
# run: nix build -L .#checks.x86_64-linux.stylish-haskell
# if: success() || failure()

- name: build nixfmt
run: nix build -L .#nixfmt-static
if: success() || failure()

- name: build webdemo
run: nix build -L .#nixfmt-webdemo
if: success() || failure()

- name: build awscli
run: nix shell .#awscli
if: success() || failure()

deploy:
runs-on: [self-hosted, nix]
if: ${{ github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v4

- name: deploy webdemo
run: |
nix build .#nixfmt-webdemo
nix shell .#awscli -c aws s3 cp --recursive result/ "$CDN_BUCKET"
# delete files that don't exist anymore, use `--size-only` so behavior won't depend on local file timestamps
nix shell .#awscli -c aws s3 sync --delete --size-only result/ "$CDN_BUCKET"
nix shell .#awscli -c aws cloudfront create-invalidation --distribution-id "$CDN_DISTRIBUTION_ID" --paths '/*'
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@

## Unreleased

* Parsing fixes
* Quotes in inherit statements (like `inherit "or";`) are now supported.

## 0.6.0 -- 2023-10-31

* Fix escaping of interpolations after dollar signs.
* Fix nixfmt trying to allocate temp files that aren't used.
* Don't write if files didn't change, fixing treefmt compatibility
* Nixfmt now accepts the '-' argument to read from stdin.
* `nixfmt [dir]` now recursively formats nix files in that directory.
* Float and int literal parsing now matches nix.
Expand Down
14 changes: 14 additions & 0 deletions MAINTENANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- © 2023 piegames <[email protected]>
-
- SPDX-License-Identifier: MPL-2.0
-->

# Maintainer documentation

## Making a new release

- Check the commit log if anything is missing from the change log.
- Check dependency versions in `nixfmt.cabal`, bump upper bounds if possible.
- Bump the version.
- Give it a git tag.
- Upload to hackage using `cabal sdist`. See https://hackage.haskell.org/upload for details.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@

You are encouraged to test this out on your code and submit any undesirable formatting you find as an issue

[![Build Status](https://badge.buildkite.com/b37f73adea391439e63288e8fd3b47f4b98fb9640bb864ccfa.svg)](https://buildkite.com/serokell/nixfmt)
[![Cachix](https://img.shields.io/badge/cachix-nixfmt-blue.svg)](https://nixfmt.cachix.org)
![Build Status](https://github.com/serokell/nixfmt/actions/workflows/main.yml/badge.svg?branch=master)

## State

`nixfmt` will form the basis for the initial official standard Nix formatter, as established by [RFC 166](https://github.com/NixOS/rfcs/pull/166).

The established standard Nix formatting differs considerably from the original one. Be aware of this if you track the main branch. Until the first new release the main branch should be considered **very unstable**.

For more details, see the [RFC implementation tracking issue](https://github.com/serokell/nixfmt/issues/153).

## Installation

Expand All @@ -21,8 +28,6 @@ You are encouraged to test this out on your code and submit any undesirable form

- To get the most recent version, install from master:

# Optional: use cachix to get cached builds even for master
cachix use nixfmt
nix-env -f https://github.com/serokell/nixfmt/archive/master.tar.gz -i

- Nix with flakes
Expand Down Expand Up @@ -51,11 +56,6 @@ Haskell dependencies will be built by Cabal.
* `nixfmt file.nix` – format the file in place


## For Contributors

We welcome issues and pull requests on GitHub.


## About Serokell

`nixfmt` is maintained and funded with :heart: by
Expand Down
Loading

0 comments on commit ede9808

Please sign in to comment.