Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed deploy as an app fragments and refactored release makefile #3162

Merged
merged 1 commit into from
Mar 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ def buildRelease(ctx):
'pull': 'always',
'commands': [
'cd /var/www/owncloud/phoenix',
'make -f Makefile.release dist'
'make -f Makefile.release'
],
},
{
Expand Down
73 changes: 18 additions & 55 deletions Makefile.release
Original file line number Diff line number Diff line change
Expand Up @@ -4,82 +4,45 @@ YARN := $(shell command -v yarn 2> /dev/null)
ifndef YARN
$(error yarn is not available on your system, please install npm)
endif
UNAME_S := $(shell uname -s)
ifneq ($(UNAME_S),Linux)
$(error Linux is required to properly build a release)
endif

app_name=phoenix
cur_dir=$(CURDIR)
dist_dir=$(CURDIR)/dist

occ=$(CURDIR)/../../occ
private_key=$(HOME)/.owncloud/certificates/$(app_name).key
certificate=$(HOME)/.owncloud/certificates/$(app_name).crt
sign=$(occ) integrity:sign-app --privateKey="$(private_key)" --certificate="$(certificate)"
sign_skip_msg="Skipping signing, either no key and certificate found in $(private_key) and $(certificate) or occ can not be found at $(occ)"
ifneq (,$(wildcard $(private_key)))
ifneq (,$(wildcard $(certificate)))
ifneq (,$(wildcard $(occ)))
CAN_SIGN=true
endif
endif
endif

.DEFAULT_GOAL := help

help:
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
.DEFAULT_GOAL := build-release

##
## Build targets
##--------------------------------------
.PHONY: build-release
build-release: build package

.PHONY: dist
dist: ## Build distribution
dist: distdir javascript oc-app distconf sign package

.PHONY: build
build: build-phoenix copy-configs

.PHONY: javascript
javascript:
.PHONY: build-phoenix
build-phoenix:
rm -rf $(dist_dir)
$(YARN) install
$(YARN) dist

.PHONY: distdir
distdir:
rm -rf $(dist_dir)
.PHONY: copy-configs
copy-configs: copy-phoenix-config copy-htaccess

.PHONY: distconf
distconf:
.PHONY: copy-phoenix-config
copy-phoenix-config:
cp config.json.dist $(dist_dir)/config.json

.PHONY: oc-app
oc-app:
cp -R appinfo $(dist_dir)
cp -R img $(dist_dir)
.Phony: copy-htaccess
copy-htaccess:
cp .htaccess $(dist_dir)

.PHONY: sign
sign:
ifdef CAN_SIGN
$(sign) --path="$(dist_dir)"
else
@echo $(sign_skip_msg)
endif

.PHONY: package
package: create-release-folder package-plain package-ocx
package: create-release-folder create-package

.PHONY: create-release-folder
create-release-folder:
rm -rf $(CURDIR)/release
mkdir $(CURDIR)/release

.PHONY: package-plain
package-plain:
cd $(dist_dir) && tar -czf $(CURDIR)/release/$(app_name).tar.gz --exclude=appinfo -C $(dist_dir) * .htaccess

.PHONY: package-ocx
package-ocx:
tar -czf $(CURDIR)/release/$(app_name)-app.tar.gz --transform='s,dist,phoenix,' dist

.PHONY: create-package
create-package:
cd $(dist_dir) && tar -czf $(CURDIR)/release/$(app_name).tar.gz -C $(dist_dir) * .htaccess
16 changes: 0 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,3 @@ After all these changes Phoenix will be accessible at `http://host.docker.intern
## Cleaning up the workspace

- Run `yarn clean-all` to remove node_modules and dist folder

## Phoenix as an ownCloud app

### Building the Phoenix ownCloud app

- run `yarn install && yarn dist && yarn build`
- run `make -f Makefile.release` dist

### Deploying the Phoenix app to ownCloud

- Grab build/dist/phoenix.tar.gz
- Move to the apps folder on your ownCloud installation
- `tar -xzf phoenix.tar.gz`
- Run `./occ apps:enable phoenix`
- Refresh your webui and see Phoenix in the app menu

23 changes: 0 additions & 23 deletions appinfo/info.xml

This file was deleted.

6 changes: 6 additions & 0 deletions changelog/unreleased/3162
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Change: Stop support for deployment of Phoenix as an ownCloud app

We've stopped supporting deployment of Phoenix as an ownCloud app.
In the release is no longer available Phoenix ownCloud 10 app package.

https://github.com/owncloud/phoenix/pull/3162