Skip to content

Commit a2313ec

Browse files
committed
cleaning
1 parent 6984f16 commit a2313ec

File tree

3 files changed

+120
-2
lines changed

3 files changed

+120
-2
lines changed

Makefile

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
app_name=Backup
2+
3+
build_dir=$(CURDIR)/build/artifacts
4+
appstore_dir=$(build_dir)/appstore
5+
source_dir=$(build_dir)/source
6+
sign_dir=$(build_dir)/sign
7+
package_name=$(shell echo $(app_name) | tr '[:upper:]' '[:lower:]')
8+
cert_dir=$(HOME)/.nextcloud/certificates
9+
github_account=nextcloud
10+
release_account=nextcloud-releases
11+
branch=master
12+
version=0.2.0
13+
since_tag=
14+
15+
all: appstore
16+
17+
release: appstore github-release github-upload
18+
19+
github-release:
20+
if [ -z "$(release_account)" ]; then \
21+
release_account=$(github_account); \
22+
release_branch=$(branch); \
23+
else \
24+
release_account=$(release_account); \
25+
release_branch=master; \
26+
fi; \
27+
if [ -z "$(since_tag)" ]; then \
28+
latest_tag=$$(git describe --tags `git rev-list --tags --max-count=1`); \
29+
else \
30+
latest_tag=$(since_tag); \
31+
fi; \
32+
comparison="$$latest_tag..HEAD"; \
33+
if [ -z "$$latest_tag" ]; then comparison=""; fi; \
34+
changelog=$$(git log $$comparison --oneline --no-merges | sed -e 's/^/$(github_account)\/$(package_name)@/'); \
35+
github-release release \
36+
--user $$release_account \
37+
--repo $(package_name) \
38+
--target $$release_branch \
39+
--tag $(version) \
40+
--description "**Changelog**<br/>$$changelog" \
41+
--name "$(app_name) v$(version)"; \
42+
if [ $(github_account) != $$release_account ]; then \
43+
link="https://github.com/$$release_account/$(package_name)/releases/download/$(version)/$(package_name)-$(version).tar.gz";\
44+
github-release release \
45+
--user $(github_account) \
46+
--repo $(package_name) \
47+
--target $(branch) \
48+
--tag $(version) \
49+
--description "**Download**<br />$$link<br /><br />**Changelog**<br/>$$changelog<br />" \
50+
--name "$(app_name) v$(version)"; \
51+
fi; \
52+
53+
54+
github-upload:
55+
if [ -z "$(release_account)" ]; then \
56+
release_account=$(github_account); \
57+
else \
58+
release_account=$(release_account); \
59+
fi; \
60+
github-release upload \
61+
--user $$release_account \
62+
--repo $(package_name) \
63+
--tag $(version) \
64+
--name "$(package_name)-$(version).tar.gz" \
65+
--file $(build_dir)/$(package_name)-$(version).tar.gz
66+
67+
cs-check: composer-dev
68+
composer cs:check
69+
70+
cs-fix: composer-dev
71+
composer cs:fix
72+
73+
clean:
74+
rm -rf $(build_dir)
75+
rm -rf node_modules
76+
77+
# composer packages
78+
composer:
79+
composer install --prefer-dist --no-dev
80+
composer upgrade --prefer-dist --no-dev
81+
82+
composer-dev:
83+
composer install --prefer-dist --dev
84+
composer upgrade --prefer-dist --dev
85+
86+
appstore: clean composer
87+
mkdir -p $(sign_dir)
88+
rsync -a \
89+
--exclude=/build \
90+
--exclude=/docs \
91+
--exclude=/translationfiles \
92+
--exclude=/.tx \
93+
--exclude=/tests \
94+
--exclude=.git \
95+
--exclude=/.github \
96+
--exclude=/l10n/l10n.pl \
97+
--exclude=/CONTRIBUTING.md \
98+
--exclude=/issue_template.md \
99+
--exclude=/README.md \
100+
--exclude=/composer.json \
101+
--exclude=/testConfiguration.json \
102+
--exclude=/composer.lock \
103+
--exclude=/.gitattributes \
104+
--exclude=/.gitignore \
105+
--exclude=/.scrutinizer.yml \
106+
--exclude=/.travis.yml \
107+
--exclude=/Makefile \
108+
./ $(sign_dir)/$(package_name)
109+
tar -czf $(build_dir)/$(package_name)-$(version).tar.gz \
110+
-C $(sign_dir) $(package_name)
111+
@if [ -f $(cert_dir)/$(package_name).key ]; then \
112+
echo "Signing package…"; \
113+
openssl dgst -sha512 -sign $(cert_dir)/$(package_name).key $(build_dir)/$(package_name)-$(version).tar.gz | openssl base64; \
114+
fi

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ You can upload your backup files on a remote instance
5353
./occ backup:remote:remove cloud.example.net
5454

5555

56+
**Note**: if you enable the backup on remote instance, it is strongly advice to [keep your current setup somewhere](), or
57+
your files won't be available without your identity nor readable without your encryption key
58+
59+
5660
### Manage your restoring point
5761

5862

@@ -146,4 +150,4 @@ key means that your remote backup cannot be decrypted and are totally useless.**
146150
- uploading a parent RP after a dependant incremental backup does not remove the 'orphan' tag
147151
- Importing a Restoring Point using `backup:point:scan` from an external folder
148152
- Add remote instance to `backup:point:details`
149-
- encrypting exported setup with a passphrase
153+
- encrypting the exported setup with a passphrase

lib/Command/PointRestore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
177177
$healthStatus = $point->getHealth()->getStatus();
178178
if ($healthStatus !== RestoringHealth::STATUS_OK) {
179179
$output->writeln('Some files from your restoring point might not be available');
180-
$output->writeln('You can run ./occ backup:point:health for more details on the affected files');
180+
$output->writeln('You can run ./occ backup:point:details for more details on the affected files');
181181
$output->writeln('continue ? (not available yet)');
182182
$output->writeln('');
183183

0 commit comments

Comments
 (0)