You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Added support for reading versioning info from config files located in custom locations(not in /[PATH TO SERVER JAR]/version_history.json)
2. Fixed some output issues
3. Added quiet mode, where only error information and interactive questions are outputted to the terminal.
4. Made the README file more readable, and added a changelog section.
5. Ignored some more files in .gitignore, PyInstaller stuff.
Copy file name to clipboardExpand all lines: README.md
+50-8Lines changed: 50 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,12 +43,22 @@ it will be installed to this path under the same name.
43
43
44
44
This command will do the following:
45
45
46
-
1. Attempt to load current paper version/build(`/PATH_TO_SERVER_JAR/version_history.json`. This script only supports official builds of the paper server, meaning that we may fail to read config information for un-official builds). If no configuration data is found, and version info is not supplied via the command line, then the version and build for the currently installed server will default to 0.
47
-
2. Check for a new version/build using the [PaperMC download API](https://paper.readthedocs.io/en/latest/site/api.html#downloads-api).
48
-
3. If a new version/build is available, the default version and build(usually the latest) will be installed. Alternatively, the user can be prompted to manually select which version/build they want to be installed. You can use the `--interactive` flag for this.
49
-
4. The selected version is downloaded to a temporary directory located somewhere on your computer(This directory is generated using the python tempfile module, meaning that it will be generated in a safe, unobtrusive manner, and will be automatically removed at termination of the script).
46
+
1. Attempt to load current paper version/build(`/PATH_TO_SERVER_JAR/version_history.json`, or elsewhere if specified.
47
+
This script only supports official builds of the paper server, meaning that we may fail to read config
48
+
information for un-official builds). If no configuration data is found, and version info is not supplied via the
49
+
command line, then the version and build for the currently installed server will default to 0.
3. If a new version/build is available, the default version and build(usually the latest) will be installed.
53
+
Alternatively, the user can be prompted to manually select which version/build they want to be installed. You can use
54
+
the `--interactive` flag for this.
55
+
4. The selected version is downloaded to a temporary directory located somewhere on your computer
56
+
(This directory is generated using the python tempfile module, meaning that it will be generated in a safe,
57
+
unobtrusive manner, and will be automatically removed at termination of the script).
50
58
5. The currently installed version of the server is backed up to the temporary directory, and deleted.
51
-
6. The newly downloaded server is moved from the temporary directory to the path of the old server, and will retain the name of the old server(If an error occurs for any reason during the instillation procedure, then the script will attempt to recover your backed up version of the old server from the temporary directory).
59
+
6. The newly downloaded server is moved from the temporary directory to the path of the old server,
60
+
and will retain the name of the old server(If an error occurs for any reason during the instillation procedure,
61
+
then the script will attempt to recover your backed up version of the old server from the temporary directory).
52
62
53
63
This is the default operation of this script. However, you can fine tune the update process using the command line options
54
64
listed below.
@@ -80,6 +90,13 @@ Prompts the user for the version they would like to install:
80
90
Will not load configuration data:
81
91
>-nlc, --no-load-config
82
92
93
+
Sets config file path(`/PATH_TO_SERVER_JAR/version_history.json` by default):
94
+
95
+
>-cf, --config-file [PATH TO CONFIG FILE]
96
+
97
+
Will only output errors and interactive questions to the terminal:
98
+
>-q, --quiet
99
+
83
100
## Deprecated Command Line Options
84
101
85
102
The following command line options are deprecated. They are still included for backwards compatibility,
@@ -118,6 +135,7 @@ Check to see if a newer version is available, does not install:
118
135
119
136
In earlier versions of PaperMC-Update, the script would keep a config file in the users home directory
120
137
(Or elsewhere if specified) containing version information on the server so it can be persistent across runs.
138
+
121
139
There were many problems with this: it created unnecessary files, it was inaccurate,
122
140
and it made using PaperMC-Update a lot more complicated. Now, we read version info from a file named
123
141
'version_history.json', which is kept in the root directory of the server, and is managed by the server itself. This
@@ -167,14 +185,38 @@ so be warned.
167
185
168
186
# Conclusion
169
187
170
-
This script provides a simple method to check/download/install PaperMC server updates. You can add your command to the beginning of your start file, to ensure that you are always running the latest server version.
171
-
If you are hosting a server for a friend/customer, you can use this script to manage the updating process for them, so they don't have to.
188
+
This script provides a simple method to check/download/install PaperMC server updates. You can add your command to the
189
+
beginning of your start file, to ensure that you are always running the latest server version.
190
+
If you are hosting a server for a friend/customer, you can use this script to manage the updating process for them,
191
+
so they don't have to.
192
+
193
+
# Changelog
194
+
195
+
## 1.1.0
196
+
197
+
- Added command line option '-q' for quiet output
198
+
- Fixed typos/output issues
199
+
- Can read config files in custom locations
200
+
201
+
## 1.0.0
202
+
203
+
- Initial version
204
+
- Added support for reading configuration info directly from the paper versioning file
205
+
- Removed old command line options
206
+
- Fixed some issues with selecting version
172
207
173
208
# Special Thanks
174
209
175
210
[devStorm](https://github.com/developStorm) - Helped with configuration file management, and offered valuable insight
176
211
into the paper versioning file.
177
212
213
+
# Pull Requests
214
+
215
+
Pull requests are welcome and encouraged!
216
+
217
+
If you have any bug fixes or changes, feel free to open a pull request.
218
+
Any changes/fixes are greatly appreciated!
219
+
178
220
# Issues/Bugs
179
221
180
222
If you have any questions on usage, or you have found a bug, please open a github issue. I would be happy to help!
@@ -184,6 +226,6 @@ If you are reporting a bug/error, be sure to include the following:
184
226
1. Description of what you were doing
185
227
2. All arguments used
186
228
3. Version/build you are trying to install
187
-
4. Version/build of the currently installed server(If you know it).
229
+
4. Version/build of the currently installed server(If you know it)
188
230
5. Fail point(If provided, should be for most cases)
189
231
6. Stack trace/error name(If provided, should be for most cases)
0 commit comments