Commit Graph

34 Commits

Author SHA1 Message Date
Amolith 90db8d55ea
correct div nesting in home HTML template 2023-10-30 18:46:10 -04:00
Amolith aa29366696
BREAKING-ish: SQL schema correction
While refactoring the schema yesterday, I forgot to add primary keys
back to the sessions and projects tables. Databases existing before
commit 984d44775b are fine and new
databases should be initialised correctly, but databases created between
commit 984d44775b and this one require
either SQL migrations or deleting willow.sqlite (which will remove all
users, projects, login sessions, etc.).

For the migrations, open the database with `sqlite3 willow.sqlite` and
paste the SQL statements below.

```
ALTER TABLE sessions RENAME TO sessions_bak;
CREATE TABLE sessions
(
    token      TEXT      NOT NULL PRIMARY KEY,
    username   TEXT      NOT NULL,
    expires    TIMESTAMP NOT NULL,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO sessions (token, username, expires, created_at)
    SELECT token, username, expires, created_at FROM sessions_bak;
ALTER TABLE projects RENAME TO projects_bak;
CREATE TABLE projects
(
    url        TEXT      NOT NULL PRIMARY KEY,
    name       TEXT      NOT NULL,
    forge      TEXT      NOT NULL,
    version    TEXT      NOT NULL,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO projects (url, name, forge, version, created_at)
    SELECT url, name, forge, version, created_at FROM projects_bak;
```

Assuming the statements execute without error, Willow starts up
correctly, and you can log in, you can safely drop open the database
again and drop the projects_bak and sessions_bak tables with

```
DROP TABLE projects_bak;
DROP TABLE sessions_bak;
```

---

References: https://todo.sr.ht/~amolith/willow/14
2023-10-30 18:41:48 -04:00
Amolith 181509faa8
adding padding to bottom 2023-10-29 15:37:47 -04:00
Amolith ff409eb72b
use different screenshot 2023-10-29 15:21:54 -04:00
Amolith 91434f43e1
update screenshot 2023-10-29 15:20:45 -04:00
Amolith d9bf2f6278
embed the inter font 2023-10-29 13:53:06 -04:00
Amolith 53705af5ce
bump go version and dependencies 2023-10-29 10:51:20 -04:00
Amolith 61c24da28a
correct minor webserver issues 2023-10-29 10:49:02 -04:00
Amolith 984d44775b
BREAKING: SQL schema change
- Redo schema to improve handling of lightweight tags
- Try to clean up empty directories when untracking a project

To resolve schema conflict, run `sqlite3 willow.sqlite` and paste the
following:

ALTER TABLE releases RENAME TO releases_bak;
CREATE TABLE releases
(
    id          TEXT      NOT NULL PRIMARY KEY,
    project_url TEXT      NOT NULL,
    release_url TEXT      NOT NULL,
    tag         TEXT      NOT NULL,
    content     TEXT      NOT NULL,
    date        TIMESTAMP NOT NULL,
    created_at  TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);

If everything works as expected, you can `DROP TABLE releases_bak`.
2023-10-29 10:41:00 -04:00
Amolith 3612ffc595
handle .git in RSS URLs and add missing returns 2023-10-28 23:40:07 -04:00
Amolith 67b88eafd3
correct spacing without new release 2023-10-28 23:30:19 -04:00
Amolith d0dd81602b
change project styling, add log out link 2023-10-28 23:17:41 -04:00
Amolith a30446940c
add copyright info to new files 2023-10-28 13:12:31 -04:00
Amolith a89c6a0bd8
add dev tool air 2023-10-28 13:12:30 -04:00
Amolith cbcbaca124
add dark mode, css reset and normalise links
Implements: https://todo.sr.ht/~amolith/willow/11
Implements: https://todo.sr.ht/~amolith/willow/10
2023-10-28 13:12:29 -04:00
Amolith 1755dcd526
update docs 2023-10-26 15:15:40 -04:00
Amolith 438f9fc7ae
finish implementing authentication 2023-10-25 20:16:36 -04:00
Amolith ef9544ff7d Beeg refactor for database and users and auth 2023-10-25 00:14:32 -04:00
Amolith c5f2fa0699 Make some options configurable
Implements: https://todo.sr.ht/~amolith/willow/4
2023-10-05 22:12:50 -04:00
Amolith 30063ade89
add .idea to gitignore 2023-09-26 16:23:11 -04:00
Amolith 8692d3ce79
refactor so var doesn't conflict with import 2023-09-26 16:23:10 -04:00
Amolith 7a1459f876
create projects.csv if doesn't exist
Implements: https://todo.sr.ht/~amolith/willow/2
2023-09-26 16:22:54 -04:00
Amolith b11accab0a
swap yoink with fetch 2023-09-26 15:33:43 -04:00
Amolith 61f56f5e80
improve httpServer error handling 2023-09-26 15:32:07 -04:00
Amolith 1750d9e0e0
move HTML template copyright to separate file
Implements: https://todo.sr.ht/~amolith/willow/1
2023-09-25 23:58:54 -04:00
Amolith 8590109249
update tagline 2023-09-24 17:34:48 -04:00
Amolith 9103ec5898
add contributing section to readme 2023-09-24 17:32:51 -04:00
Amolith d65a893962
check error returns 2023-09-24 17:08:00 -04:00
Amolith 9c3a304af8
add justfile and ci-lint config 2023-09-24 17:07:42 -04:00
Amolith 33c8319f38
comment out listRemoteTags 2023-09-24 17:02:00 -04:00
Amolith 887d89eacc
reuse compliance 2023-09-24 16:57:56 -04:00
Amolith e42cdeabca
add screenshot and update readme 2023-09-24 16:54:29 -04:00
Amolith 6fdef0357f
Fill out README 2023-09-21 22:26:56 -04:00
Amolith 2b60fc51da
initial sourcehut commit 2023-09-21 14:03:21 -04:00