Skip to content

Commit a5b12eb

Browse files
authored
Fixup publishing with circleci (#50)
1 parent badd9cf commit a5b12eb

File tree

7 files changed

+42
-42
lines changed

7 files changed

+42
-42
lines changed

.circleci/config.yml

100755100644
File mode changed.

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ jobs:
4040
- name: build
4141
run: ./gradlew ${GRADLE_SWITCHES} build test
4242

43-
- name: publish-snapshots
44-
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
45-
timeout-minutes: 30
46-
run: ./gradlew ${GRADLE_SWITCHES} snapshot publish -PforceSigning
47-
env:
48-
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
49-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
50-
SIGNING_KEY: ${{ secrets.OSSRH_SIGNING_KEY }}
51-
SIGNING_PASSWORD: ${{ secrets.OSSRH_SIGNING_PASSWORD }}
43+
# - name: publish-snapshots
44+
# if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
45+
# timeout-minutes: 30
46+
# run: ./gradlew ${GRADLE_SWITCHES} snapshot publish -PforceSigning
47+
# env:
48+
# OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
49+
# OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
50+
# SIGNING_KEY: ${{ secrets.OSSRH_SIGNING_KEY }}
51+
# SIGNING_PASSWORD: ${{ secrets.OSSRH_SIGNING_PASSWORD }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
build/
22
.gradle/
3+
gradle.properties
34
out/
45
.idea/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![Logo](https://github.com/openrewrite/rewrite/raw/master/doc/logo-oss.png)
22
### Migrate testing frameworks. Automatically.
33

4-
![ci](https://github.com/openrewrite/rewrite-testing-frameworks/actions/workflows/ci.yml/badge.svg)
4+
[![Build Status](https://circleci.com/gh/openrewrite/rewrite-testing-frameworks.svg?style=shield)](https://circleci.com/gh/openrewrite/rewrite-testing-frameworks)
55
[![Apache 2.0](https://img.shields.io/github/license/openrewrite/rewrite-testing-frameworks.svg)](https://www.apache.org/licenses/LICENSE-2.0)
66
[![Maven Central](https://img.shields.io/maven-central/v/org.openrewrite.recipe/rewrite-testing-frameworks.svg)](https://mvnrepository.com/artifact/org.openrewrite.recipe/rewrite-testing-frameworks)
77

gradle.properties

Lines changed: 0 additions & 1 deletion
This file was deleted.

gradle.properties.enc

352 Bytes
Binary file not shown.
Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
#!/bin/bash
2-
# This script will build the project.
3-
4-
SWITCHES="-s --console=plain"
5-
6-
if [ $CIRCLE_PR_NUMBER ]; then
7-
echo -e "WARN: Should not be here => Found Pull Request #$CIRCLE_PR_NUMBER => Branch [$CIRCLE_BRANCH]"
8-
echo -e "Not attempting to publish"
9-
elif [ -z $CIRCLE_TAG ]; then
10-
echo -e "Publishing Snapshot => Branch ['$CIRCLE_BRANCH']"
11-
openssl aes-256-cbc -d -in gradle.properties.enc -out gradle.properties -k "$KEY" -md sha256
12-
./gradlew snapshot $SWITCHES -x release -x test
13-
elif [ $CIRCLE_TAG ]; then
14-
echo -e "Publishing Release => Branch ['$CIRCLE_BRANCH'] Tag ['$CIRCLE_TAG']"
15-
openssl aes-256-cbc -d -in gradle.properties.enc -out gradle.properties -k "$KEY" -md sha256
16-
case "$CIRCLE_TAG" in
17-
*-rc\.*)
18-
./gradlew -Prelease.disableGitChecks=true -Prelease.useLastTag=true candidate bintrayPublish $SWITCHES -x release -x artifactoryPublish
19-
;;
20-
*)
21-
./gradlew -Prelease.disableGitChecks=true -Prelease.useLastTag=true final bintrayPublish $SWITCHES -x release -x artifactoryPublish
22-
;;
23-
esac
24-
else
25-
echo -e "WARN: Should not be here => Branch ['$CIRCLE_BRANCH'] Tag ['$CIRCLE_TAG'] Pull Request ['$CIRCLE_PR_NUMBER']"
26-
echo -e "Not attempting to publish"
27-
fi
28-
29-
EXIT=$?
30-
31-
exit $EXIT
1+
#!/bin/bash
2+
# This script will build the project.
3+
4+
SWITCHES="-s --console=plain"
5+
6+
if [ $CIRCLE_PR_NUMBER ]; then
7+
echo -e "WARN: Should not be here => Found Pull Request #$CIRCLE_PR_NUMBER => Branch [$CIRCLE_BRANCH]"
8+
echo -e "Not attempting to publish"
9+
elif [ -z $CIRCLE_TAG ]; then
10+
echo -e "Publishing Snapshot => Branch ['$CIRCLE_BRANCH']"
11+
openssl aes-256-cbc -d -in gradle.properties.enc -out gradle.properties -k "$KEY" -md sha256
12+
./gradlew snapshot $SWITCHES -x release -x test
13+
elif [ $CIRCLE_TAG ]; then
14+
echo -e "Publishing Release => Branch ['$CIRCLE_BRANCH'] Tag ['$CIRCLE_TAG']"
15+
openssl aes-256-cbc -d -in gradle.properties.enc -out gradle.properties -k "$KEY" -md sha256
16+
case "$CIRCLE_TAG" in
17+
*-rc\.*)
18+
./gradlew -Prelease.disableGitChecks=true -Prelease.useLastTag=true candidate bintrayPublish $SWITCHES -x release -x artifactoryPublish
19+
;;
20+
*)
21+
./gradlew -Prelease.disableGitChecks=true -Prelease.useLastTag=true final bintrayPublish $SWITCHES -x release -x artifactoryPublish
22+
;;
23+
esac
24+
else
25+
echo -e "WARN: Should not be here => Branch ['$CIRCLE_BRANCH'] Tag ['$CIRCLE_TAG'] Pull Request ['$CIRCLE_PR_NUMBER']"
26+
echo -e "Not attempting to publish"
27+
fi
28+
29+
EXIT=$?
30+
31+
exit $EXIT

0 commit comments

Comments
 (0)