Skip to content

Commit

Permalink
no composer dev pkgs in release, exclude .idea
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
  • Loading branch information
julien-nc committed Apr 1, 2024
1 parent 8097067 commit 85af157
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
extensions: mbstring, intl, sqlite3
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
tools: php-cs-fixer, phpunit

- name: Checkout code
uses: actions/checkout@v2
Expand Down Expand Up @@ -63,8 +62,6 @@ jobs:
php ~/html/nextcloud/occ app:enable ${APP_ID}
php ~/html/nextcloud/occ maintenance:mode --off
cd ~/html/nextcloud/apps/${APP_ID}
echo "###### make"
make
echo "###### make appstore"
tag=${{ steps.tag.outputs.currenttag }}
version=${tag/v/}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"psalm/phar": "^5.16",
"nextcloud/ocp": "dev-master",
"phpunit/phpunit": "^9.5",
"nextcloud/openapi-extractor": "dev-feat/openapitype/better-error-messages"
"nextcloud/openapi-extractor": "dev-main"
}
}
18 changes: 16 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build_dir=/tmp/build
sign_dir=/tmp/sign
cert_dir=$(HOME)/.nextcloud/certificates
webserveruser ?= www-data
occ_dir ?= /var/www/html/dev/server21
occ_dir ?= /var/www/html/dev/server

GITHUB_TOKEN := $(shell cat ~/.nextcloud/secrets/GITHUB_TOKEN | tr -d '\n')
GITHUB_REPO=julien-nc/cospend-nc
Expand Down Expand Up @@ -48,6 +48,18 @@ else
composer install --prefer-dist
endif

.PHONY: composer_release
composer_release:
ifeq (, $(composer))
@echo "No composer command available, downloading a copy from the web"
mkdir -p $(build_tools_directory)
curl -sS https://getcomposer.org/installer | php
mv composer.phar $(build_tools_directory)
php $(build_tools_directory)/composer.phar install --prefer-dist
else
composer install --no-dev -a
endif

.PHONY: npm
npm:
$(npm) ci
Expand All @@ -61,14 +73,16 @@ npm-dev:
clean:
sudo rm -rf $(build_dir)
sudo rm -rf $(sign_dir)
rm -rf js/* vendor

build_release: clean
build_release: clean composer_release npm
mkdir -p $(sign_dir)
mkdir -p $(build_dir)
@rsync -a \
--exclude=.git \
--exclude=appinfo/signature.json \
--exclude=*.swp \
--exclude=/.idea \
--exclude=build \
--exclude=.gitignore \
--exclude=.travis.yml \
Expand Down

0 comments on commit 85af157

Please sign in to comment.