Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Ntfy_archive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Ntfy_archive
Commits
2edb722c
Commit
2edb722c
authored
3 years ago
by
Philipp Heckel
Browse files
Options
Downloads
Patches
Plain Diff
Refinement
parent
1f75498d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
docs/develop.md
+15
-8
15 additions, 8 deletions
docs/develop.md
with
16 additions
and
9 deletions
Makefile
+
1
−
1
View file @
2edb722c
...
@@ -193,7 +193,7 @@ release-check-tags:
...
@@ -193,7 +193,7 @@ release-check-tags:
exit
1
;
\
exit
1
;
\
fi
fi
if
!
grep
-q
$(
LATEST_TAG
)
docs/releases.md
;
then
\
if
!
grep
-q
$(
LATEST_TAG
)
docs/releases.md
;
then
\
echo
"ERROR: Must update docs/releases.mdwith latest tag first."
;
\
echo
"ERROR: Must update docs/releases.md
with latest tag first."
;
\
exit
1
;
\
exit
1
;
\
fi
fi
...
...
This diff is collapsed.
Click to expand it.
docs/develop.md
+
15
−
8
View file @
2edb722c
...
@@ -127,7 +127,7 @@ you can simply run `make build`:
...
@@ -127,7 +127,7 @@ you can simply run `make build`:
$
make build
$
make build
...
...
# This builds web app, docs, and the ntfy binary (for amd64, armv7 and arm64).
# This builds web app, docs, and the ntfy binary (for amd64, armv7 and arm64).
# This will be SLOW (
1
+ minutes on my laptop). Maybe look at the other make targets?
# This will be SLOW (
5
+ minutes on my laptop
on the first run
). Maybe look at the other make targets?
```
```
You'll see all the outputs in the
`dist/`
folder afterwards:
You'll see all the outputs in the
`dist/`
folder afterwards:
...
@@ -178,20 +178,27 @@ $ make server-amd64 install-amd64
...
@@ -178,20 +178,27 @@ $ make server-amd64 install-amd64
$
ntfy serve
$
ntfy serve
```
```
During development of the main app, you can also just use
`go run main.go`
(
as long as you run
`make server-deps-static-sites`
**
During development of the main app, you can also just use `go run main.go`
**
,
as long as you run
at least once), otherwise you'll see this
:
`make server-deps-static-sites`
at least once and
`CGO_ENABLED=1`
:
```
shell
```
shell
# Error because docs/web folder is missing
$
export
CGO_ENABLED
=
1
$
go run main.go serve
server/server.go:85:13: pattern docs: no matching files found
# Works!
$
make server-deps-static-sites
$
make server-deps-static-sites
$
go run main.go serve
$
go run main.go serve
2022/03/18 08:43:55 Listening on :2586[http]
2022/03/18 08:43:55 Listening on :2586[http]
...
```
If you don't run
`server-deps-static-sites`
, you may see an error
*`pattern ...: no matching files found`*
:
```
```
$ go run main.go serve
server/server.go:85:13: pattern docs: no matching files found
```
This is because we use
`go:embed`
to embed the documentation and web app, so the Go code expects files to be
present at
`server/docs`
and
`server/site`
. If they are not, you'll see the above error. The
`server-deps-static-sites`
target creates dummy files that ensures that you'll be able to build.
### Build the web app
### Build the web app
The sources for the web app live in
`web/`
. As long as you have
`npm`
installed (see above), building the web app
The sources for the web app live in
`web/`
. As long as you have
`npm`
installed (see above), building the web app
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment