-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
90 changed files
with
2,780 additions
and
802 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
env: | ||
BUNDLE_PATH: /tmp/.bundle | ||
GEM_HOME: /tmp/.bundle | ||
GEM_PATH: /tmp/.bundle | ||
TERM: xterm256 | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
target: native | ||
- os: macos-latest | ||
target: native | ||
- os: ubuntu-20.04 | ||
target: aarch64-unknown-linux-gnu | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
- if: runner.os == 'macOS' | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.63.0 | ||
target: aarch64-apple-darwin | ||
default: true | ||
override: true | ||
profile: minimal | ||
- if: runner.os != 'macOS' | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.63.0 | ||
override: true | ||
profile: minimal | ||
target: aarch64-unknown-linux-gnu | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
librubyfmt/ruby_checkout | ||
key: ${{ runner.os }}-${{matrix.target}}-ruby-v1-${{ hashFiles('.git/modules/librubyfmt/ruby_checkout/HEAD') }} | ||
- if: runner.os == 'macOS' | ||
run: | | ||
brew install automake bison | ||
echo "/usr/local/opt/bison/bin:$PATH" >> $GITHUB_PATH | ||
- run: ./script/make_release | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: rubyfmt-release-artifact-${{ matrix.os }}-${{ matrix.target }} | ||
path: rubyfmt-*.tar.gz | ||
source-release: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
- run: | | ||
TAG=$(git describe HEAD) | ||
RELEASE_DIR="out/release" | ||
mkdir -p ${RELEASE_DIR} | ||
./script/make_source_release ${TAG} | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: rubyfmt-source-release | ||
path: "out/release/source" | ||
release: | ||
runs-on: macos-latest | ||
needs: | ||
- build | ||
- source-release | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: rubyfmt-source-release | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: rubyfmt-release-artifact-ubuntu-latest | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: rubyfmt-release-artifact-macos-latest | ||
- name: Ship It 🚢 | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: rubyfmt-*.tar.gz | ||
fail_on_unmatched_files: true | ||
generate_release_notes: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,14 +6,16 @@ members = [ | |
|
||
[package] | ||
name = "rubyfmt-main" | ||
version = "0.8.0-pre" | ||
version = "0.10.0" | ||
authors = ["Penelope Phippen <[email protected]>"] | ||
edition = "2018" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
atty = "0.2" | ||
clap = { version = "3.2.16", features = ["derive"] } | ||
ctrlc = { version = "3.2", features = ["termination"] } | ||
dirs = "3.0.2" | ||
filetime = "0.2.14" | ||
glob = "0.3" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,23 @@ | ||
# As above | ||
a[0] = b | ||
# So below | ||
|
||
a[puts a] = "" | ||
a[puts(a)] = "" | ||
a[()] = "" | ||
a[class A; def foo; puts a; end; end] = "" | ||
a[begin; ""; rescue StandardException; ""; end] = "" | ||
# Users can override #[]= to not have args | ||
a[] = "" | ||
# Users can override #[]= to have multiple args | ||
a[1, 2] = "" | ||
|
||
a[puts a] | ||
a[puts(a)] | ||
a[()] | ||
a[class A; def foo; puts a; end; end] | ||
a[begin; ""; rescue StandardException; ""; end] | ||
# Users can override #[] to not have args | ||
a[] | ||
# Users can override #[] to have multiple args | ||
a[1, 2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,47 @@ | ||
# As above | ||
a[0] = b | ||
# So below | ||
|
||
a[puts(a)] = "" | ||
a[puts(a)] = "" | ||
a[()] = "" | ||
a[ | ||
class A | ||
def foo | ||
puts(a) | ||
end | ||
end | ||
] = "" | ||
a[ | ||
begin | ||
"" | ||
rescue StandardException | ||
"" | ||
end | ||
] = "" | ||
# Users can override #[]= to not have args | ||
a[] = "" | ||
# Users can override #[]= to have multiple args | ||
a[1, 2] = "" | ||
|
||
a[puts(a)] | ||
a[puts(a)] | ||
a[()] | ||
a[ | ||
class A | ||
def foo | ||
puts(a) | ||
end | ||
end | ||
] | ||
a[ | ||
begin | ||
"" | ||
rescue StandardException | ||
"" | ||
end | ||
] | ||
# Users can override #[] to not have args | ||
a[] | ||
# Users can override #[] to have multiple args | ||
a[1, 2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,7 @@ | |
a = begin | ||
end | ||
end | ||
|
||
begin | ||
end | ||
.freeze |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
a = begin | ||
end | ||
end | ||
|
||
begin | ||
end.freeze |
Oops, something went wrong.