Skip to content

Commit 6c939b8

Browse files
committed
Improve prompts
Fixes #115
1 parent 41fd73b commit 6c939b8

File tree

12 files changed

+24
-24
lines changed

12 files changed

+24
-24
lines changed

.github/workflows/release.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
name: macos-latest
9898
path: _release/platform-darwin-x64
9999

100-
- name: Create archives for Github release
100+
- name: Create archives for GitHub release
101101
run: |
102102
cd _release/platform-darwin-x64
103103
zip -r ../../spin-darwin-x64.zip .
@@ -107,7 +107,7 @@ jobs:
107107
zip -r ../../spin-linux-x64.zip .
108108
cd ../..
109109
110-
- name: Upload spin-darwin-x64.zip to Github release
110+
- name: Upload spin-darwin-x64.zip to GitHub release
111111
uses: actions/upload-release-asset@v1
112112
env:
113113
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -117,7 +117,7 @@ jobs:
117117
asset_name: spin-darwin-x64.zip
118118
asset_content_type: application/gzip
119119

120-
- name: Upload spin-linux-x64.zip to Github release
120+
- name: Upload spin-linux-x64.zip to GitHub release
121121
uses: actions/upload-release-asset@v1
122122
env:
123123
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -127,7 +127,7 @@ jobs:
127127
asset_name: spin-linux-x64.zip
128128
asset_content_type: application/gzip
129129

130-
- name: Upload spin-windows-x64.zip to Github release
130+
- name: Upload spin-windows-x64.zip to GitHub release
131131
uses: actions/upload-release-asset@v1
132132
env:
133133
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Since the beginning of the project, a lot of learnings have been made and this n
130130

131131
## Added
132132

133-
- Support user configuration file that stores general configuration such as the user's name, Github author_name, etc.
133+
- Support user configuration file that stores general configuration such as the user's name, GitHub author_name, etc.
134134
- Provide a `config` subcommand that can be used to change the user configuration.
135135
- The generators can now print a message when the generation succeeds with the `message` stanza.
136136

lib/spin/template.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ let generate ~path:generation_root template =
278278
m
279279
"\n🏗️ Creating a new project from %a in %s"
280280
Pp.pp_blue
281-
template.name
281+
(String.trim template.name)
282282
generation_root);
283283
let normalized_raw_files =
284284
template.raw_files |> List.map File_generator.normalize_path

lib/spin/user_config.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ let prompt ?default:d () =
6464
in
6565
let github_username =
6666
Inquire.input
67-
"Your Github author_name"
67+
"Your GitHub username"
6868
?default:(Option.bind d (fun d -> d.github_username))
6969
~validate:validate_strip
7070
in

template/bin/spin

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
(description "Native project containing a binary")
33

44
(config project_name
5-
(input (prompt "Project name")))
5+
(input (prompt "Project name:")))
66

77
(config project_slug
8-
(input (prompt "Project slug"))
8+
(input (prompt "Project slug:"))
99
(default (slugify :project_name))
1010
(rules
1111
("The project slug must be lowercase and contain ASCII characters and '-' only."
@@ -18,14 +18,14 @@
1818
(default true))
1919

2020
(config project_description
21-
(input (prompt "Description"))
21+
(input (prompt "Description:"))
2222
(default "A short, but powerful statement about your project")
2323
(rules
2424
("The last character of the description cannot be a \".\" to comply with Opam"
2525
(neq . (last_char :project_description)))))
2626

2727
(config author_name
28-
(input (prompt "Name of the author")))
28+
(input (prompt "Name of the author:")))
2929

3030
(config test_framework
3131
(select
@@ -36,22 +36,22 @@
3636
(config ci_cd
3737
(select
3838
(prompt "Which CI/CD do you use?")
39-
(values Github None))
40-
(default Github))
39+
(values GitHub None))
40+
(default GitHub))
4141

4242
(ignore
4343
(files test/*)
4444
(enabled_if (eq :test_framework None)))
4545

4646
(ignore
4747
(files github/*)
48-
(enabled_if (neq :ci_cd Github)))
48+
(enabled_if (neq :ci_cd GitHub)))
4949

5050
; We need to do this because Dune won't copy .github during build
5151
(post_gen
5252
(actions
5353
(run mv github .github))
54-
(enabled_if (eq :ci_cd Github)))
54+
(enabled_if (eq :ci_cd GitHub)))
5555

5656
(post_gen
5757
(actions

template/bin/template/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# {{ project_name }}
22

3-
{%- if ci_cd == 'Github' and github_username %}
3+
{%- if ci_cd == 'GitHub' and github_username %}
44

55
[![Actions Status](https://github.com/{{ github_username }}/{{ project_slug }}/workflows/CI/badge.svg)](https://github.com/{{ github_username }}/{{ project_slug }}/actions)
66
{%- endif %}

template/c-bindings/template/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# {{ project_name }}
22

3-
{%- if ci_cd == 'Github' and github_username %}
3+
{%- if ci_cd == 'GitHub' and github_username %}
44

55
[![Actions Status](https://github.com/{{ github_username }}/{{ project_slug }}/workflows/CI/badge.svg)](https://github.com/{{ github_username }}/{{ project_slug }}/actions)
66
{%- endif %}

template/cli/template/CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ The, you can run the script `script/release.sh`. The script will perform the fol
5656

5757
- Create a tag with the version found in `{{ project_slug }}.opam`, and push it to your repository.
5858
- Create the distribution archive.
59-
- Publish the distribution archive to a Github Release.
59+
- Publish the distribution archive to a GitHub Release.
6060
- Submit a PR on Opam's repository.
6161

62-
When the release is published on Github, the CI/CD will trigger the `Release` workflow which will compile binaries for all supported platforms and add them to the Github Release as assets.
62+
When the release is published on GitHub, the CI/CD will trigger the `Release` workflow which will compile binaries for all supported platforms and add them to the GitHub Release as assets.
6363

6464
### Repository Structure
6565

@@ -68,7 +68,7 @@ The following snippet describes {{ project_name }}'s repository structure.
6868
```text
6969
.
7070
├── .github/
71-
| Contains Github specific files such as actions definitions and issue templates.
71+
| Contains GitHub specific files such as actions definitions and issue templates.
7272
7373
├── bin/
7474
| Source for {{ project_name }}'s binary. This links to the library defined in `lib/`.

template/cli/template/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# {{ project_name }}
22

3-
{%- if ci_cd == 'Github' and github_username %}
3+
{%- if ci_cd == 'GitHub' and github_username %}
44

55
[![Actions Status](https://github.com/{{ github_username }}/{{ project_slug }}/workflows/CI/badge.svg)](https://github.com/{{ github_username }}/{{ project_slug }}/actions)
66
{%- endif %}

template/js/template/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# {{ project_name }}
22

3-
{%- if ci_cd == 'Github' and github_username %}
3+
{%- if ci_cd == 'GitHub' and github_username %}
44

55
[![Actions Status](https://github.com/{{ github_username }}/{{ project_slug }}/workflows/CI/badge.svg)](https://github.com/{{ github_username }}/{{ project_slug }}/actions)
66
{%- endif %}

template/lib/template/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# {{ project_name }}
22

3-
{%- if ci_cd == 'Github' and github_username %}
3+
{%- if ci_cd == 'GitHub' and github_username %}
44

55
[![Actions Status](https://github.com/{{ github_username }}/{{ project_slug }}/workflows/CI/badge.svg)](https://github.com/{{ github_username }}/{{ project_slug }}/actions)
66
{%- endif %}

template/ppx/template/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# {{ project_name }}
22

3-
{%- if ci_cd == 'Github' and github_username %}
3+
{%- if ci_cd == 'GitHub' and github_username %}
44

55
[![Actions Status](https://github.com/{{ github_username }}/{{ project_slug }}/workflows/CI/badge.svg)](https://github.com/{{ github_username }}/{{ project_slug }}/actions)
66
{%- endif %}

0 commit comments

Comments
 (0)