Skip to content
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
58 changes: 58 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
workspace:
base: /var/www/owncloud
path: apps/testing

branches:
- master

pipeline:
prepare-lint:
image: owncloudci/php
pull: true
commands:
- make vendor-bin/php-parallel-lint/vendor

lint-php5:
image: owncloudci/php:5.6
pull: true
group: lint
commands:
- make test-php-lint

lint-php70:
image: owncloudci/php:7.0
pull: true
group: lint
commands:
- make test-php-lint

lint-php71:
image: owncloudci/php:7.1
pull: true
group: lint
commands:
- make test-php-lint

lint-php72:
image: owncloudci/php:7.2
pull: true
group: lint
commands:
- make test-php-lint

build:
image: owncloudci/php:7.1
pull: true
commands:
- make dist

github_release:
image: plugins/github-release
pull: true
secrets: [ github_token ]
files: build/dist/testing.tar.gz
prerelease: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a preprelease?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be marked as official and this is just a helper

file_exists: overwrite

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the default behavior

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know - I want it to be explicit

checksum: sha256
when:
event: tag
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build
/vendor/
vendor-bin/**/vendor
vendor-bin/**/composer.lock
71 changes: 71 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
SHELL := /bin/bash

COMPOSER_BIN := $(shell command -v composer 2> /dev/null)
ifndef COMPOSER_BIN
$(error composer is not available on your system, please install composer)
endif

# directories
app_name=$(notdir $(CURDIR))
build_dir=$(CURDIR)/build
dist_dir=$(build_dir)/dist
src_files=README.md LICENSE
src_dirs=appinfo data img lib locking
all_src=$(src_dirs) $(src_files)

# bin file definitions
PHPLINT=php -d zend.enable_gc=0 vendor-bin/php-parallel-lint/vendor/bin/parallel-lint

# start with displaying help
.DEFAULT_GOAL := help

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



##
## Build targets
##--------------------------------------

.PHONY: dist
dist: ## Build distribution
dist: distdir package

.PHONY: distdir
distdir:
rm -rf $(build_dir)
mkdir -p $(dist_dir)/$(app_name)
cp -R $(all_src) $(dist_dir)/$(app_name)

.PHONY: package
package:
tar -czf $(dist_dir)/$(app_name).tar.gz -C $(dist_dir) $(app_name)

##
## Tests
##--------------------------------------

.PHONY: test-php-lint
test-php-lint: ## Run phan
test-php-lint: vendor-bin/php-parallel-lint/vendor
$(PHPLINT) appinfo lib locking

#
# Dependency management
#--------------------------------------

composer.lock: composer.json
@echo composer.lock is not up to date.

vendor:
composer install --no-dev

vendor/bamarni/composer-bin-plugin:
composer install

vendor-bin/php-parallel-lint/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/php-parallel-lint/composer.lock
composer bin php-parallel-lint install --no-progress

vendor-bin/php-parallel-lint/composer.lock: vendor-bin/php-parallel-lint/composer.json
@echo php-parallel-lint composer.lock is not up to date.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ git clone https://github.com/owncloud/testing.git
php occ app:enable testing
```


## Publish latest version as github release

The latest published version can be found at https://github.com/owncloud/testing/releases/tag/latest

In order to update the latest version to be available, we need to move the github tag to a new HEAD.
Once the tag `latest` is pushed to github, drone-ci will build and publish the app to github
15 changes: 15 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "owncloud/testing",
"description": "ownCloud testing app",
"type": "owncloud-app",
"license": "AGPL",
"require": {},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.2"
},
"extra": {
"bamarni-bin": {
"bin-links": false
}
}
}
57 changes: 57 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions vendor-bin/php-parallel-lint/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require": {
"jakub-onderka/php-parallel-lint": "^1.0"
}
}