Skip to content

Commit

Permalink
ci updated
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Apr 3, 2024
1 parent 97784ef commit 1bf1999
Show file tree
Hide file tree
Showing 18 changed files with 237 additions and 157 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/ci.yml
Expand Up @@ -29,8 +29,6 @@ jobs:
if: ${{ matrix.os != 'windows-latest' }}
run: clojure -M:cljfmt
shell: bash
- name: show git tag
run: clojure -M:garamond
- name: Install dependencies
run: |
clojure -X:goldly-build :profile '"npm-install"'
Expand All @@ -39,8 +37,6 @@ jobs:
# run: clojure -M:lint
#- name: test-clj
# run: clojure -M:test-clj
#- name: cloverage
# run: clojure -M:cloverage
- name: Release
if: success()
# if: github.event_name == 'push'
Expand All @@ -52,11 +48,5 @@ jobs:
git config --global user.email "ci@pinkgorilla.org"
git config --global user.name "CI/CD"
rm src/goldly_bindings_generated.cljs
clojure -M:release --patch
git push --tags
# clojure -M:release tag --minor
# clojure -M:release pom
# clojure -M:release jar
# clojure -M:release deploy
# lein release
# bash <(curl -s https://codecov.io/bash)
clojure -T:build jar
clojure -T:build deploy
50 changes: 50 additions & 0 deletions build.clj
@@ -0,0 +1,50 @@
(ns build
(:require
[babashka.fs :as fs]
[clojure.tools.build.api :as b]
[deps-deploy.deps-deploy :as dd]))

(def lib 'org.pinkgorilla/ui-input)
(def version (format "0.1.%s" (b/git-count-revs nil)))
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def jar-file (format "target/%s-%s.jar" (name lib) version))

(defn clean [_]
(b/delete {:path "target"}))

(def pom-template
[[:licenses
[:license
[:name "Eclipse Public License"]
[:url "https://www.eclipse.org/legal/epl-v10.html"]]]
[:developers
[:developer
[:name "pink-gorilla"]]]
[:scm
[:url "https://github.com/pink-gorilla/ui-input/"]
[:connection "scm:git:git://github.com/pink-gorilla/ui-input.git"]
[:developerConnection "scm:git:ssh://git@github.com/pink-gorilla/ui-input.git"]]])

(def opts {:class-dir class-dir
:lib lib
:version version
:basis basis
:pom-data pom-template
:src-dirs ["src"]})

(defn jar [_]
(b/write-pom opts)
(b/copy-dir {:src-dirs ["src"
"resources"]
:target-dir class-dir})
(b/jar {:class-dir class-dir
:jar-file jar-file}))

(defn deploy "Deploy the JAR to Clojars." [_]
(println "Deploying to Clojars..")
(dd/deploy {:installer :remote
;:sign-releases? true
:pom-file (b/pom-path (select-keys opts [:lib :class-dir]))
;:artifact "target/tech.ml.dataset.jar"
:artifact (b/resolve-path jar-file)}))
1 change: 1 addition & 0 deletions demo/deps.edn
Expand Up @@ -10,6 +10,7 @@
org.pinkgorilla/ui-input {:local/root "../" :deps/manifest :deps}
org.pinkgorilla/ui-repl {:mvn/version "0.0.73"} ; reagent
org.pinkgorilla/devtools {:mvn/version "0.0.18"} ; devtools
org.pinkgorilla/ui-site {:mvn/version "0.0.29"} ; ipsum
}

:aliases
Expand Down
2 changes: 1 addition & 1 deletion demo/resources/ext/app.edn
Expand Up @@ -9,7 +9,7 @@
"layout-viewport-lrm" demo.page.spaces/spaces-layout-lrm-viewport-page
"layout-fixed-lrt" demo.page.spaces/spaces-layout-lrt-fixed-page
"layout-fixed-lrm" demo.page.spaces/spaces-layout-lrm-fixed-page}
"sidebartree" demo.page.sidebartree/sidebartree-page
"sidebartree" demo.page.sidebartree/sidebar-page
}


Expand Down
56 changes: 34 additions & 22 deletions demo/src/demo/page/sidebartree.cljs
@@ -1,51 +1,63 @@
(ns demo.page.sidebartree
(:require
[reagent.core :as r]
[spaces.layout.screen :as layout-viewport]
[container :refer [sidebar-tree]]))
[ipsum]
[container :refer [with-sidebar-menu]]))

(defn welcome []
[:div.bg-red-500.w-full.h-full "welcome"])

(defn fulfillment []
[:div.bg-green-500.w-full.h-full "fulfillment"])
[:div.bg-green-500.w-full.h-full
[:div {:style {;:overflow-x "scroll"
;:overflow-y "scroll"
}
:class "w-full h-full bg-green-500"
}
"fulfillment"
[:div.w-full.h-full
[ipsum/random-paragraph 50]
]
]]
)

(defn product []
[:div.bg-blue-500.w-full.h-full "product"])

(defn finance []
[:div.bg-blue-500.w-full.h-full "finance"])

(defn menu [goto]
[sidebar-tree
{:name "Menu2"
:items [{:name "Fulfillment" :class "ion-bag" :href "#" :on-click #(goto fulfillment)
:items [{:name "Derps" :href "#" :class "ion-ios-color-filter-outline"}
(defn menu [page goto]
[with-sidebar-menu
{:page [page]
:name "Menu2"
:items [{:name "Fulfillment" :class "ion-bag" :href "#"
:items [{:name "Fulfillment1" :href "#" :class "ion-ios-color-filter-outline"
:on-click #(goto fulfillment)}
{:name "Times" :href "#" :class "ion-ios-clock-outline"}
{:name "Hates" :href "#" :class "ion-android-star-outline"}
{:name "Beat" :href "#" :class "ion-heart-broken"}]}
{:name "Product" :class "ion-ios-settings" :href "#" :on-click #(goto product)
:items [{:name "Watch" :href "#" :class "ion-ios-alarm-outline"}
{:name "Product" :class "ion-ios-settings" :href "#"
:items [{:name "2" :href "#" :class "ion-ios-alarm-outline"
:on-click #(goto product)
}
{:name "Creeper" :href "#" :class "ion-ios-camera-outline"}
{:name "Hate" :href "#" :class "ion-ios-chatboxes-outline"}
{:name "Grinder" :href "#" :class "ion-ios-cog-outline"}]}
{:name "Finance" :class "ion-ios-briefcase-outline" :href "#" :on-click #(goto finance)
:items [{:name "Burn" :href "#" :class "ion-ios-flame-outline"}
{:name "Finance" :class "ion-ios-briefcase-outline" :href "#"
:items [{:name "3" :href "#" :class "ion-ios-flame-outline"
:on-click #(goto finance)
}
{:name "Bulbs" :href "#" :class "ion-ios-lightbulb-outline"}
{:name "Where You" :href "#" :class "ion-ios-location-outline"}
{:name "On Lock" :href "#" :class "ion-ios-locked-outline" :on-click #(goto welcome)}]}]}])

(defn sidebartree-page [_]
(defn sidebar-page [_]
(let [page-a (r/atom welcome)
goto (fn [page]
(println "changing page...")
(reset! page-a page))]
(fn []
[layout-viewport/screen-left-right-top
{:left [:div.bg-green-300.w-full.h-full [menu goto]]
:left-resizeable false
:left-size "17em"
:right [:div.bg-blue-300.w-full.h-full [@page-a]]
:top [:div.bg-gray-200.w-full.h-full "top"]
:top-resizeable false
:scrollable true}])))
(fn [_]
[menu @page-a goto]

)))
19 changes: 6 additions & 13 deletions deps.edn
Expand Up @@ -7,11 +7,12 @@
org.pinkgorilla/pinkie {:mvn/version "0.3.17"} ; box
}
:aliases
{;https://github.com/applied-science/deps-library
:release
{:extra-deps {applied-science/deps-library {:mvn/version "0.4.0"}}
:main-opts ["-m" "applied-science.deps-library"]}

{; github ci
:build {:deps {io.github.clojure/tools.build {:mvn/version "0.9.6"}
slipset/deps-deploy {:mvn/version "0.2.1"}
babashka/fs {:mvn/version "0.0.5"}}
:ns-default build}

; https://github.com/weavejester/cljfmt
:cljfmt
{:extra-deps {cljfmt/cljfmt {:mvn/version "RELEASE"}}
Expand All @@ -25,19 +26,11 @@
{:extra-deps {clj-kondo/clj-kondo {:mvn/version "RELEASE"}}
:main-opts ["-m" "clj-kondo.main" "--lint" "src"]}

:outdated
{:extra-deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}
:main-opts ["-m" "antq.core"]}

:check
{:extra-deps {athos/clj-check {:git/url "https://github.com/athos/clj-check.git"
:sha "0ca84df1357d71429243b99908303f45a934654c"}}
:main-opts ["-m" "clj-check.check"]}

:garamond
{:main-opts ["-m" "garamond.main"]
:extra-deps {com.workframe/garamond {:mvn/version "0.4.0"}}}

; ci

:goldly-build ; ci only
Expand Down
4 changes: 0 additions & 4 deletions release.edn

This file was deleted.

4 changes: 2 additions & 2 deletions resources/ext/ui-container.edn
@@ -1,6 +1,6 @@
{:name "ui-container"
; build
:lazy-sci true
:lazy true
:cljs-namespace [pinkgorilla.layout.tab
pinkgorilla.layout.sidebar
;pinkgorilla.layout.tailsui
Expand All @@ -13,7 +13,7 @@
;'tabs pinkgorilla.layout.tailsui/tabs
'description-list pinkgorilla.layout.description-list/description-list
'panel pinkgorilla.layout.panel/panel
'sidebar-tree pinkgorilla.layout.sidebar-tree/sidebar-tree}}
'with-sidebar-menu pinkgorilla.layout.sidebar-tree/with-sidebar-menu}}
; theme
:theme {:available {;:tailsui {true ["tails-ui/dist/index.css"]}
:sidebartree {true ["sidebartree.css"
Expand Down
2 changes: 1 addition & 1 deletion resources/ext/ui-gridlayout.edn
@@ -1,6 +1,6 @@
{:name "ui-gridlayout"
; build
:lazy-sci true
:lazy true
:cljs-namespace [pinkgorilla.layout.gridlayout]
:cljs-ns-bindings {'ui.gridlayout {'gridlayout pinkgorilla.layout.gridlayout/gridlayout}}
; theme
Expand Down
2 changes: 1 addition & 1 deletion resources/ext/ui-input.edn
@@ -1,6 +1,6 @@
{:name "ui-input"
; build
:lazy-sci true
:lazy true
:cljs-namespace [pinkgorilla.input.button
pinkgorilla.input.progressbar
pinkgorilla.input.bound]
Expand Down
2 changes: 1 addition & 1 deletion resources/ext/ui-ionslider.edn
@@ -1,6 +1,6 @@
{:name "ui-ionslider"
; build
:lazy-sci true
:lazy true
:cljs-namespace [pinkgorilla.input.ionslider-bound]
:cljs-ns-bindings {'input2 {'slider pinkgorilla.input.ionslider-bound/slider-ion-a}}
; theme
Expand Down
2 changes: 1 addition & 1 deletion resources/ext/ui-popover.edn
@@ -1,6 +1,6 @@
{:name "ui-popover"
; build
:lazy-sci true
:lazy true
:cljs-namespace [pinkgorilla.layout.popover]
:cljs-ns-bindings {'ui.popover {'popover pinkgorilla.layout.popover/popover
'tooltip pinkgorilla.layout.popover/tooltip}}
Expand Down
2 changes: 1 addition & 1 deletion resources/ext/ui-rnd.edn
@@ -1,5 +1,5 @@
{:name "ui-rnd"
; build
:lazy-sci true
:lazy true
:cljs-namespace [pinkgorilla.layout.rnd]
:cljs-ns-bindings {'ui.rnd {'rnd pinkgorilla.layout.rnd/rnd}}}
2 changes: 1 addition & 1 deletion resources/ext/ui-spaces.edn
@@ -1,6 +1,6 @@
{:name "ui-spaces"
; build
:lazy-sci true
:lazy true
:cljs-namespace [spaces.core
spaces.layout.fixed
spaces.layout.screen]
Expand Down

0 comments on commit 1bf1999

Please sign in to comment.