-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
108 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
default: | ||
just --list | ||
|
||
# construct 'future' git branch from stack | ||
git-future: | ||
#!/bin/bash | ||
set -eu -o pipefail | ||
|
||
git checkout future | ||
|
||
git reset --hard develop | ||
|
||
for branch in $@; do | ||
git merge $branch | ||
git commit || : | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,67 @@ | ||
CONFIG_JSON_PATH = "${APPDATA}/unofficial-homestuck-collection/config.json" | ||
|
||
.SECONDEXPANSION: | ||
.SUFFIXES: | ||
|
||
default: test | ||
|
||
## Setup | ||
|
||
yarn.lock: package.json | ||
yarn install # --ignore-optional | ||
touch yarn.lock | ||
|
||
# We do actually use a dummy install file to track this | ||
install: package.json yarn.lock | ||
yarn install --ignore-optional | ||
yarn install | ||
touch install | ||
|
||
## Prep actions | ||
|
||
.PHONY: clean | ||
clean: | ||
yarn cache clean | ||
-rm yarn-error.log | ||
-rm ./install src/imods.tar.gz | ||
-rm -r node_modules/.cache/ | ||
-rm -r dist/ dist_electron/*/ | ||
|
||
lint: install | ||
.PHONY: lint | ||
lint: install | ||
yarn run vue-cli-service lint | ||
# yarn lint | ||
|
||
|
||
## Intermediate files | ||
|
||
src/imods.tar.gz: $(wildcard src/imods/*) $(wildcard src/imods/*/*) | ||
# cd src && tar -czf imods.tar.gz imods/ | ||
cd src && tar -cf - imods/ | gzip -9 - > imods.tar.gz | ||
# -jq '.appVersion = "2.0.0"' ${CONFIG_JSON_PATH} > ${CONFIG_JSON_PATH}.tmp | ||
# -mv ${CONFIG_JSON_PATH}.tmp ${CONFIG_JSON_PATH} | ||
|
||
## Running live | ||
|
||
# Run 'SERVE_FLAGS="--reset-last-version" make src/imods.tar.gz test' to make imods and pass --reset-last-version through | ||
.PHONY: test | ||
test: install src/imods.tar.gz | ||
yarn run vue-cli-service electron:serve $(SERVE_FLAGS) | ||
# yarn dev | ||
|
||
|
||
## Building output | ||
|
||
.PHONY: build | ||
build: install src/imods.tar.gz | ||
yarn run vue-cli-service electron:build | ||
# yarn electron:build | ||
|
||
publish_release: install src/imods.tar.gz | ||
yarn run vue-cli-service electron:build -p always | ||
|
||
vuebuild: install src/imods.tar.gz | ||
yarn run vue-cli-service build | ||
|
||
src/imods.tar.gz: $(wildcard src/imods/*) $(wildcard src/imods/*/*) | ||
# cd src && tar -czf imods.tar.gz imods/ | ||
cd src && tar -cf - imods/ | gzip -9 - > imods.tar.gz | ||
# -jq '.appVersion = "2.0.0"' ${CONFIG_JSON_PATH} > ${CONFIG_JSON_PATH}.tmp | ||
# -mv ${CONFIG_JSON_PATH}.tmp ${CONFIG_JSON_PATH} | ||
.PHONY: publish-release | ||
publish-release: install src/imods.tar.gz | ||
yarn run vue-cli-service electron:build -p always | ||
|
||
.PHONY: help | ||
help: | ||
@echo 'Usage:' | ||
@echo ' make clean try to clean old build artifacts' | ||
@echo ' make test start a development version now' | ||
@echo ' make build create a production version' | ||
@echo ' make lint lints and fixes files' | ||
|
||
|
||
.PHONY: clean test build publish help lint test | ||
grep -E '(^[^.#[:space:]].*:)|(##)' Makefile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash -i | ||
|
||
set -eu -o pipefail | ||
|
||
mkdir -p github | ||
|
||
if ! gh auth status | grep -q 'read:project'; then | ||
(set -x; gh auth login --scopes read:project) | ||
fi | ||
|
||
( | ||
|
||
echo Saving PRs | ||
|
||
pr_out="github/pull_requests.json" | ||
# all_pr_fields="$(echo $(gh pr list --json 2>&1 | tail -n +2) | sed 's/ /,/g')" | ||
# gh pr list -L 50 --json "$all_pr_fields" | jq > $pr_out | ||
gh api repos/bambosh/unofficial-homestuck-collection/pulls --paginate > $pr_out | ||
|
||
logparam "Saved" $(jq '.|length' < "$pr_out") "pull requests to" "$pr_out" | ||
) | ||
|
||
( | ||
echo Saving Issues | ||
|
||
issue_out="github/issues.json" | ||
# all_issue_fields="$(echo $(gh issue list --json 2>&1 | tail -n +2) | sed 's/ /,/g')" | ||
# gh issue list -L 50 --json "$all_issue_fields" | jq > $issue_out | ||
gh api repos/bambosh/unofficial-homestuck-collection/issues --paginate > $issue_out | ||
|
||
logparam "Saved" $(jq '.|length' < "$issue_out") "issues to" "$issue_out" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters