Skip to content

Commit

Permalink
Updated legacy build.
Browse files Browse the repository at this point in the history
  • Loading branch information
klaussilveira committed Jan 15, 2022
1 parent b2338c7 commit 28827c6
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 4 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/php.yml → .github/workflows/legacy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: build
name: Legacy Build

on:
push:
branches: [ master ]
branches: [ legacy ]

pull_request:
branches: [ master ]
branches: [ legacy ]

jobs:
build:
Expand Down Expand Up @@ -37,3 +38,23 @@ jobs:

- name: Run test suite
run: composer run-script test

release:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build package
run: make build

- name: Rename package to current tag
run: mv build.zip gitlist-${{ github.ref_name }}.zip

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
files: gitlist-${{ github.ref_name }}.zip
46 changes: 46 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.PHONY: help build
.DEFAULT_GOAL := help
NAME := gitlist
VERSION := $(shell git show -s --format=%h)

help: # Display the application manual
@echo -e "$(NAME) version \033[33m$(VERSION)\n\e[0m"
@echo -e "\033[1;37mUSAGE\e[0m"
@echo -e " \e[4mmake\e[0m <command> [<arg1>] ... [<argN>]\n"
@echo -e "\033[1;37mAVAILABLE COMMANDS\e[0m"
@grep -E '^[a-zA-Z_-]+:.*?# .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?# "}; {printf " \033[32m%-20s\033[0m %s\n", $$1, $$2}'

check-deps:
@if ! [ -x "$$(command -v composer)" ]; then\
echo -e '\n\033[0;31mcomposer is not installed.';\
exit 1;\
else\
echo -e "\033[0;32mcomposer installed\033[0m";\
fi

setup: check-deps # Setup dependencies and development configuration
composer install

test: # Run automated test suite
$(EXEC_PHP) composer test

build: # Build application package
@rm -rf vendor/
@composer install --ignore-platform-reqs --no-dev --no-scripts -o
@zip ./build.zip \
-r * .[^.]* \
-x '.github/*' \
-x 'cache/*' \
-x 'logo/*' \
-x 'tests/*' \
-x 'pkg_builder/*' \
-x 'build.xml' \
-x '.git/*' \
-x '.gitignore' \
-x '.php-cs-fixer.cache' \
-x '.php-cs-fixer.php' \
-x '.phpunit.result.cache' \
-x 'composer.json' \
-x 'composer.lock' \
-x 'Makefile' \
-x 'phpunit.xml.dist' \
2 changes: 1 addition & 1 deletion themes/default/twig/footer.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<footer>
<p>Powered by <a href="https://github.com/klaussilveira/gitlist">GitList 1.0.2</a></p>
<p>Powered by <a href="https://github.com/klaussilveira/gitlist">GitList (legacy)</a></p>
</footer>

0 comments on commit 28827c6

Please sign in to comment.