From 353fb75d51fba06511a2e30c08c7eca77c56f6b0 Mon Sep 17 00:00:00 2001 From: Javi Aguilar <122741+itsjavi@users.noreply.github.com> Date: Sat, 31 Oct 2020 10:54:40 +0100 Subject: [PATCH] fix gh-pages publish cmd --- Dockerfile | 3 +++ Makefile | 7 +++++-- README.md | 5 +++-- src/scripts/install.sh | 3 +++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ed88a92..6dcb412 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,4 +7,7 @@ WORKDIR /app RUN apt-get update && \ apt-get install -y git zsh jq imagemagick ffmpeg pandoc +RUN git config --global user.email "noone@noone.local" && \ + git config --global user.name "No one" + ENTRYPOINT ["/app/src/scripts/run.sh"] diff --git a/Makefile b/Makefile index ef0306a..2107bce 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,11 @@ version: install: $(DC_RUN) install -publish: - $(DC_RUN) publish-gh-pages +publish-npm: + npm publish + +publish-pages: + ./src/scripts/publish-gh-pages.sh spritesheets: $(DC_RUN) generate-all-spritesheets diff --git a/README.md b/README.md index 99c1d5a..83012a4 100644 --- a/README.md +++ b/README.md @@ -67,13 +67,14 @@ You can find all data under [assets/data](https://github.com/itsjavi/pokemon-ass ## Maintenance -The only dependency you need to maintain this project is Docker and +The only dependencies you need to maintain this project are git, zsh, Docker and the ability to run `make` commands. The most important ones are: - `make install`: initializes the project dependencies, needed to build the assets. - `make build`: builds the assets. -- `make publish`: publishes to the gh-pages branch and to npm. This one needs remote permissions. +- `make publish-pages`: publishes the current assets to the gh-pages branch +- `make publish-npm`: publishes the current assets to npm with the current package.json version ## Credits diff --git a/src/scripts/install.sh b/src/scripts/install.sh index 36dddd1..bd58f1a 100755 --- a/src/scripts/install.sh +++ b/src/scripts/install.sh @@ -10,6 +10,9 @@ mkdir -p tmp assets rm -rf .gh-pages git clone -b gh-pages https://github.com/itsjavi/pokemon-assets.git .gh-pages +cd .gh-pages +git remote set-url --push origin git@github.com:itsjavi/pokemon-assets.git +cd .. rm -rf tmp/pandoc-css git clone https://gist.github.com/f77dbd6bbde10d255dfe6c8e1f830142.git tmp/pandoc-css