Skip to content

Commit a66741e

Browse files
authored
Setup project for clj-commons
1 parent 40bf400 commit a66741e

File tree

5 files changed

+145
-25
lines changed

5 files changed

+145
-25
lines changed

.circleci/config.yml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Use the latest 2.1 version of CircleCI pipeline process engine.
2+
# See: https://circleci.com/docs/2.0/configuration-reference
3+
# For a detailed guide to building and testing with clojure, read the docs:
4+
# https://circleci.com/docs/2.0/language-clojure/ for more details
5+
version: 2.1
6+
7+
workflows:
8+
build-deploy:
9+
jobs:
10+
- build:
11+
filters:
12+
tags:
13+
only: /.*/
14+
15+
- deploy:
16+
requires:
17+
- build
18+
filters:
19+
tags:
20+
only: /Release-.*/
21+
context:
22+
- CLOJARS_DEPLOY
23+
24+
# Define a job to be invoked later in a workflow.
25+
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
26+
jobs:
27+
build:
28+
# Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
29+
# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
30+
docker:
31+
# specify the version you desire here
32+
- image: circleci/clojure:lein-2.9.5
33+
34+
# Specify service dependencies here if necessary
35+
# CircleCI maintains a library of pre-built images
36+
# documented at https://circleci.com/docs/2.0/circleci-images/
37+
# - image: circleci/postgres:9.4
38+
39+
working_directory: ~/repo
40+
41+
environment:
42+
LEIN_ROOT: "true"
43+
# Customize the JVM maximum heap limit
44+
JVM_OPTS: -Xmx3200m
45+
46+
# Add steps to the job
47+
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
48+
steps:
49+
- checkout
50+
51+
# Download and cache dependencies
52+
- restore_cache:
53+
keys:
54+
- v1-dependencies-{{ checksum "project.clj" }}
55+
# fallback to using the latest cache if no exact match is found
56+
- v1-dependencies-
57+
58+
- run: lein deps
59+
60+
- save_cache:
61+
paths:
62+
- ~/.m2
63+
key: v1-dependencies-{{ checksum "project.clj" }}
64+
65+
# run tests!
66+
- run: lein test
67+
68+
deploy:
69+
docker:
70+
# specify the version you desire here
71+
- image: circleci/clojure:openjdk-8-lein-2.9.1
72+
# Specify service dependencies here if necessary
73+
# CircleCI maintains a library of pre-built images
74+
# documented at https://circleci.com/docs/2.0/circleci-images/
75+
# - image: circleci/postgres:9.4
76+
77+
working_directory: ~/repo
78+
79+
environment:
80+
LEIN_ROOT: "true"
81+
# Customize the JVM maximum heap limit
82+
JVM_OPTS: -Xmx3200m
83+
84+
steps:
85+
- checkout
86+
87+
# Download and cache dependencies
88+
- restore_cache:
89+
keys:
90+
- v1-dependencies-{{ checksum "project.clj" }}
91+
# fallback to using the latest cache if no exact match is found
92+
- v1-dependencies-
93+
94+
# Download and cache dependencies
95+
- restore_cache:
96+
keys:
97+
- v1-dependencies-{{ checksum "project.clj" }}
98+
# fallback to using the latest cache if no exact match is found
99+
- v1-dependencies-
100+
101+
- run:
102+
name: Install babashka
103+
command: |
104+
curl -s https://github.com/borkdude/babashka/master/install -o install.sh
105+
sudo bash install.sh
106+
rm install.sh
107+
- run:
108+
name: Install deployment-script
109+
command: |
110+
curl -s https://github.com/clj-commons/infra/main/deployment/circle-maybe-deploy.bb -o circle-maybe-deploy.bb
111+
chmod a+x circle-maybe-deploy.bb
112+
- run: lein deps
113+
114+
- run:
115+
name: Setup GPG signing key
116+
command: |
117+
GNUPGHOME="$HOME/.gnupg"
118+
export GNUPGHOME
119+
mkdir -p "$GNUPGHOME"
120+
chmod 0700 "$GNUPGHOME"
121+
echo "$GPG_KEY" \
122+
| base64 --decode --ignore-garbage \
123+
| gpg --batch --allow-secret-key-import --import
124+
gpg --keyid-format LONG --list-secret-keys
125+
- save_cache:
126+
paths:
127+
- ~/.m2
128+
key: v1-dependencies-{{ checksum "project.clj" }}
129+
- run:
130+
name: Deploy
131+
command: |
132+
GPG_TTY=$(tty)
133+
export GPG_TTY
134+
echo $GPG_TTY
135+
./circle-maybe-deploy.bb lein deploy clojars

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @borkdude @slipset

.github/workflows/test.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# digest
22

3-
![Build Status](https://github.com/tebeka/clj-digest/workflows/Test/badge.svg)
3+
[![Clojars Project](https://img.shields.io/clojars/v/org.clj-commons/clj-digest.svg)](https://clojars.org/org.clj-commons/clj-digest)
4+
[![cljdoc badge](https://cljdoc.org/badge/org.clj-commons/clj-digest)](https://cljdoc.org/d/org.clj-commons/clj-digest)
5+
[![CircleCI Status](https://circleci.com/gh/clj-commons/clj-digest.svg?style=svg)](https://circleci.com/gh/clj-commons/clj-digest)
46

57
`digest` - Message digest library for Clojure. Providing md5, sha-256, ...
68

project.clj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
(defproject digest "1.4.10"
1+
(defproject org.clj-commons/digest (or (System/getenv "PROJECT_VERSION") "1.4.10")
22
:description "Digest algorithms (MD5, SHA ...) for Clojure"
33
:author "Miki Tebeka <miki.tebeka@gmail.com>"
4-
:url "https://github.com/tebeka/clj-digest"
4+
:url "https://github.com/clj-commons/clj-digest"
5+
:deploy-repositories [["clojars" {:url "https://repo.clojars.org"
6+
:username :env/clojars_username
7+
:password :env/clojars_password
8+
:sign-releases true}]]
59
:license {:name "Eclipse Public License"
610
:url "http://www.eclipse.org/legal/epl-v10.html"}
711
:dependencies [[org.clojure/clojure "1.10.1"]])

0 commit comments

Comments
 (0)