Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,17 @@ jobs:
run: mkdir -p ./geol-build/linux ./geol-build/darwin ./geol-build/windows

- name: Download Linux artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
with:
name: geol-linux-artifacts
path: ./geol-build/linux
- name: Download macOS artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
with:
name: geol-darwin-artifacts
path: ./geol-build/darwin
- name: Download Windows artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
with:
name: geol-windows-artifacts
path: ./geol-build/windows
Expand Down
4 changes: 4 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
version: "3"

tasks:
default:
cmds:
- task: build

build:
desc: Build the app
cmds:
Expand Down
6 changes: 3 additions & 3 deletions _site/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {themes as prismThemes} from 'prism-react-renderer';

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'geol',
title: 'geol - Software End-of-Life Management Tool',
tagline: 'Software End Of Life management is too important to be boring',
// Favicon (restored to original image)
favicon: 'img/logo-no-name-gradient.png',
Expand Down Expand Up @@ -61,11 +61,11 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({
metadata: [
{name: 'description', content: 'geol — manage software end-of-life and track supported versions.'},
{name: 'description', content: 'geol - Efficiently show and monitor end-of-life dates for a number of products in your terminal and CI using endoflife.date API'},
{name: 'og:site_name', content: 'geol'},
{name: 'og:type', content: 'website'},
{name: 'twitter:card', content: 'summary_large_image'},
{name: 'og:description', content: 'geol — manage software end-of-life and track supported versions.'},
{name: 'og:description', content: 'geol - Efficiently show and monitor end-of-life dates for a number of products in your terminal and CI using endoflife.date API'},
],
image: 'img/geol.png',
colorMode: { respectPrefersColorScheme: true },
Expand Down
64 changes: 32 additions & 32 deletions cmd/exports/duckdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,13 @@ func createAboutTable(db *sql.DB) error {

// Create 'about' table if not exists
_, err := db.Exec(`CREATE TABLE IF NOT EXISTS about (
git_version TEXT,
git_commit TEXT,
go_version TEXT,
platform TEXT,
github_url TEXT,
generated_at TIMESTAMP DEFAULT date_trunc('second', CURRENT_TIMESTAMP AT TIME ZONE 'UTC'),
generated_at_tz TIMESTAMPTZ DEFAULT date_trunc('second', CURRENT_TIMESTAMP)
git_version TEXT NOT NULL,
git_commit TEXT NOT NULL,
go_version TEXT NOT NULL,
platform TEXT NOT NULL,
github_url TEXT NOT NULL,
generated_at TIMESTAMP DEFAULT date_trunc('second', CURRENT_TIMESTAMP AT TIME ZONE 'UTC') NOT NULL,
generated_at_tz TIMESTAMPTZ DEFAULT date_trunc('second', CURRENT_TIMESTAMP) NOT NULL
)`)
if err != nil {
return fmt.Errorf("error creating 'about' table: %w", err)
Expand Down Expand Up @@ -347,7 +347,7 @@ func createTempDetailsTable(db *sql.DB, allData *productDataMap) error {
// Create 'details_temp' table if not exists
_, err := db.Exec(`CREATE TEMP TABLE IF NOT EXISTS details_temp (
product_id TEXT,
cycle TEXT,
release_cycle TEXT,
is_lts BOOLEAN,
release TEXT,
latest TEXT,
Expand Down Expand Up @@ -398,7 +398,7 @@ func createTempDetailsTable(db *sql.DB, allData *productDataMap) error {
if prodData, exists := allData.Products[productID]; exists {
// Insert each release into the details_temp table
for _, release := range prodData.Releases {
_, err = db.Exec(`INSERT INTO details_temp (product_id, cycle, is_lts, release, latest, latest_release, eol)
_, err = db.Exec(`INSERT INTO details_temp (product_id, release_cycle, is_lts, release, latest, latest_release, eol)
VALUES (?, ?, ?, ?, ?, ?, ?)`,
productID,
release.Name,
Expand All @@ -423,14 +423,14 @@ func createTempDetailsTable(db *sql.DB, allData *productDataMap) error {
func createDetailsTable(db *sql.DB) error {
// Create 'details' table with DATE columns for release_date, latest_release_date, and eol
_, err := db.Exec(`CREATE TABLE IF NOT EXISTS details (
product_id TEXT,
cycle TEXT,
is_lts BOOLEAN,
release_date DATE,
latest TEXT,
product_id TEXT NOT NULL,
release_cycle TEXT NOT NULL,
is_lts BOOLEAN NOT NULL,
release_date DATE NOT NULL,
latest TEXT NOT NULL,
latest_release_date DATE,
eol_date DATE,
PRIMARY KEY (product_id, cycle),
PRIMARY KEY (product_id, release_cycle),
FOREIGN KEY (product_id) REFERENCES products(id)
)`)
if err != nil {
Expand All @@ -439,10 +439,10 @@ func createDetailsTable(db *sql.DB) error {
}

// Insert data from details_temp, converting empty strings to NULL and casting to DATE
_, err = db.Exec(`INSERT INTO details (product_id, cycle, is_lts, release_date, latest, latest_release_date, eol_date)
_, err = db.Exec(`INSERT INTO details (product_id, release_cycle, is_lts, release_date, latest, latest_release_date, eol_date)
SELECT
product_id,
cycle,
release_cycle,
is_lts,
CASE WHEN release = '' THEN NULL ELSE TRY_CAST(release AS DATE) END,
latest,
Expand All @@ -465,7 +465,7 @@ func createDetailsTable(db *sql.DB) error {
// Add comments to 'details' table columns
_, err = db.Exec(`
COMMENT ON COLUMN details.product_id IS '` + CommentColDetailsProductID + `';
COMMENT ON COLUMN details.cycle IS '` + CommentColDetailsCycle + `';
COMMENT ON COLUMN details.release_cycle IS '` + CommentColDetailsCycle + `';
COMMENT ON COLUMN details.is_lts IS '` + CommentColDetailsIsLTS + `';
COMMENT ON COLUMN details.release_date IS '` + CommentColDetailsReleaseDate + `';
COMMENT ON COLUMN details.latest IS '` + CommentColDetailsLatest + `';
Expand All @@ -486,10 +486,10 @@ func createDetailsTable(db *sql.DB) error {
func createProductsTable(db *sql.DB, allData *productDataMap) error {
// Create 'products' table if not exists
_, err := db.Exec(`CREATE TABLE IF NOT EXISTS products (
id TEXT PRIMARY KEY,
label TEXT,
category_id TEXT,
uri TEXT,
id TEXT PRIMARY KEY NOT NULL,
label TEXT NOT NULL,
category_id TEXT NOT NULL,
uri TEXT NOT NULL,
FOREIGN KEY (category_id) REFERENCES categories(id)
)`)
if err != nil {
Expand Down Expand Up @@ -575,8 +575,8 @@ func createProductsTable(db *sql.DB, allData *productDataMap) error {
func createAliasesTable(db *sql.DB, allData *productDataMap) error {
// Create 'aliases' table if not exists
_, err := db.Exec(`CREATE TABLE IF NOT EXISTS aliases (
id TEXT,
product_id TEXT,
id TEXT NOT NULL,
product_id TEXT NOT NULL,
PRIMARY KEY (id, product_id),
FOREIGN KEY (product_id) REFERENCES products(id)
)`)
Expand Down Expand Up @@ -683,9 +683,9 @@ func createAliasesTable(db *sql.DB, allData *productDataMap) error {
func createProductIdentifiersTable(db *sql.DB, allData *productDataMap) error {
// Create 'product_identifiers' table if not exists
_, err := db.Exec(`CREATE TABLE IF NOT EXISTS product_identifiers (
product_id TEXT,
identifier_type TEXT,
identifier_value TEXT,
product_id TEXT NOT NULL,
identifier_type TEXT NOT NULL,
identifier_value TEXT NOT NULL,
PRIMARY KEY (product_id, identifier_type, identifier_value),
FOREIGN KEY (product_id) REFERENCES products(id)
)`)
Expand Down Expand Up @@ -805,8 +805,8 @@ func createTagsTable(db *sql.DB, allTags map[string]utilities.Tag) error {
// Create 'tags' table if not exists
_, err := db.Exec(`CREATE TABLE IF NOT EXISTS tags (
id TEXT PRIMARY KEY,
uri TEXT UNIQUE,
www TEXT
uri TEXT UNIQUE NOT NULL,
www TEXT NOT NULL
)`)
if err != nil {
log.Error().Err(err).Msg("Error creating 'tags' table")
Expand Down Expand Up @@ -887,7 +887,7 @@ func createCategoriesTable(db *sql.DB, allCategories map[string]utilities.Catego
// Create 'categories' table if not exists
_, err := db.Exec(`CREATE TABLE IF NOT EXISTS categories (
id TEXT PRIMARY KEY,
uri TEXT
uri TEXT NOT NULL
)`)
if err != nil {
log.Error().Err(err).Msg("Error creating 'categories' table")
Expand Down Expand Up @@ -962,8 +962,8 @@ func createCategoriesTable(db *sql.DB, allCategories map[string]utilities.Catego
func createProductTagsTable(db *sql.DB, allData *productDataMap) error {
// Create 'product_tags' table if not exists
_, err := db.Exec(`CREATE TABLE IF NOT EXISTS product_tags (
product_id TEXT,
tag_id TEXT,
product_id TEXT NOT NULL,
tag_id TEXT NOT NULL,
PRIMARY KEY (product_id, tag_id),
FOREIGN KEY (product_id) REFERENCES products(id),
FOREIGN KEY (tag_id) REFERENCES tags(id)
Expand Down
90 changes: 45 additions & 45 deletions cmd/exports/sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,52 +118,52 @@ func exportDuckDBToSQLite(db *sql.DB, sqlitePath string) error {
tableCreations := []string{
`CREATE TABLE sqlite_db.categories(
id TEXT PRIMARY KEY,
uri TEXT
uri TEXT NOT NULL
)`,
`CREATE TABLE sqlite_db.tags(
id TEXT PRIMARY KEY,
uri TEXT UNIQUE,
www TEXT
uri TEXT UNIQUE NOT NULL,
www TEXT NOT NULL
)`,
`CREATE TABLE sqlite_db.about(
git_version TEXT,
git_commit TEXT,
go_version TEXT,
platform TEXT,
github_url TEXT,
generated_at TEXT,
generated_at_tz TEXT
git_version TEXT NOT NULL,
git_commit TEXT NOT NULL,
go_version TEXT NOT NULL,
platform TEXT NOT NULL,
github_url TEXT NOT NULL,
generated_at TEXT NOT NULL,
generated_at_tz TEXT NOT NULL
)`,
`CREATE TABLE sqlite_db.products(
id TEXT PRIMARY KEY,
label TEXT,
category_id TEXT,
uri TEXT
id TEXT PRIMARY KEY NOT NULL,
label TEXT NOT NULL,
category_id TEXT NOT NULL,
uri TEXT NOT NULL
)`,
`CREATE TABLE sqlite_db.aliases(
id TEXT,
product_id TEXT,
id TEXT NOT NULL,
product_id TEXT NOT NULL,
PRIMARY KEY(id, product_id)
)`,
`CREATE TABLE sqlite_db.details(
product_id TEXT,
cycle TEXT,
is_lts INTEGER,
release_date TEXT,
latest TEXT,
product_id TEXT NOT NULL,
release_cycle TEXT NOT NULL,
is_lts INTEGER NOT NULL,
release_date TEXT NOT NULL,
latest TEXT NOT NULL,
latest_release_date TEXT,
eol_date TEXT,
PRIMARY KEY(product_id, cycle)
PRIMARY KEY(product_id, release_cycle)
)`,
`CREATE TABLE sqlite_db.product_identifiers(
product_id TEXT,
identifier_type TEXT,
identifier_value TEXT,
product_id TEXT NOT NULL,
identifier_type TEXT NOT NULL,
identifier_value TEXT NOT NULL,
PRIMARY KEY(product_id, identifier_type, identifier_value)
)`,
`CREATE TABLE sqlite_db.product_tags(
product_id TEXT,
tag_id TEXT,
product_id TEXT NOT NULL,
tag_id TEXT NOT NULL,
PRIMARY KEY(product_id, tag_id)
)`,
}
Expand Down Expand Up @@ -197,7 +197,7 @@ func exportDuckDBToSQLite(db *sql.DB, sqlitePath string) error {

`INSERT INTO sqlite_db.details
SELECT
product_id, cycle,
product_id, release_cycle,
CAST(is_lts AS INTEGER),
CAST(release_date AS VARCHAR),
latest,
Expand Down Expand Up @@ -253,10 +253,10 @@ func addSQLiteForeignKeys(sqlitePath string) error {
statements: []string{
"ALTER TABLE products RENAME TO products_old",
`CREATE TABLE products(
id TEXT PRIMARY KEY,
label TEXT,
category_id TEXT,
uri TEXT,
id TEXT PRIMARY KEY NOT NULL,
label TEXT NOT NULL,
category_id TEXT NOT NULL,
uri TEXT NOT NULL,
FOREIGN KEY (category_id) REFERENCES categories(id)
)`,
"INSERT INTO products SELECT * FROM products_old",
Expand All @@ -268,8 +268,8 @@ func addSQLiteForeignKeys(sqlitePath string) error {
statements: []string{
"ALTER TABLE aliases RENAME TO aliases_old",
`CREATE TABLE aliases(
id TEXT,
product_id TEXT,
id TEXT NOT NULL,
product_id TEXT NOT NULL,
PRIMARY KEY(id, product_id),
FOREIGN KEY (product_id) REFERENCES products(id)
)`,
Expand All @@ -282,14 +282,14 @@ func addSQLiteForeignKeys(sqlitePath string) error {
statements: []string{
"ALTER TABLE details RENAME TO details_old",
`CREATE TABLE details(
product_id TEXT,
cycle TEXT,
is_lts INTEGER,
release_date TEXT,
latest TEXT,
product_id TEXT NOT NULL,
release_cycle TEXT NOT NULL,
is_lts INTEGER NOT NULL,
release_date TEXT NOT NULL,
latest TEXT NOT NULL,
latest_release_date TEXT,
eol_date TEXT,
PRIMARY KEY(product_id, cycle),
PRIMARY KEY(product_id, release_cycle),
FOREIGN KEY (product_id) REFERENCES products(id)
)`,
"INSERT INTO details SELECT * FROM details_old",
Expand All @@ -301,9 +301,9 @@ func addSQLiteForeignKeys(sqlitePath string) error {
statements: []string{
"ALTER TABLE product_identifiers RENAME TO product_identifiers_old",
`CREATE TABLE product_identifiers(
product_id TEXT,
identifier_type TEXT,
identifier_value TEXT,
product_id TEXT NOT NULL,
identifier_type TEXT NOT NULL,
identifier_value TEXT NOT NULL,
PRIMARY KEY(product_id, identifier_type, identifier_value),
FOREIGN KEY (product_id) REFERENCES products(id)
)`,
Expand All @@ -316,8 +316,8 @@ func addSQLiteForeignKeys(sqlitePath string) error {
statements: []string{
"ALTER TABLE product_tags RENAME TO product_tags_old",
`CREATE TABLE product_tags(
product_id TEXT,
tag_id TEXT,
product_id TEXT NOT NULL,
tag_id TEXT NOT NULL,
PRIMARY KEY(product_id, tag_id),
FOREIGN KEY (product_id) REFERENCES products(id),
FOREIGN KEY (tag_id) REFERENCES tags(id)
Expand Down
2 changes: 1 addition & 1 deletion cmd/product/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"os"
"strings"

"charm.land/glamour/v2"
"charm.land/lipgloss/v2"
"github.com/charmbracelet/glamour/v2"
"github.com/opt-nc/geol/v2/utilities"
"github.com/phuslu/log"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cmd/product/product.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/http"
"strings"

"charm.land/glamour/v2"
"charm.land/lipgloss/v2"
"github.com/charmbracelet/glamour/v2"
"github.com/opt-nc/geol/v2/utilities"
"github.com/phuslu/log"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion geol_stack.cue
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ stack: [...{
// Set to true to mark products that your organization requires to be on the latest version.
// This allows you to get alerts when not using the most recent release
// and helps enforce up-to-date policies for critical components.
"always-latest"?: bool | *false
always-latest?: bool | *false
}]
Loading
Loading