2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-25 06:07:44 +00:00

Merge pull request #1504 from restic/changelog-generator

Replace manual CHANGELOG with generated one
This commit is contained in:
Alexander Neumann 2017-12-27 22:00:15 +01:00
commit e290f2591e
73 changed files with 801 additions and 410 deletions

View File

@ -1,464 +1,256 @@
This file describes changes relevant to all users that are made in each
released version of restic from the perspective of the user.
Changelog for restic 0.7.1 (2017-07-22)
=======================================
Important Changes in 0.X.Y
==========================
The following sections list the changes in restic 0.7.1 relevant to
restic users. The changes are ordered by importance.
* We've disabled handling SIGPIPE again. Turns out, writing to broken TCP
connections also raised SIGPIPE, so restic exits on the first write to a
broken connection. Instead, restic should retry the request.
https://github.com/restic/restic/pull/1459
https://github.com/restic/restic/issues/1457
https://github.com/restic/restic/issues/1466
Summary
-------
* The command `diff` was added, it allows comparing two snapshots and listing
all differences.
https://github.com/restic/restic/issues/11
https://github.com/restic/restic/issues/1460
https://github.com/restic/restic/pull/1462
* Fix #1115: Fix `prune`, only include existing files in indexes
* Enh #1055: Create subdirs below `data/` for local/sftp backends
* Enh #1067: Allow loading credentials for s3 from IAM
* Enh #1073: Add `migrate` cmd to migrate from `s3legacy` to `default` layout
* Enh #1081: Clarify semantic for `--tasg` for the `forget` command
* Enh #1080: Ignore chmod() errors on filesystems which do not support it
* Enh #1082: Print stats on SIGINFO on Darwin and FreeBSD (ctrl+t)
Details
-------
Small changes
-------------
* Bugfix #1115: Fix `prune`, only include existing files in indexes
* We've added code to detect old cache directories of repositories that
haven't been used in a long time, restic now prints a note when it detects
that such dirs exist. Also, the option `--cleanup-cache` was added to
automatically remove such directories. That's not a problem because the
cache will be rebuild once a repo is accessed again.
https://github.com/restic/restic/pull/1436
A bug was found (and corrected) in the index rebuilding after prune, which led to indexes which
include blobs that were not present in the repo any more. There were already checks in place
which detected this situation and aborted with an error message. A new run of either `prune` or
`rebuild-index` corrected the index files. This is now fixed and a test has been added to detect
this.
* The cache directory on Windows and Darwin was not correct, instead the
directory `.cache` was used.
https://github.com/restic/restic/pull/1454
https://github.com/restic/restic/pull/1115
* By default, the access time for files and dirs is not saved any more. It is
not possible to reliably disable updating the access time during a backup,
so for the next backup the access time is different again. This means a lot
of metadata is saved. If you want to save the access time anyway, pass
`--with-atime` to the `backup` command.
https://github.com/restic/restic/pull/1452
* Enhancement #1055: Create subdirs below `data/` for local/sftp backends
* We've improved the s3 backend to work with DigitalOcean Spaces.
https://github.com/restic/restic/pull/1459
https://github.com/restic/restic/issues/1457
The local and sftp backends now create the subdirs below `data/` on open/init. This way, restic
makes sure that they always exist. This is connected to an issue for the sftp server:
* The cancellation logic was improved, restic can now shut down cleanly when
requested to do so (e.g. via ctrl+c).
https://github.com/restic/restic/pull/1439
Important Changes in 0.8.0
==========================
* A vulnerability was found in the restic restorer, which allowed attackers in
special circumstances to restore files to a location outside of the target
directory. Due to the circumstances we estimate this to be a low-risk
vulnerability, but urge all users to upgrade to the latest version of restic.
Exploiting the vulnerability requires a Linux/Unix system which saves
backups via restic and a Windows systems which restores files from the repo.
In addition, the attackers need to be able to create create files with
arbitrary names which are then saved to the restic repo. For example, by
creating a file named "..\test.txt" (which is a perfectly legal filename on
Linux) and restoring a snapshot containing this file on Windows, it would be
written to the parent of the target directory.
We'd like to thank Tyler Spivey for reporting this responsibly!
https://github.com/restic/restic/pull/1445
* The s3 backend used the subdir `restic` within a bucket if no explicit path
after the bucket name was specified. Since this version, restic does not use
this default path any more. If you created a repo on s3 in a bucket without
specifying a path within the bucket, you need to add `/restic` at the end of
the repository specification to access your repo: `s3:s3.amazonaws.com/bucket/restic`
https://github.com/restic/restic/issues/1292
https://github.com/restic/restic/pull/1437
* We've added a local cache for metadata so that restic doesn't need to load
all metadata (snapshots, indexes, ...) from the repo each time it starts. By
default the cache is active, but there's a new global option `--no-cache`
that can be used to disable the cache. By deafult, the cache a standard
cache folder for the OS, which can be overridden with `--cache-dir`. The
cache will automatically populate, indexes and snapshots are saved as they
are loaded. Cache directories for repos that haven't been used recently can
automatically be removed by restic with the `--cleanup-cache` option.
https://github.com/restic/restic/pull/1040
https://github.com/restic/restic/issues/29
https://github.com/restic/restic/issues/738
https://github.com/restic/restic/issues/282
https://github.com/restic/restic/pull/1287
https://github.com/restic/restic/pull/1436
* A related change was to by default create pack files in the repo that
contain either data or metadata, not both mixed together. This allows easy
caching of only the metadata files. The next run of `restic prune` will
untangle mixed files automatically.
https://github.com/restic/restic/pull/1265
* The Google Cloud Storage backend no longer requires the service account to
have the `storage.buckets.get` permission ("Storage Admin" role) in `restic
init` if the bucket already exists.
https://github.com/restic/restic/pull/1281
* Added support for rate limiting through `--limit-upload` and
`--limit-download` flags.
https://github.com/restic/restic/issues/1216
https://github.com/restic/restic/pull/1336
https://github.com/restic/restic/pull/1358
* Failed backend requests are now automatically retried.
https://github.com/restic/restic/pull/1353
* We've added the `dump` command which prints a file from a snapshot to
stdout. This can e.g. be used to restore files read with `backup --stdin`.
https://github.com/restic/restic/issues/510
https://github.com/restic/restic/pull/1346
Small changes
-------------
* The directory structure in the fuse mount now exposes a symlink `latest`
which points to the latest snapshot in that particular directory.
https://github.com/restic/restic/pull/1249
* The option `--compact` was added to the `forget` command to provide the same
compact view as the `snapshots` command.
https://github.com/restic/restic/pull/1269
* We've re-enabled a workaround for `minio-go` (the library we're using to
access s3 backends), this reduces memory usage.
https://github.com/restic/restic/issues/1256
https://github.com/restic/restic/pull/1267
* The sftp backend now prompts for the password if a password is necessary for
login.
https://github.com/restic/restic/issues/448
https://github.com/restic/restic/pull/1270
* The `generate` command has been added, which replaces the now removed
commands `manpage` and `autocomplete`. This release of restic contains the
most recent manpages in `doc/man` and the auto-completion files for bash and
zsh in `doc/bash-completion.sh` and `doc/zsh-completion.zsh`
https://github.com/restic/restic/issues/1274
https://github.com/restic/restic/pull/1282
* A bug was discovered in the library we're using to access Backblaze, it now
reuses already established TCP connections which should be a lot faster and
not cause network failures any more.
https://github.com/restic/restic/issues/1291
https://github.com/restic/restic/pull/1301
* Another bug in the `forget` command caused `prune` not to be run when
`--prune` was specified without a policy, e.g. when only snapshot IDs that
should be forgotten are listed manually. This is corrected now.
https://github.com/restic/restic/pull/1317
* The `check` command now explicetly prints `No errors were found` when no
errors could be found.
https://github.com/restic/restic/pull/1319
https://github.com/restic/restic/issues/1303
* The fuse mount now has an `ids` subdirectory which contains the snapshots
below their (short) IDs.
https://github.com/restic/restic/issues/1102
https://github.com/restic/restic/pull/1299
https://github.com/restic/restic/pull/1320
* The `backup` command was improved, it now caches the result of excludes for
a directory.
https://github.com/restic/restic/issues/1271
https://github.com/restic/restic/pull/1326
* We've added the `--cacert` option which can be used to pass one (or more) CA
certificates to restic. These are used in addition to the system CA
certificates to verify HTTPS certificates (e.g. for the REST backend).
https://github.com/restic/restic/issues/1114
https://github.com/restic/restic/pull/1276
* When the list of files/dirs to be saved is read from a file with
`--files-from`, comment lines (starting with `#`) are now ignored.
https://github.com/restic/restic/issues/1367
https://github.com/restic/restic/pull/1368
Important Changes in 0.7.3
==========================
* For large backups stored in Google Cloud Storage, the `prune` command fails
because listing only returns the first 1000 files. This has been corrected,
no data is lost in the process. In addition, a plausibility check was added
to `prune`.
https://github.com/restic/restic/issues/1246
https://github.com/restic/restic/pull/1247
Important Changes in 0.7.2
==========================
* We've added an official docker image and a Dockerfile to build this image in
`docker/`.
https://github.com/restic/restic/pull/1061
* The git repository layout was changed to resemble the layout typically used
in Go projects, we're not using `gb` for building restic any more and
vendoring the dependencies is now taken care of by `dep`.
https://github.com/restic/restic/pull/1126
* We now support saving backups on Google Cloud Storage.
https://github.com/restic/restic/pull/1134
https://github.com/restic/restic/pull/1052
https://github.com/restic/restic/issues/211
* We've added support for Microsoft Azure Blob Storage as a restic backend.
https://github.com/restic/restic/pull/1149
https://github.com/restic/restic/pull/1059
https://github.com/restic/restic/issues/609
* In the course of supporting Microsoft Azure Blobe Storage Go 1.8 is now a
requirement to build restic.
* The `restore` command has been improved: When dirs are excluded (or not
included) in a restore, they are not loaded from the repo any more.
https://github.com/restic/restic/pull/1044
* Name collisions are now resolved by appending a counter.
https://github.com/restic/restic/issues/1179
https://github.com/restic/restic/pull/1209
Small changes
-------------
* The `key` command now prompts for a password even if the original password
to access a repo has been specified via the `RESTIC_PASSWORD` environment
variable or a password file.
https://github.com/restic/restic/issues/1132
https://github.com/restic/restic/pull/1133
* Properly report errors when reading files with exclude patterns.
https://github.com/restic/restic/pull/1144
* We now automatically generate man pages for all restic commands, see the
subdir `doc/man`.
https://github.com/restic/restic/issues/697
https://github.com/restic/restic/pull/1147
* The `key remove` command was corrected and now works as documented.
https://github.com/restic/restic/pull/1164
* When a restic command other than `init` is used with a local repository and
the repository directory does not exist, restic creates the directory
structure. That's an error, only the `init` command should create the dir.
https://github.com/restic/restic/issues/1167
https://github.com/restic/restic/pull/1182
* Restic now prints stats on all BSD systems (not only on darwin) when SIGINFO
is received (usually when ctrl+t is pressed).
https://github.com/restic/restic/pull/1203
https://github.com/restic/restic/pull/1082#issuecomment-326279920
* Since a few releases restic had the ability to write profiling files for
memory and CPU usage when `debug` is enabled. It was discovered that when
restic is interrupted (ctrl+c is pressed), the proper shutdown hook is not
run. This is now corrected.
https://github.com/restic/restic/pull/1191
* A new option `--exclude-caches` was added that allows excluding cache
directories (that are tagged as such). This is a special case of a more
generic option `--exclude-if-present` which excludes a directory if a file
with a specific name (and contents) is present.
https://github.com/restic/restic/issues/317
https://github.com/restic/restic/pull/1170
https://github.com/restic/restic/pull/1224
* The `forget` command now has an option `--group-by` that allows flexible
grouping policies.
https://github.com/restic/restic/pull/1196
* The date and time restic records for a new backup can now be specified
externally by passing `--time` to the `backup` command.
https://github.com/restic/restic/pull/1205
* The option `--compact` was added to the `snapshots` command to get a better
overview of the snapshots in a repo. It limits each snapshot to a single
line.
https://github.com/restic/restic/issues/1218
https://github.com/restic/restic/pull/1223
Important Changes in 0.7.1
==========================
* The `migrate` command for chaning the `s3legacy` layout to the `default`
layout for s3 backends has been improved: It can now be restarted with
`restic migrate --force s3_layout` and automatically retries operations on
error.
https://github.com/restic/restic/issues/1073
https://github.com/restic/restic/pull/1075
Small changes
-------------
* The local and sftp backends now create the subdirs below `data/` on
open/init. This way, restic makes sure that they always exist. This is
connected to an issue for the sftp server:
https://github.com/restic/rest-server/pull/11#issuecomment-309879710
https://github.com/restic/restic/issues/1055
https://github.com/restic/restic/pull/1077
https://github.com/restic/restic/pull/1105
https://github.com/restic/rest-server/pull/11#issuecomment-309879710
* Enhancement #1067: Allow loading credentials for s3 from IAM
When no S3 credentials are specified in the environment variables, restic now tries to load
credentials from an IAM instance profile when the s3 backend is used.
* When no S3 credentials are specified in the environment variables, restic
now tries to load credentials from an IAM instance profile when the s3
backend is used.
https://github.com/restic/restic/issues/1067
https://github.com/restic/restic/pull/1086
* On Darwin and FreeBSD, restic now prints stats when SIGINFO is received
(usually when ctrl+t is pressed).
https://github.com/restic/restic/pull/1082
* Enhancement #1073: Add `migrate` cmd to migrate from `s3legacy` to `default` layout
* The dependencies have been updated.
https://github.com/restic/restic/pull/1108
https://github.com/restic/restic/pull/1124
The `migrate` command for chaning the `s3legacy` layout to the `default` layout for s3
backends has been improved: It can now be restarted with `restic migrate --force s3_layout`
and automatically retries operations on error.
* A bug was found (and corrected) in the index rebuilding after prune, which
led to indexes which include blobs that were not present in the repo any
more. There were already checks in place which detected this situation and
aborted with an error message. A new run of either `prune` or
`rebuild-index` corrected the index files. This is now fixed and a test has
been added to detect this.
https://github.com/restic/restic/pull/1115
https://github.com/restic/restic/issues/1073
https://github.com/restic/restic/pull/1075
* Errors for chmod() on Unix for filesystems which do not support it (e.g. smb
mounted via gvfs) are now ignored.
https://github.com/restic/restic/pull/1080
https://github.com/restic/restic/pull/1112
* Enhancement #1081: Clarify semantic for `--tasg` for the `forget` command
* The semantic for the `--tags` option to `forget` and `snapshots` was
clarified:
https://github.com/restic/restic/issues/1081
https://github.com/restic/restic/pull/1090
Important Changes in 0.7.0
==========================
* Enhancement #1080: Ignore chmod() errors on filesystems which do not support it
* New "swift" backend: A new backend for the OpenStack Swift cloud storage
protocol has been added, https://wiki.openstack.org/wiki/Swift
https://github.com/restic/restic/pull/975
https://github.com/restic/restic/pull/648
https://github.com/restic/restic/pull/1080
https://github.com/restic/restic/pull/1112
* New "b2" backend: A new backend for Backblaze B2 cloud storage
service has been added, https://www.backblaze.com
https://github.com/restic/restic/issues/512
https://github.com/restic/restic/pull/978
* Enhancement #1082: Print stats on SIGINFO on Darwin and FreeBSD (ctrl+t)
* Improved performance for the `find` command: Restic recognizes paths it has
already checked for the files in question, so the number of backend requests
is reduced a lot.
https://github.com/restic/restic/issues/989
https://github.com/restic/restic/pull/993
https://github.com/restic/restic/pull/1082
* Improved performance for the fuse mount: Listing directories which contain
large files now is significantly faster.
https://github.com/restic/restic/pull/998
* The default layout for the s3 backend is now `default` (instead of
`s3legacy`). Also, there's a new `migrate` command to convert an existing
repo, it can be run like this: `restic migrate s3_layout`
https://github.com/restic/restic/issues/965
https://github.com/restic/restic/pull/1004
Changelog for restic 0.7.0 (2017-07-01)
=======================================
* The fuse mount now has two more directories: `tags` contains a subdir for
each tag, which in turn contains only the snapshots that have this tag. The
subdir `hosts` contains a subdir for each host that has a snapshot, and the
subdir contains the snapshots for that host.
https://github.com/restic/restic/issues/636
https://github.com/restic/restic/pull/1050
The following sections list the changes in restic 0.7.0 relevant to
restic users. The changes are ordered by importance.
Small changes
-------------
Summary
-------
* Fix #1013: Switch back to using the high-level minio-go API for s3
* Fix #965: Switch to `default` repo layout for the s3 backend
* Enh #1021: Detect invalid backend name and print error
* Enh #1029: Remove invalid pack files when `prune` is run
* Enh #512: Add Backblaze B2 backend
* Enh #636: Add dirs `tags` and `hosts` to fuse mount
* Enh #989: Improve performance of the `find` command
* Enh #975: Add new backend for OpenStack Swift
* Enh #998: Improve performance of the fuse mount
Details
-------
* Bugfix #1013: Switch back to using the high-level minio-go API for s3
For the s3 backend we're back to using the high-level API the s3 client library for uploading
data, a few users reported dropped connections (which the library will automatically retry
now).
* For the s3 backend we're back to using the high-level API the s3 client
library for uploading data, a few users reported dropped connections (which
the library will automatically retry now).
https://github.com/restic/restic/issues/1013
https://github.com/restic/restic/issues/1023
https://github.com/restic/restic/pull/1025
* The `prune` command has been improved and will now remove invalid pack
files, for example files that have not been uploaded completely because a
backup was interrupted.
https://github.com/restic/restic/issues/1029
https://github.com/restic/restic/pull/1036
* Bugfix #965: Switch to `default` repo layout for the s3 backend
The default layout for the s3 backend is now `default` (instead of `s3legacy`). Also, there's a
new `migrate` command to convert an existing repo, it can be run like this: `restic migrate
s3_layout`
https://github.com/restic/restic/issues/965
https://github.com/restic/restic/pull/1004
* Enhancement #1021: Detect invalid backend name and print error
Restic now tries to detect when an invalid/unknown backend is used and returns an error
message.
* restic now tries to detect when an invalid/unknown backend is used and
returns an error message.
https://github.com/restic/restic/issues/1021
https://github.com/restic/restic/pull/1070
Important Changes in 0.6.1
==========================
* Enhancement #1029: Remove invalid pack files when `prune` is run
This is mostly a bugfix release and only contains small changes:
The `prune` command has been improved and will now remove invalid pack files, for example files
that have not been uploaded completely because a backup was interrupted.
* We've fixed a bug where `rebuild-index` would corrupt the index when used
with the s3 backend together with the `default` layout. This is not the
default setting.
https://github.com/restic/restic/issues/1029
https://github.com/restic/restic/pull/1036
* Enhancement #512: Add Backblaze B2 backend
https://github.com/restic/restic/issues/512
https://github.com/restic/restic/pull/978
* Enhancement #636: Add dirs `tags` and `hosts` to fuse mount
The fuse mount now has two more directories: `tags` contains a subdir for each tag, which in turn
contains only the snapshots that have this tag. The subdir `hosts` contains a subdir for each
host that has a snapshot, and the subdir contains the snapshots for that host.
https://github.com/restic/restic/issues/636
https://github.com/restic/restic/pull/1050
* Enhancement #989: Improve performance of the `find` command
Improved performance for the `find` command: Restic recognizes paths it has already checked
for the files in question, so the number of backend requests is reduced a lot.
https://github.com/restic/restic/issues/989
https://github.com/restic/restic/pull/993
* Enhancement #975: Add new backend for OpenStack Swift
https://github.com/restic/restic/pull/975
https://github.com/restic/restic/pull/648
* Enhancement #998: Improve performance of the fuse mount
Listing directories which contain large files now is significantly faster.
https://github.com/restic/restic/pull/998
Changelog for restic 0.6.1 (2017-06-01)
=======================================
The following sections list the changes in restic 0.6.1 relevant to
restic users. The changes are ordered by importance.
Summary
-------
* Enh #985: Allow multiple parallel idle HTTP connections
* Enh #981: Remove temporary path from binary in `build.go`
* Enh #974: Remove regular status reports
Details
-------
* Enhancement #985: Allow multiple parallel idle HTTP connections
Backends based on HTTP now allow several idle connections in parallel. This is especially
important for the REST backend, which (when used with a local server) may create a lot
connections and exhaust available ports quickly.
* Backends based on HTTP now allow several idle connections in parallel. This
is especially important for the REST backend, which (when used with a local
server) may create a lot connections and exhaust available ports quickly.
https://github.com/restic/restic/issues/985
https://github.com/restic/restic/pull/986
* Regular status report: We've removed the status report that was printed
every 10 seconds when restic is run non-interactively. You can still force
reporting the current status by sending a `USR1` signal to the process.
https://github.com/restic/restic/pull/974
* Enhancement #981: Remove temporary path from binary in `build.go`
The `build.go` now strips the temporary directory used for compilation from the binary. This
is the first step in enabling reproducible builds.
* The `build.go` now strips the temporary directory used for compilation from
the binary. This is the first step in enabling reproducible builds.
https://github.com/restic/restic/pull/981
Important Changes in 0.6.0
==========================
* Enhancement #974: Remove regular status reports
Consistent forget policy
------------------------
Regular status report: We've removed the status report that was printed every 10 seconds when
restic is run non-interactively. You can still force reporting the current status by sending a
`USR1` signal to the process.
The `forget` command was corrected to be more consistent in which snapshots are
to be forgotten. It is possible that the new code removes more snapshots than
before, so please review what would be deleted by using the `--dry-run` option.
https://github.com/restic/restic/pull/974
https://github.com/restic/restic/pull/957
https://github.com/restic/restic/issues/953
Unified repository layout
-------------------------
Changelog for restic 0.6.0 (2017-05-29)
=======================================
Up to now the s3 backend used a special repository layout. We've decided to
unify the repository layout and implemented the default layout also for the s3
backend. For creating a new repository on s3 with the default layout, use
`restic -o s3.layout=default init`. For further commands the option is not
necessary any more, restic will automatically detect the correct layout to use.
A future version will switch to the default layout for new repositories.
The following sections list the changes in restic 0.6.0 relevant to
restic users. The changes are ordered by importance.
https://github.com/restic/restic/pull/966
https://github.com/restic/restic/issues/965
Summary
-------
Memory and time improvements for the s3 backend
-----------------------------------------------
* Enh #953: Make `forget` consistent
* Enh #965: Unify repository layout for all backends
* Enh #962: Improve memory and runtime for the s3 backend
Details
-------
* Enhancement #953: Make `forget` consistent
The `forget` command was corrected to be more consistent in which snapshots are to be
forgotten. It is possible that the new code removes more snapshots than before, so please
review what would be deleted by using the `--dry-run` option.
https://github.com/restic/restic/issues/953
https://github.com/restic/restic/pull/957
* Enhancement #965: Unify repository layout for all backends
Up to now the s3 backend used a special repository layout. We've decided to unify the repository
layout and implemented the default layout also for the s3 backend. For creating a new
repository on s3 with the default layout, use `restic -o s3.layout=default init`. For further
commands the option is not necessary any more, restic will automatically detect the correct
layout to use. A future version will switch to the default layout for new repositories.
https://github.com/restic/restic/issues/965
https://github.com/restic/restic/pull/966
* Enhancement #962: Improve memory and runtime for the s3 backend
We've updated the library used for accessing s3, switched to using a lower level API and added
caching for some requests. This lead to a decrease in memory usage and a great speedup. In
addition, we added benchmark functions for all backends, so we can track improvements over
time. The Continuous Integration test service we're using (Travis) now runs the s3 backend
tests not only against a Minio server, but also against the Amazon s3 live service, so we should
be notified of any regressions much sooner.
https://github.com/restic/restic/pull/962
https://github.com/restic/restic/pull/960
https://github.com/restic/restic/pull/946
https://github.com/restic/restic/pull/938
https://github.com/restic/restic/pull/883
We've updated the library used for accessing s3, switched to using a lower
level API and added caching for some requests. This lead to a decrease in
memory usage and a great speedup. In addition, we added benchmark functions for
all backends, so we can track improvements over time. The Continuous
Integration test service we're using (Travis) now runs the s3 backend tests not
only against a Minio server, but also against the Amazon s3 live service, so we
should be notified of any regressions much sooner.
https://github.com/restic/restic/pull/962
https://github.com/restic/restic/pull/960
https://github.com/restic/restic/pull/946
https://github.com/restic/restic/pull/938
https://github.com/restic/restic/pull/883

View File

@ -0,0 +1,8 @@
Enhancement: Make `forget` consistent
The `forget` command was corrected to be more consistent in which snapshots are
to be forgotten. It is possible that the new code removes more snapshots than
before, so please review what would be deleted by using the `--dry-run` option.
https://github.com/restic/restic/pull/957
https://github.com/restic/restic/issues/953

11
changelog/0.6.0/issue-965 Normal file
View File

@ -0,0 +1,11 @@
Enhancement: Unify repository layout for all backends
Up to now the s3 backend used a special repository layout. We've decided to
unify the repository layout and implemented the default layout also for the s3
backend. For creating a new repository on s3 with the default layout, use
`restic -o s3.layout=default init`. For further commands the option is not
necessary any more, restic will automatically detect the correct layout to use.
A future version will switch to the default layout for new repositories.
https://github.com/restic/restic/pull/966
https://github.com/restic/restic/issues/965

15
changelog/0.6.0/pull-962 Normal file
View File

@ -0,0 +1,15 @@
Enhancement: Improve memory and runtime for the s3 backend
We've updated the library used for accessing s3, switched to using a lower
level API and added caching for some requests. This lead to a decrease in
memory usage and a great speedup. In addition, we added benchmark functions for
all backends, so we can track improvements over time. The Continuous
Integration test service we're using (Travis) now runs the s3 backend tests not
only against a Minio server, but also against the Amazon s3 live service, so we
should be notified of any regressions much sooner.
https://github.com/restic/restic/pull/962
https://github.com/restic/restic/pull/960
https://github.com/restic/restic/pull/946
https://github.com/restic/restic/pull/938
https://github.com/restic/restic/pull/883

View File

@ -0,0 +1,8 @@
Enhancement: Allow multiple parallel idle HTTP connections
Backends based on HTTP now allow several idle connections in parallel. This
is especially important for the REST backend, which (when used with a local
server) may create a lot connections and exhaust available ports quickly.
https://github.com/restic/restic/issues/985
https://github.com/restic/restic/pull/986

6
changelog/0.6.1/pull-891 Normal file
View File

@ -0,0 +1,6 @@
Enhancement: Remove temporary path from binary in `build.go`
The `build.go` now strips the temporary directory used for compilation from
the binary. This is the first step in enabling reproducible builds.
https://github.com/restic/restic/pull/981

7
changelog/0.6.1/pull-974 Normal file
View File

@ -0,0 +1,7 @@
Enhancement: Remove regular status reports
Regular status report: We've removed the status report that was printed
every 10 seconds when restic is run non-interactively. You can still force
reporting the current status by sending a `USR1` signal to the process.
https://github.com/restic/restic/pull/974

View File

@ -0,0 +1,9 @@
Bugfix: Switch back to using the high-level minio-go API for s3
For the s3 backend we're back to using the high-level API the s3 client library
for uploading data, a few users reported dropped connections (which the library
will automatically retry now).
https://github.com/restic/restic/issues/1013
https://github.com/restic/restic/issues/1023
https://github.com/restic/restic/pull/1025

View File

@ -0,0 +1,7 @@
Enhancement: Detect invalid backend name and print error
restic now tries to detect when an invalid/unknown backend is used and
returns an error message.
https://github.com/restic/restic/issues/1021
https://github.com/restic/restic/pull/1070

View File

@ -0,0 +1,8 @@
Enhancement: Remove invalid pack files when `prune` is run
The `prune` command has been improved and will now remove invalid pack files,
for example files that have not been uploaded completely because a backup was
interrupted.
https://github.com/restic/restic/issues/1029
https://github.com/restic/restic/pull/1036

View File

@ -0,0 +1,4 @@
Enhancement: Add Backblaze B2 backend
https://github.com/restic/restic/issues/512
https://github.com/restic/restic/pull/978

View File

@ -0,0 +1,9 @@
Enhancement: Add dirs `tags` and `hosts` to fuse mount
The fuse mount now has two more directories: `tags` contains a subdir for
each tag, which in turn contains only the snapshots that have this tag. The
subdir `hosts` contains a subdir for each host that has a snapshot, and the
subdir contains the snapshots for that host.
https://github.com/restic/restic/issues/636
https://github.com/restic/restic/pull/1050

View File

@ -0,0 +1,8 @@
Bugfix: Switch to `default` repo layout for the s3 backend
The default layout for the s3 backend is now `default` (instead of `s3legacy`).
Also, there's a new `migrate` command to convert an existing repo, it can be
run like this: `restic migrate s3_layout`
https://github.com/restic/restic/issues/965
https://github.com/restic/restic/pull/1004

View File

@ -0,0 +1,8 @@
Enhancement: Improve performance of the `find` command
Improved performance for the `find` command: Restic recognizes paths it has
already checked for the files in question, so the number of backend requests
is reduced a lot.
https://github.com/restic/restic/issues/989
https://github.com/restic/restic/pull/993

4
changelog/0.7.0/pull-975 Normal file
View File

@ -0,0 +1,4 @@
Enhancement: Add new backend for OpenStack Swift
https://github.com/restic/restic/pull/975
https://github.com/restic/restic/pull/648

5
changelog/0.7.0/pull-998 Normal file
View File

@ -0,0 +1,5 @@
Enhancement: Improve performance of the fuse mount
Listing directories which contain large files now is significantly faster.
https://github.com/restic/restic/pull/998

View File

@ -0,0 +1,10 @@
Enhancement: Create subdirs below `data/` for local/sftp backends
The local and sftp backends now create the subdirs below `data/` on
open/init. This way, restic makes sure that they always exist. This is
connected to an issue for the sftp server:
https://github.com/restic/rest-server/pull/11#issuecomment-309879710
https://github.com/restic/restic/issues/1055
https://github.com/restic/restic/pull/1077
https://github.com/restic/restic/pull/1105

View File

@ -0,0 +1,8 @@
Enhancement: Allow loading credentials for s3 from IAM
When no S3 credentials are specified in the environment variables, restic
now tries to load credentials from an IAM instance profile when the s3
backend is used.
https://github.com/restic/restic/issues/1067
https://github.com/restic/restic/pull/1086

View File

@ -0,0 +1,8 @@
Enhancement: Add `migrate` cmd to migrate from `s3legacy` to `default` layout
The `migrate` command for chaning the `s3legacy` layout to the `default` layout
for s3 backends has been improved: It can now be restarted with `restic migrate
--force s3_layout` and automatically retries operations on error.
https://github.com/restic/restic/issues/1073
https://github.com/restic/restic/pull/1075

View File

@ -0,0 +1,4 @@
Enhancement: Clarify semantic for `--tasg` for the `forget` command
https://github.com/restic/restic/issues/1081
https://github.com/restic/restic/pull/1090

View File

@ -0,0 +1,5 @@
Enhancement: Ignore chmod() errors on filesystems which do not support it
https://github.com/restic/restic/pull/1080
https://github.com/restic/restic/pull/1112

View File

@ -0,0 +1,3 @@
Enhancement: Print stats on SIGINFO on Darwin and FreeBSD (ctrl+t)
https://github.com/restic/restic/pull/1082

View File

@ -0,0 +1,9 @@
Bugfix: Fix `prune`, only include existing files in indexes
A bug was found (and corrected) in the index rebuilding after prune, which led
to indexes which include blobs that were not present in the repo any more.
There were already checks in place which detected this situation and aborted
with an error message. A new run of either `prune` or `rebuild-index` corrected
the index files. This is now fixed and a test has been added to detect this.
https://github.com/restic/restic/pull/1115

View File

@ -0,0 +1,8 @@
Enhancement: Make `key` command always prompt for a password
The `key` command now prompts for a password even if the original password
to access a repo has been specified via the `RESTIC_PASSWORD` environment
variable or a password file.
https://github.com/restic/restic/issues/1132
https://github.com/restic/restic/pull/1133

View File

@ -0,0 +1,8 @@
Bugfix: Do not create a local repo unless `init` is used
When a restic command other than `init` is used with a local repository and the
repository directory does not exist, restic creates the directory structure.
That's an error, only the `init` command should create the dir.
https://github.com/restic/restic/issues/1167
https://github.com/restic/restic/pull/1182

View File

@ -0,0 +1,4 @@
Enhancement: Resolve name conflicts, append a counter
https://github.com/restic/restic/issues/1179
https://github.com/restic/restic/pull/1209

View File

@ -0,0 +1,7 @@
Enhancement: Add `--compact` to `snapshots` command
The option `--compact` was added to the `snapshots` command to get a better
overview of the snapshots in a repo. It limits each snapshot to a single line.
https://github.com/restic/restic/issues/1218
https://github.com/restic/restic/pull/1223

10
changelog/0.7.2/issue-317 Normal file
View File

@ -0,0 +1,10 @@
Enhancement: Add `--exclude-caches` and `--exclude-if-present`
A new option `--exclude-caches` was added that allows excluding cache
directories (that are tagged as such). This is a special case of a more generic
option `--exclude-if-present` which excludes a directory if a file with a
specific name (and contents) is present.
https://github.com/restic/restic/issues/317
https://github.com/restic/restic/pull/1170
https://github.com/restic/restic/pull/1224

View File

@ -0,0 +1,4 @@
Enhancement: Automatically generate man pages for all restic commands
https://github.com/restic/restic/issues/697
https://github.com/restic/restic/pull/1147

View File

@ -0,0 +1,3 @@
Enhancement: Improve `restore`, do not traverse/load excluded directories
https://github.com/restic/restic/pull/1044

View File

@ -0,0 +1,3 @@
Enhancement: Add Dockerfile and official Docker image
https://github.com/restic/restic/pull/1061

View File

@ -0,0 +1,7 @@
Enhancement: Use the standard Go git repository layout, use `dep` for vendoring
The git repository layout was changed to resemble the layout typically used in
Go projects, we're not using `gb` for building restic any more and vendoring
the dependencies is now taken care of by `dep`.
https://github.com/restic/restic/pull/1126

View File

@ -0,0 +1,5 @@
Enhancement: Add support for storing backups on Google Cloud Storage
https://github.com/restic/restic/pull/1134
https://github.com/restic/restic/pull/1052
https://github.com/restic/restic/issues/211

View File

@ -0,0 +1,3 @@
Enhancement: Properly report errors when reading files with exclude patterns.
https://github.com/restic/restic/pull/1144

View File

@ -0,0 +1,8 @@
Enhancement: Add support for storing backups on Microsoft Azure Blob Storage
The library we're using to access the service requires Go 1.8, so restic now
needs at least Go 1.8.
https://github.com/restic/restic/pull/1149
https://github.com/restic/restic/pull/1059
https://github.com/restic/restic/issues/609

View File

@ -0,0 +1,3 @@
Bugfix: Make the `key remove` command behave as documented
https://github.com/restic/restic/pull/1164

View File

@ -0,0 +1,8 @@
Bugfix: Make sure to write profiling files on interrupt
Since a few releases restic had the ability to write profiling files for memory
and CPU usage when `debug` is enabled. It was discovered that when restic is
interrupted (ctrl+c is pressed), the proper shutdown hook is not run. This is
now corrected.
https://github.com/restic/restic/pull/1191

View File

@ -0,0 +1,3 @@
Enhancement: Add `--group-by` to `forget` command for flexible grouping
https://github.com/restic/restic/pull/1196

View File

@ -0,0 +1,5 @@
Enhancement: Print stats on all BSD systems when SIGINFO (ctrl+t) is received
https://github.com/restic/restic/pull/1203
https://github.com/restic/restic/pull/1082#issuecomment-326279920

View File

@ -0,0 +1,3 @@
Enhancement: Allow specifying time/date for a backup with `--time`
https://github.com/restic/restic/pull/1205

View File

@ -0,0 +1,9 @@
Bugfix: List all files stored in Google Cloud Storage
For large backups stored in Google Cloud Storage, the `prune` command fails
because listing only returns the first 1000 files. This has been corrected, no
data is lost in the process. In addition, a plausibility check was added to
`prune`.
https://github.com/restic/restic/issues/1246
https://github.com/restic/restic/pull/1247

View File

@ -0,0 +1,9 @@
Enhancement: Add subdirectory `ids` to fuse mount
The fuse mount now has an `ids` subdirectory which contains the snapshots below
their (short) IDs.
https://github.com/restic/restic/issues/1102
https://github.com/restic/restic/pull/1299
https://github.com/restic/restic/pull/1320

View File

@ -0,0 +1,10 @@
Enhancement: Add `--cacert` to specify TLS certificates to check against
We've added the `--cacert` option which can be used to pass one (or more) CA
certificates to restic. These are used in addition to the system CA
certificates to verify HTTPS certificates (e.g. for the REST backend).
https://github.com/restic/restic/issues/1114
https://github.com/restic/restic/pull/1276

View File

@ -0,0 +1,9 @@
Enhancement: Add upload/download limiting
We've added support for rate limiting through `--limit-upload` and
`--limit-download` flags.
https://github.com/restic/restic/issues/1216
https://github.com/restic/restic/pull/1336
https://github.com/restic/restic/pull/1358

View File

@ -0,0 +1,7 @@
Bugfix: Re-enable workaround for S3 backend
We've re-enabled a workaround for `minio-go` (the library we're using to
access s3 backends), this reduces memory usage.
https://github.com/restic/restic/issues/1256
https://github.com/restic/restic/pull/1267

View File

@ -0,0 +1,6 @@
Enhancement: Cache results for excludes for `backup`
The `backup` command now caches the result of excludes for a directory.
https://github.com/restic/restic/issues/1271
https://github.com/restic/restic/pull/1326

View File

@ -0,0 +1,9 @@
Enhancement: Add `generate` command, replaces `manpage` and `autocomplete`
The `generate` command has been added, which replaces the now removed
commands `manpage` and `autocomplete`. This release of restic contains the
most recent manpages in `doc/man` and the auto-completion files for bash and
zsh in `doc/bash-completion.sh` and `doc/zsh-completion.zsh`
https://github.com/restic/restic/issues/1274
https://github.com/restic/restic/pull/1282

View File

@ -0,0 +1,8 @@
Bugfix: Reuse backend TCP connections to BackBlaze B2
A bug was discovered in the library we're using to access Backblaze, it now
reuses already established TCP connections which should be a lot faster and
not cause network failures any more.
https://github.com/restic/restic/issues/1291
https://github.com/restic/restic/pull/1301

View File

@ -0,0 +1,7 @@
Enhancement: Allow comments in files read from via `--file-from`
When the list of files/dirs to be saved is read from a file with
`--files-from`, comment lines (starting with `#`) are now ignored.
https://github.com/restic/restic/issues/1367
https://github.com/restic/restic/pull/1368

View File

@ -0,0 +1,18 @@
Security: Prevent writing outside the target directory during restore
A vulnerability was found in the restic restorer, which allowed attackers in
special circumstances to restore files to a location outside of the target
directory. Due to the circumstances we estimate this to be a low-risk
vulnerability, but urge all users to upgrade to the latest version of restic.
Exploiting the vulnerability requires a Linux/Unix system which saves backups
via restic and a Windows systems which restores files from the repo. In
addition, the attackers need to be able to create create files with arbitrary
names which are then saved to the restic repo. For example, by creating a file
named "..\test.txt" (which is a perfectly legal filename on Linux) and
restoring a snapshot containing this file on Windows, it would be written to
the parent of the target directory.
We'd like to thank Tyler Spivey for reporting this responsibly!
https://github.com/restic/restic/pull/1445

View File

@ -0,0 +1,9 @@
Enhancement: sftp backend prompts for password
The sftp backend now prompts for the password if a password is necessary for
login.
https://github.com/restic/restic/issues/448
https://github.com/restic/restic/pull/1270

View File

@ -0,0 +1,7 @@
Enhancement: Add `dump` command
We've added the `dump` command which prints a file from a snapshot to
stdout. This can e.g. be used to restore files read with `backup --stdin`.
https://github.com/restic/restic/issues/510
https://github.com/restic/restic/pull/1346

23
changelog/0.8.0/pull-1040 Normal file
View File

@ -0,0 +1,23 @@
Enhancement: Add local metadata cache
We've added a local cache for metadata so that restic doesn't need to load
all metadata (snapshots, indexes, ...) from the repo each time it starts. By
default the cache is active, but there's a new global option `--no-cache`
that can be used to disable the cache. By deafult, the cache a standard
cache folder for the OS, which can be overridden with `--cache-dir`. The
cache will automatically populate, indexes and snapshots are saved as they
are loaded. Cache directories for repos that haven't been used recently can
automatically be removed by restic with the `--cleanup-cache` option.
A related change was to by default create pack files in the repo that contain
either data or metadata, not both mixed together. This allows easy caching of
only the metadata files. The next run of `restic prune` will untangle mixed
files automatically.
https://github.com/restic/restic/pull/1040
https://github.com/restic/restic/issues/29
https://github.com/restic/restic/issues/738
https://github.com/restic/restic/issues/282
https://github.com/restic/restic/pull/1287
https://github.com/restic/restic/pull/1436
https://github.com/restic/restic/pull/1265

View File

@ -0,0 +1,6 @@
Enhancement: Add `latest` symlink in fuse mount
The directory structure in the fuse mount now exposes a symlink `latest`
which points to the latest snapshot in that particular directory.
https://github.com/restic/restic/pull/1249

View File

@ -0,0 +1,6 @@
Enhancement: Add `--compact` to `forget` command
The option `--compact` was added to the `forget` command to provide the same
compact view as the `snapshots` command.
https://github.com/restic/restic/pull/1269

View File

@ -0,0 +1,7 @@
Enhancement: Google Cloud Storage backend needs less permissions
The Google Cloud Storage backend no longer requires the service account to
have the `storage.buckets.get` permission ("Storage Admin" role) in `restic
init` if the bucket already exists.
https://github.com/restic/restic/pull/1281

View File

@ -0,0 +1,7 @@
Bugfix: Run prune when `forget --prune` is called with just snapshot IDs
A bug in the `forget` command caused `prune` not to be run when `--prune` was
specified without a policy, e.g. when only snapshot IDs that should be
forgotten are listed manually.
https://github.com/restic/restic/pull/1317

View File

@ -0,0 +1,8 @@
Enhancement: Make `check` print `no errors found` explicitly
The `check` command now explicetly prints `No errors were found` when no errors
could be found.
https://github.com/restic/restic/pull/1319
https://github.com/restic/restic/issues/1303

View File

@ -0,0 +1,3 @@
Enhancement: Retry failed backend requests
https://github.com/restic/restic/pull/1353

10
changelog/0.8.0/pull-1437 Normal file
View File

@ -0,0 +1,10 @@
Bugfix: Remove implicit path `/restic` for the s3 backend
The s3 backend used the subdir `restic` within a bucket if no explicit path
after the bucket name was specified. Since this version, restic does not use
this default path any more. If you created a repo on s3 in a bucket without
specifying a path within the bucket, you need to add `/restic` at the end of
the repository specification to access your repo: `s3:s3.amazonaws.com/bucket/restic`
https://github.com/restic/restic/pull/1437
https://github.com/restic/restic/issues/1292

View File

@ -0,0 +1,4 @@
Bugfix: Improve s3 backend with DigitalOcean Spaces
https://github.com/restic/restic/pull/1459
https://github.com/restic/restic/issues/1457

View File

@ -0,0 +1,9 @@
Enhancement: Add code to detect old cache directories
We've added code to detect old cache directories of repositories that
haven't been used in a long time, restic now prints a note when it detects
that such dirs exist. Also, the option `--cleanup-cache` was added to
automatically remove such directories. That's not a problem because the
cache will be rebuild once a repo is accessed again.
https://github.com/restic/restic/pull/1436

View File

@ -0,0 +1,6 @@
Enhancement: Improve cancellation logic
The cancellation logic was improved, restic can now shut down cleanly when
requested to do so (e.g. via ctrl+c).
https://github.com/restic/restic/pull/1439

View File

@ -0,0 +1,9 @@
Change: Do not save atime by default
By default, the access time for files and dirs is not saved any more. It is
not possible to reliably disable updating the access time during a backup,
so for the next backup the access time is different again. This means a lot
of metadata is saved. If you want to save the access time anyway, pass
`--with-atime` to the `backup` command.
https://github.com/restic/restic/pull/1452

View File

@ -0,0 +1,6 @@
Bugfix: Correct cache dir location for Windows and Darwin
The cache directory on Windows and Darwin was not correct, instead the
directory `.cache` was used.
https://github.com/restic/restic/pull/1454

View File

@ -0,0 +1,9 @@
Bugfix: Disable handling SIGPIPE
We've disabled handling SIGPIPE again. Turns out, writing to broken TCP
connections also raised SIGPIPE, so restic exits on the first write to a
broken connection. Instead, restic should retry the request.
https://github.com/restic/restic/pull/1459
https://github.com/restic/restic/issues/1457
https://github.com/restic/restic/issues/1466

View File

@ -0,0 +1,8 @@
Enhancement: Add the `diff` command
The command `diff` was added, it allows comparing two snapshots and listing
all differences.
https://github.com/restic/restic/issues/11
https://github.com/restic/restic/issues/1460
https://github.com/restic/restic/pull/1462

32
changelog/CHANGELOG.tmpl Normal file
View File

@ -0,0 +1,32 @@
{{- range $changes := . }}{{ with $changes -}}
Changelog for restic {{ .Version }} ({{ .Date }})
=======================================
The following sections list the changes in restic {{ .Version }} relevant to
restic users. The changes are ordered by importance.
Summary
-------
{{ range $entry := .Entries }}{{ with $entry }}
* {{ .TypeShort }} #{{ .PrimaryID }}: {{ .Title }}
{{- end }}{{ end }}
Details
-------
{{ range $entry := .Entries }}{{ with $entry }}
* {{ .Type }} #{{ .PrimaryID }}: {{ .Title }}
{{ range $par := .Paragraphs }}
{{ wrap $par 80 3 }}
{{ end -}}
{{ range $id := .Issues }}
https://github.com/restic/restic/issues/{{ $id -}}
{{ end -}}
{{ range $id := .PRs }}
https://github.com/restic/restic/pull/{{ $id -}}
{{ end -}}
{{ range $url := .OtherURLs }}
{{ $url -}}
{{ end }}
{{ end }}{{ end }}
{{ end }}{{ end -}}

View File

@ -0,0 +1,12 @@
Bugfix: Fix behavior for foobar (in present tense)
We've fixed the behavior for foobar, a long-standing annoyance for restic
users.
The text in the paragraphs is written in past tense. The last section is a list
of issue URLs, PR URLs and other URLs. The first issue ID (or the first PR ID,
in case there aren't any issue links) is used as the primary ID.
https://github.com/restic/restic/issues/1234
https://github.com/restic/restic/pull/55555
https://forum.restic/.net/foo/bar/baz

View File

@ -0,0 +1,32 @@
{{- range $changes := . }}{{ with $changes -}}
Changelog for restic {{ .Version }} ({{ .Date }})
=======================================
The following sections list the changes in restic {{ .Version }} relevant to
restic users. The changes are ordered by importance.
Summary
-------
{{ range $entry := .Entries }}{{ with $entry }}
* {{ .TypeShort }} [#{{ .PrimaryID }}]({{ .PrimaryURL }}): {{ .Title }}
{{- end }}{{ end }}
Details
-------
{{ range $entry := .Entries }}{{ with $entry }}
* {{ .Type }} #{{ .PrimaryID }}: {{ .Title }}
{{ range $par := .Paragraphs }}
{{ $par }}
{{ end }}
{{ range $id := .Issues -}}
[{{ $id }}](https://github.com/restic/restic/issues/{{ $id -}})
{{- end -}}
{{ range $id := .PRs -}}
{{ ` ` }}[#{{ $id }}](https://github.com/restic/restic/pull/{{ $id -}})
{{- end -}}
{{ ` ` }}{{ range $url := .OtherURLs -}}
{{ $url -}}
{{- end }}
{{ end }}{{ end }}
{{ end }}{{ end -}}

13
changelog/releases Normal file
View File

@ -0,0 +1,13 @@
# This file lists all versions for the changelog. Each line consists of the
# version string, followed by an optional release date.
#
# The resulting changelog generated by `calens` will list all versions in
# exactly this order.
0.8.1
0.8.0 2017-11-26
0.7.3 2017-09-20
0.7.2 2017-09-13
0.7.1 2017-07-22
0.7.0 2017-07-01
0.6.1 2017-06-01
0.6.0 2017-05-29

View File

@ -96,6 +96,7 @@ func (env *TravisEnvironment) Prepare() error {
"github.com/NebulousLabs/glyphcheck",
"github.com/golang/dep/cmd/dep",
"github.com/restic/rest-server/cmd/rest-server",
"github.com/restic/calens",
}
for _, pkg := range pkgs {
@ -285,6 +286,11 @@ func (env *TravisEnvironment) RunTests() error {
return err
}
// check that the entries in changelog/ are valid
if err := run("calens"); err != nil {
fmt.Fprintf(os.Stderr, "calens failed, files in changelog/ are not valid\n")
}
return nil
}

View File

@ -23,6 +23,7 @@ var opts = struct {
IgnoreBranchName bool
IgnoreUncommittedChanges bool
IgnoreChangelogVersion bool
IgnoreChangelogCurrent bool
tarFilename string
buildDir string
@ -33,7 +34,8 @@ var versionRegex = regexp.MustCompile(`^\d+\.\d+\.\d+$`)
func init() {
pflag.BoolVar(&opts.IgnoreBranchName, "ignore-branch-name", false, "allow releasing from other branches as 'master'")
pflag.BoolVar(&opts.IgnoreUncommittedChanges, "ignore-uncommitted-changes", false, "allow uncommitted changes")
pflag.BoolVar(&opts.IgnoreChangelogVersion, "ignore-changelgo-version", false, "ignore missing entry in CHANGELOG.md")
pflag.BoolVar(&opts.IgnoreChangelogVersion, "ignore-changelog-version", false, "ignore missing entry in CHANGELOG.md")
pflag.BoolVar(&opts.IgnoreChangelogCurrent, "ignore-changelog-current", false, "ignore check if CHANGELOG.md is up to date")
pflag.Parse()
}
@ -151,7 +153,22 @@ func preCheckVersionExists() {
}
}
func preCheckChangelog() {
func preCheckChangelogCurrent() {
if opts.IgnoreChangelogCurrent {
return
}
// regenerate changelog
run("calens", "--output", "CHANGELOG.md")
// check for uncommitted changes in changelog
if len(uncommittedChanges("CHANGELOG.md")) > 0 {
msg("committing file CHANGELOG.md")
run("git", "commit", "-m", fmt.Sprintf("Generate CHANGELOG.md for %v", opts.Version), "CHANGELOG.md")
}
}
func preCheckChangelogVersion() {
if opts.IgnoreChangelogVersion {
return
}
@ -168,7 +185,7 @@ func preCheckChangelog() {
die("error scanning: %v", sc.Err())
}
if strings.TrimSpace(sc.Text()) == fmt.Sprintf("Important Changes in %v", opts.Version) {
if strings.Contains(strings.TrimSpace(sc.Text()), fmt.Sprintf("Changelog for restic %v", opts.Version)) {
return
}
}
@ -189,6 +206,7 @@ func generateFiles() {
"--bash-completion", "doc/bash-completion.sh")
rm("restic-generate.temp")
run("git", "add", "doc")
changes := uncommittedChanges("doc")
if len(changes) > 0 {
msg("committing manpages and auto-completion")
@ -287,7 +305,8 @@ func main() {
preCheckBranchMaster()
preCheckUncommittedChanges()
preCheckVersionExists()
preCheckChangelog()
preCheckChangelogCurrent()
preCheckChangelogVersion()
generateFiles()
updateVersion()