Skip to content

Commit 47b735c

Browse files
Link to publish docs (#1120)
* Link to docs * Fix fixtures
1 parent 6a33fe3 commit 47b735c

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

β€Žsrc/Spago/Command/Publish.purs

+4-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,10 @@ publish _args = do
157157
buildPlan <- Fetch.getTransitiveDepsFromRegistry depsRanges Map.empty
158158

159159
case selected.package.publish of
160-
Nothing -> addError $ toDoc "Did not find publishing config: add a valid one in package.publish" -- TODO link to docs
160+
Nothing -> addError $ toDoc
161+
[ "Did not find publishing config: add a valid one in `package.publish`."
162+
, "See the configuration file's documentation: https://github.com/purescript/spago#the-configuration-file"
163+
]
161164
Just publishConfig -> case publishConfig.location of
162165
Nothing -> addError $ toDoc "Need to specify a publish.location field."
163166
Just location -> do

β€Žtest-fixtures/publish-main.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ Your package "aaa" is not ready for publishing yet, encountered 1 error:
1919
in its `src` directory. All package sources must be in the `src` directory,
2020
with any additional sources indicated by the `files` key in your manifest.
2121

22-
- src/Main.purs: Module name is Main but PureScript libraries cannot publish modules named: Main, Test.Main
22+
- src/Main.purs: Module name is Main but PureScript libraries cannot publish modules named: Main, Test.Main

β€Žtest-fixtures/publish-no-bounds.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ Errors 0 0 0
1414
Your package "aaaa" is not ready for publishing yet, encountered 2 errors:
1515

1616

17-
❌ Did not find publishing config: add a valid one in package.publish
17+
❌ Did not find publishing config: add a valid one in `package.publish`.
18+
See the configuration file's documentation: https://github.com/purescript/spago#the-configuration-file
1819

1920

2021
❌ The configuration is missing version bounds for some packages. Run `spago fetch --ensure-ranges` to add them:
2122
- console
2223
- effect
23-
- prelude
24+
- prelude

β€Žtest-fixtures/publish-no-config.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ Errors 0 0 0
1414
Your package "aaaa" is not ready for publishing yet, encountered 1 error:
1515

1616

17-
❌ Did not find publishing config: add a valid one in package.publish
17+
❌ Did not find publishing config: add a valid one in `package.publish`.
18+
See the configuration file's documentation: https://github.com/purescript/spago#the-configuration-file

β€Žtest-fixtures/publish-no-git.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ Your package "aaa" is not ready for publishing yet, encountered 1 error:
1717
❌ The git tree is not clean, or you haven't checked out the tag you want to publish.
1818
Please commit or stash your changes, and checkout the tag you want to publish.
1919
To create the tag, you can run:
20-
git tag v0.0.1
20+
git tag v0.0.1

β€Žtest-fixtures/publish.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ Errors 0 0 0
2424
βœ… Ready for publishing. Calling the registry..
2525

2626

27-
❌ Spago is offline - not able to call the Registry.
27+
❌ Spago is offline - not able to call the Registry.

0 commit comments

Comments
Β (0)