Skip to content

Commit

Permalink
make version file by gh action.
Browse files Browse the repository at this point in the history
  • Loading branch information
uzulla committed Mar 14, 2021
1 parent 81b1e12 commit 174c0c9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,17 @@ jobs:
- name: composer install
run: php composer.phar install --no-ansi --no-interaction --no-scripts --no-progress

- name: build zip
- name: pre build
run: |
cd dist_zip && make build
cd dist_zip && make pre-build
- name: create version file
run: |
cd dist_zip && echo ${{ github.ref }} > fc2blog/app/version
- name: make zip
run: |
cd dist_zip && make make-zip
- name: create release
id: create_release
Expand Down
13 changes: 13 additions & 0 deletions dist_zip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ build:
if [ ! -s fc2blog/app/version ]; then echo "dev:"`git branch --contains |cut -d " " -f 2 | grep -e '.'`":"`git rev-parse --short HEAD` > fc2blog/app/version; fi
cd fc2blog && zip -q -r ../fc2blog_dist.zip app public

.PHONY:
pre-build:
make clean
mkdir fc2blog
cp -a ../app ../public ../composer.json ../composer.lock fc2blog
-rm fc2blog/app/temp/installed.lock
cd fc2blog && php ../../composer.phar install --no-dev --optimize-autoloader
rm fc2blog/composer.*

.PHONY:
make-zip:
cd fc2blog && zip -r ../fc2blog_dist.zip app public

.PHONY:
build-no-pushed-branch:
make clean
Expand Down

0 comments on commit 174c0c9

Please sign in to comment.