Skip to content

Commit 627426f

Browse files
feat: Build for release
1 parent 2f826de commit 627426f

File tree

2 files changed

+31
-35
lines changed

2 files changed

+31
-35
lines changed

bin/setup.sh

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,45 @@
22

33
set -e
44

5-
rm -f .github/workflows/check_version.yml
6-
rm -f .github/workflows/ci.yml
7-
rm -f .github/workflows/gh_releases.yml
8-
rm -f .github/workflows/issue_opened.yml
9-
rm -f .github/workflows/pr_opened.yml
10-
rm -f .github/workflows/pr_updated.yml
11-
rm -f .github/workflows/project_card_moved.yml
12-
#rm -f .github/workflows/release.yml
13-
rm -f .github/workflows/sync-workflows.yml
14-
rm -f .github/workflows/toc.yml
15-
rm -f .github/workflows/update-dependencies.yml
16-
17-
rm -f .github/card-labeler.yml
18-
rm -f .github/config.yml
19-
rm -f .github/labeler.yml
20-
rm -f .github/no-response.yml
21-
rm -f .github/pr-labeler.yml
22-
rm -f .github/release-drafter.yml
23-
rm -f .github/stale.yml
24-
25-
rm -rdf .github/ISSUE_TEMPLATE
26-
27-
rm -f .github/CODE_OF_CONDUCT.md
28-
rm -f .github/CODEOWNERS
29-
rm -f .github/CONTRIBUTING.md
30-
rm -f .github/FUNDING.yml
31-
rm -f .github/pull_request_template.md
32-
33-
rm -f _config.yml
34-
rm -f README.md
35-
touch README.md
5+
echo "Owner: [= technote-space]"
6+
read -r OWNER
7+
if [[ -z "${OWNER}" ]]; then
8+
OWNER=technote-space
9+
fi
10+
11+
echo "Repo: "
12+
read -r REPO
13+
if [[ -z "${REPO}" ]]; then
14+
exit
15+
fi
16+
17+
echo "Repository: ${OWNER}/${REPO}"
18+
# shellcheck disable=SC2162
19+
read -n1 -p "ok? (y/N): " yn
20+
if [[ $yn != [yY] ]]; then
21+
exit
22+
fi
23+
24+
sed -i "s/technote-space/${OWNER}/g" .github/CODEOWNERS
25+
sed -i "s/technote-space/${OWNER}/g" README.md
26+
sed -i "s/gh-actions-template/${REPO}/g" README.md
27+
sed -i "s/technote-space\/gh-actions-template/${OWNER}\/${REPO}/g" package.json
28+
29+
if [[ "${OWNER}" != 'technote-space' ]]; then
30+
rm -f .github/FUNDING.yml
31+
rm -f _config.yml
32+
sed -i '25,100d' README.md
33+
fi
3634

3735
sed -i '/setup.sh/d' package.json
36+
touch __DELETE__
3837

3938
cat << EOS
4039
Please edit package.json
41-
- name
4240
- version
4341
- description
4442
- authoer
4543
- license
4644
- keywords
4745
- homepage
48-
- repository
49-
- bugs
5046
EOS

build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"owner":"technote-space","repo":"gh-actions-template","sha":"d47862d61d9d05564f04217256b5ead128164aa2","ref":"refs/tags/v0.1.2","tagName":"v0.1.2","branch":"gh-actions","tags":["v0.1.2","v0.1","v0"],"updated_at":"2020-02-12T05:15:54.359Z"}
1+
{"owner":"technote-space","repo":"gh-actions-template","sha":"2329f7c10229baf62ddeb053f01526441709661b","ref":"refs/tags/v0.1.3","tagName":"v0.1.3","branch":"gh-actions","tags":["v0.1.3","v0.1","v0"],"updated_at":"2020-02-12T07:34:11.373Z"}

0 commit comments

Comments
 (0)