-
-
Notifications
You must be signed in to change notification settings - Fork 35
Migrate from Spago 0.21.0 to Spago 1.0.3 #323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
2c14205
6df769a
cc04714
1271450
d7fd062
0de23da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,23 +1,21 @@ | ||||||
| #!/usr/bin/env bash | ||||||
|
|
||||||
| # This script will update spago.dhall and package.dhall of all exercises | ||||||
| # This script will update spago.yaml and .gitignore of all exercises | ||||||
| # using the master files from the project template (template/). | ||||||
|
|
||||||
| set -e | ||||||
| set -o pipefail | ||||||
| set -u | ||||||
|
|
||||||
| base_dir=$(builtin cd "${BASH_SOURCE%/*}/.." || exit; pwd) | ||||||
| exercises_dir="${base_dir}/exercises" | ||||||
| template_dir="${base_dir}/template" | ||||||
|
|
||||||
| for config in "$exercises_dir"/*/*/spago.dhall; do | ||||||
| exercise_dir=$(dirname "${config}") | ||||||
| for exercise_dir in "$base_dir"/exercises/*/*; do | ||||||
| [ -d "${exercise_dir}" ] || continue | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| slug=$(basename "${exercise_dir}") | ||||||
|
|
||||||
| echo "Working in ${exercise_dir}..." | ||||||
|
|
||||||
| sed -e "s/exercise-template/${slug}/" < "${template_dir}/spago.dhall" > "${exercise_dir}/spago.dhall" | ||||||
| cp "${template_dir}/packages.dhall" "${exercise_dir}/packages.dhall" | ||||||
| sed -e "s/exercise-template/${slug}/" < "${template_dir}/spago.yaml" > "${exercise_dir}/spago.yaml" | ||||||
| cp "${template_dir}/.gitignore" "${exercise_dir}/.gitignore" | ||||||
| done | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,5 @@ | ||
| /bower_components/ | ||
| /node_modules/ | ||
| /.pulp-cache/ | ||
| /output/ | ||
| /generated-docs/ | ||
| /.psc-package/ | ||
| /.psc* | ||
| /.purs* | ||
| /.psa* | ||
| /.spago | ||
| /.spago/ | ||
| /spago.lock | ||
| /.purs-repl |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package: | ||
| name: annalyns-infiltration | ||
| dependencies: | ||
| - arrays | ||
| - console | ||
| - datetime | ||
| - effect | ||
| - either | ||
| - enums | ||
| - exceptions | ||
| - foldable-traversable | ||
| - integers | ||
| - lists | ||
| - maybe | ||
| - numbers | ||
| - ordered-collections | ||
| - partial | ||
| - prelude | ||
| - psci-support | ||
| - strings | ||
| - test-unit | ||
| - tuples | ||
| - unfoldable | ||
| - unicode | ||
| test: | ||
| main: Test.Main | ||
| dependencies: [] | ||
| workspace: | ||
| packageSet: | ||
| registry: 73.0.0 | ||
| extraPackages: {} |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is there a per-exercise
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's a good idea to have exercise-scoped .gitignore because if someone downloads an independent exercise, we don't know what context it might exist in, as someone could want to work on an exercise within their own Git repo, so being self-contained guarantees that the right things will be ignored. BTW, this PR is a mess because I screwed things up, so I'm preparing to address other stuff and create a new PR when I'm ready.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I meant, the test runner one, where I have a new one exercism/purescript-test-runner#64
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. None (or very few) of the other tracks use per-exercise
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do think packaging directories with their own scoped .gitignore is the best way to go, and that it's a mistake that it's not a standard practice throughout Exercism. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,5 @@ | ||
| /bower_components/ | ||
| /node_modules/ | ||
| /.pulp-cache/ | ||
| /output/ | ||
| /generated-docs/ | ||
| /.psc-package/ | ||
| /.psc* | ||
| /.purs* | ||
| /.psa* | ||
| /.spago | ||
| /.spago/ | ||
| /spago.lock | ||
| /.purs-repl |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package: | ||
| name: accumulate | ||
| dependencies: | ||
| - arrays | ||
| - console | ||
| - datetime | ||
| - effect | ||
| - either | ||
| - enums | ||
| - exceptions | ||
| - foldable-traversable | ||
| - integers | ||
| - lists | ||
| - maybe | ||
| - numbers | ||
| - ordered-collections | ||
| - partial | ||
| - prelude | ||
| - psci-support | ||
| - strings | ||
| - test-unit | ||
| - tuples | ||
| - unfoldable | ||
| - unicode | ||
| test: | ||
| main: Test.Main | ||
| dependencies: [] | ||
| workspace: | ||
| packageSet: | ||
| registry: 73.0.0 | ||
| extraPackages: {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,5 @@ | ||
| /bower_components/ | ||
| /node_modules/ | ||
| /.pulp-cache/ | ||
| /output/ | ||
| /generated-docs/ | ||
| /.psc-package/ | ||
| /.psc* | ||
| /.purs* | ||
| /.psa* | ||
| /.spago | ||
| /.spago/ | ||
| /spago.lock | ||
| /.purs-repl |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package: | ||
| name: acronym | ||
| dependencies: | ||
| - arrays | ||
| - console | ||
| - datetime | ||
| - effect | ||
| - either | ||
| - enums | ||
| - exceptions | ||
| - foldable-traversable | ||
| - integers | ||
| - lists | ||
| - maybe | ||
| - numbers | ||
| - ordered-collections | ||
| - partial | ||
| - prelude | ||
| - psci-support | ||
| - strings | ||
| - test-unit | ||
| - tuples | ||
| - unfoldable | ||
| - unicode | ||
| test: | ||
| main: Test.Main | ||
| dependencies: [] | ||
| workspace: | ||
| packageSet: | ||
| registry: 73.0.0 | ||
| extraPackages: {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,5 @@ | ||
| /bower_components/ | ||
| /node_modules/ | ||
| /.pulp-cache/ | ||
| /output/ | ||
| /generated-docs/ | ||
| /.psc-package/ | ||
| /.psc* | ||
| /.purs* | ||
| /.psa* | ||
| /.spago | ||
| /.spago/ | ||
| /spago.lock | ||
| /.purs-repl |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For supply-chain security and consistency with the pinned
actions/checkoutandsetup-purescriptsteps,actions/setup-nodeshould be pinned to a specific commit SHA instead of a mutable@v4tag.