Skip to content

Commit

Permalink
added latin word list
Browse files Browse the repository at this point in the history
  • Loading branch information
cqb13 committed Oct 15, 2024
1 parent ff76852 commit d961985
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,28 @@ jobs:
run: |
choco install zip
cd target/${{ matrix.target }}/release
zip word-finder-0.1.1-${{ matrix.target }}.zip word-finder.exe
zip word-finder-0.1.2-${{ matrix.target }}.zip word-finder.exe
cd ../../..
- name: Create tar.gz file on macOS
if: ${{ matrix.os == 'macos-latest' }}
run: |
chmod +x target/${{ matrix.target }}/release/word-finder
tar -zcf target/${{ matrix.target }}/release/word-finder-0.1.1-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release word-finder
tar -zcf target/${{ matrix.target }}/release/word-finder-0.1.2-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release word-finder
chmod +x target/${{ matrix.target2 }}/release/word-finder
tar -zcf target/${{ matrix.target2 }}/release/word-finder-0.1.1-${{ matrix.target2 }}.tar.gz -C target/${{ matrix.target2 }}/release word-finder
tar -zcf target/${{ matrix.target2 }}/release/word-finder-0.1.2-${{ matrix.target2 }}.tar.gz -C target/${{ matrix.target2 }}/release word-finder
- name: Create tar.gz file on Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
chmod +x target/${{ matrix.target }}/release/word-finder
tar -zcf target/${{ matrix.target }}/release/word-finder-0.1.1-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release word-finder
tar -zcf target/${{ matrix.target }}/release/word-finder-0.1.2-${{ matrix.target }}.tar.gz -C target/${{ matrix.target }}/release word-finder
- name: Upload release and assets to GitHub
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: "release-0.1.1-${{ github.run_number }}"
release_name: word-finder 0.1.1
tag: "release-0.1.2-${{ github.run_number }}"
release_name: word-finder 0.1.2
file_glob: true
file: target/*/release/word-finder-0.1.1-*.{zip,tar.gz}
file: target/*/release/word-finder-0.1.2-*.{zip,tar.gz}
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "word-finder"
version = "0.1.1"
version = "0.1.2"
edition = "2021"
authors = ["cqb13 <[email protected]>"]
license = "MIT"
Expand Down
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ fn find_words_from_list(
letter_requirements: Vec<String>,
search_english_list: bool,
) -> Vec<String> {
let words_file: Vec<&str> = include_str!("./words.txt")
let file = if search_english_list == true {
include_str!("./words.txt")
} else {
include_str!("./latin_words.txt")
};

let words_file: Vec<&str> = file
.lines()
.map(|line| line.trim())
.filter(|line| {
Expand Down

0 comments on commit d961985

Please sign in to comment.