40 Commits

Author SHA1 Message Date
comp500
0d8c1762a3 Handle uppercase hashes properly (case-fold compare or normalise to lowercase) 2022-06-20 16:59:06 +01:00
comp500
bf2f060efc Fix lookup of old .toml files 2022-05-21 14:29:59 +01:00
comp500
dae133b73c Completed download implementation for Modrinth export 2022-05-21 05:00:21 +01:00
comp500
55f0e4a297 WIP: misc fixes, start updating CF/MR export to use download system 2022-05-20 18:13:43 +01:00
comp500
3a6109c1f9 Merge branch 'master' into wip/new-curseforge-api 2022-05-17 01:07:04 +01:00
comp500
0f3096e251 Use the correct directories for non-mod files; use .pw.toml extension
The mods-folder option is now replaced with two new options: meta-folder and meta-folder-base
This allows non-mod files to use the correct directory based on their category; with correct
import of resource packs/etc from CurseForge packs, and the ability to override this behaviour.
To improve the reliability of packwiz metadata file marking (in the index), new files now use .pw.toml
as the extension - any extension can be used, but .pw.toml will now be automatically be
marked as a metafile regardless of folder, so you can easily move metadata files around.
Existing metadata files will still work (as metafile = true is set in the index); though in
the future .pw.toml may be required.
2022-05-16 21:06:10 +01:00
comp500
2073e4475e Support Modrinth modpack fileSize field and sha512 hash 2022-05-16 01:15:12 +01:00
comp500
07c0af7bcb Add packwiz binaries to default ignores (fixes #37) 2022-02-14 20:09:55 +00:00
comp500
fa5de4b4bc Add default .packwizignore contents (fixes #3) 2022-02-10 16:47:38 +00:00
Sasha Sorokin
f41235b04c
Fix ignore file inconsistencies (#88)
* Fix ignore file inconsistencies

.packwizignore is supposed to work like .gitignore, yet it fails
miserably at doing so, being able to ignore only global patterns like
*.zip, and failing at patterns like /*.zip.

This commit introduces two changes to fix the issue:

- First, it uses a more up-to-date library. denormal/go-gitignore has
  not been updated since 2018 and has long open issues and pull
  requests, one of which tries to address leading slash ignoring, a-la
  /*.zip. denormal account seems to be abandoned since around the same
  year, so it makes sense to find a new library that does roughly the
  same thing.

  Gladly so, there's actually a library by sabhiram that shares the same
  name (but not the package name itself - which is just ignore - so it
  probably requires aliasing when importing).

- Secondly, it checks relative paths against ignore file instead of the
  absolute ones, which makes it possible to use leading slash (and
  probably some other features) with the new library.

From personal tests, it seems to address most - if not all - of the
inconsistencies. However, since it's a different library more throughout
testing probably wouldn't hurt to make sure it didn't break anything.

* Move dependency to main block
2022-01-23 21:05:34 +00:00
comp500
60c08b93f3 Implement Modrinth pack exporting (fixes #34) 2021-12-28 22:03:22 +00:00
comp500
c89aeed576 Remove unnecessary filepath.Rel (Ignore calls Abs anyway) 2021-09-19 14:31:19 +01:00
comp500
76460c5414 Remove pack-root, fix serve command (fixes #39)
index.toml is now the pack root - if you want to replicate
what the pack-root option would have provided, just move
your index.toml (and update the path in pack.toml)
2021-06-13 19:15:33 +01:00
comp500
8cbe7d4c61 Add pack-root option (fixes #27) 2021-06-04 02:10:29 +01:00
comp500
49d7b26b2e Add no-internal-hashes mode 2021-05-04 19:56:56 +01:00
comp500
a6d28faf61 Fix hang when refreshing an index with no files 2019-12-22 23:42:04 +00:00
comp500
a553c3ce08 Fix unhandled error warnings, error messages (except import.go) 2019-11-15 22:28:14 +00:00
comp500
5dfe23e51d Implement pack importing/exporting for downloaded Curseforge packs
Abstract out hash implementations
Implement file saving/downloading
2019-11-12 22:11:40 +00:00
comp500
d6076dba5e Allow jars/txt files in mods folder 2019-09-19 20:55:14 +01:00
comp500
b48f89d67c Add serve command 2019-09-18 17:32:37 +01:00
comp500
4fea7ceebf Switch to cobra/viper 2019-09-16 21:44:40 +01:00
comp500
dc9fd4689f
Improve optional stuff, add preserve flag 2019-06-16 23:09:40 +01:00
comp500
e3bf7afe33
.packwizignore files 2019-06-16 21:42:12 +01:00
comp500
f0516b8600
Fix indexing progress bar, improve question 2019-06-16 20:59:45 +01:00
comp500
7880488bf1
Fix paths in index querying 2019-06-16 19:33:21 +01:00
comp500
b77e2080c7
Redo update system to work with batched updates 2019-06-16 14:25:54 +01:00
comp500
adcde05693
Move locating mods to index 2019-06-15 00:40:56 +01:00
comp500
e7ed7d8d11
Update the pack hash when adding/importing mods 2019-06-14 18:12:14 +01:00
comp500
8eeb509565
Update index in import/add, improve index funcs 2019-06-14 18:07:58 +01:00
comp500
e410101985
Progress bar for refreshing the index 2019-04-30 17:42:19 +01:00
comp500
db7c837bfa
Switch to DecodeFile because it's cleaner 2019-04-27 14:22:59 +01:00
comp500
2e4ddb667f
Important to keep the index sorted because git diffs 2019-04-26 18:45:59 +01:00
comp500
0d7ff15db7
Make updateFile public 2019-04-26 18:43:26 +01:00
comp500
1a42abc0d6
Add some text, remove mod from index when done 2019-04-26 18:39:55 +01:00
comp500
e2c772ee30
Switch to forward slashes, add metafile bool 2019-04-26 18:23:52 +01:00
comp500
2f3b80f251
Why was I doing that, it looks bad. 2019-04-26 17:19:55 +01:00
comp500
d7e916e558
Index handling, hash calculation 2019-04-26 17:16:29 +01:00
comp500
64a73afdf7
File writing, index sorting 2019-04-25 19:22:02 +01:00
comp500
d6b55b8032
Commit some stuff 2019-04-25 18:10:23 +01:00
comp500
a531e36713
Initial command system 2019-03-17 15:04:00 +00:00