diff --git a/.credentials b/.credentials deleted file mode 100644 index 6bcc839..0000000 --- a/.credentials +++ /dev/null @@ -1,4 +0,0 @@ -realm = Bintray API Realm -host = api.bintray.com -user = {{ BINTRAY_USER }} -password = {{ BINTRAY_PASS }} \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..4932fa1 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,27 @@ +name: main + +on: + # Trigger the workflow on push or pull request, + # but only for the main branch + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: olafurpg/setup-scala@v10 + with: + # use Java 8 + java-version: adopt@1.8 + - name: Compile + run: sbt compile + env: + # NB: I'd like not to put this here but the sbt gh package plugin + # will error out if its not resolved + GITHUB_TOKEN: ${{ secrets.GH_PACKAGES_GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index cff77b4..efe4d70 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,6 @@ project/plugins/project/ *.sublime-project *.sublime-workspace -*~ \ No newline at end of file +*~ + +sbt.json diff --git a/.sonatype_credentials b/.sonatype_credentials new file mode 100644 index 0000000..00d8f14 --- /dev/null +++ b/.sonatype_credentials @@ -0,0 +1,4 @@ +realm=Sonatype Nexus Repository Manager +host=oss.sonatype.org +user=rui-meetup +password= diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b76b1e3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,48 +0,0 @@ -sudo: required -language: bash - -# exclude tags. -branches: - except: - - /^\d+.\d+.\d+$/ - -services: - - docker - -cache: - directories: - - "$HOME/.ivy2" - - "$HOME/.sbt" - -env: - global: - - CI_BUILD_NUMBER=$TRAVIS_BUILD_NUMBER - - CLOUDSDK_CORE_DISABLE_PROMPTS=1 - -before_install: - - # Install envtpl for easy templating. - - sudo pip install envtpl - - - mkdir "$HOME/.bintray" - - envtpl < .credentials > "$HOME/.bintray/.credentials" - - # Use SNAPSHOT for all other than master builds. - - export CI_BUILD_NUMBER=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then echo $CI_BUILD_NUMBER; else echo "${TRAVIS_BUILD_NUMBER}-SNAPSHOT"; fi) - - echo "CI_BUILD_NUMBER=${CI_BUILD_NUMBER}" - -script: - - make $(if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then echo publish; else echo package; fi) - -after_success: - - git config --global user.email "builds@travis-ci.com" - - git config --global user.name "Travis CI" - - export GIT_TAG=$(make version) - - echo "GIT_TAG=$GIT_TAG" - - > - [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ] && - git tag $GIT_TAG -f -a -m "Version $GIT_TAG built by Travis CI - https://travis-ci.org/$TRAVIS_REPO_SLUG/builds/$TRAVIS_JOB_ID" - || true - - > - [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ] && - git push -q https://$GITHUB_USER:$GITHUB_TOKEN@github.com/$TRAVIS_REPO_SLUG --tags || true diff --git a/LICENSE b/LICENSE index 11f4c85..5d63538 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Meetup, Inc. +Copyright (c) 2021 Meetup, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile b/Makefile index ccce5ab..1fa3c9d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -BUILDER_TAG = "meetup/sbt-builder:0.1.5" +BUILDER_TAG = "ghcr.io/meetup/sbt-builder:0.3.17" CI_BUILD_NUMBER ?= $(USER)-SNAPSHOT CI_IVY_CACHE ?= $(HOME)/.ivy2 diff --git a/build.sbt b/build.sbt index 1d40c30..f180f9b 100644 --- a/build.sbt +++ b/build.sbt @@ -1,8 +1,5 @@ -enablePlugins(CommonSettingsPlugin) - -name := "sbt-openapi" - organization := "com.meetup" +name := "sbt-openapi" description := "Plugin for generating managed code from OpenAPI specifications" @@ -10,8 +7,10 @@ sbtPlugin := true scalaVersion := appConfiguration.value.provider.scalaProvider.version -libraryDependencies += "io.swagger" % "swagger-codegen" % "2.3.1" +libraryDependencies += "io.swagger" % "swagger-codegen" % "2.4.19" licenses += ("MIT", url("http://opensource.org/licenses/MIT")) -bintrayOrganization in ThisBuild := Some("meetup") + +// Add the default sonatype repository setting +publishTo := sonatypePublishTo.value diff --git a/project/build.properties b/project/build.properties index 133a8f1..8e682c5 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.17 +sbt.version=0.13.18 diff --git a/project/plugins.sbt b/project/plugins.sbt index 9a9591b..1c70137 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,10 +1,2 @@ -resolvers += Resolver.url( - "meetup-sbt-plugins", - new java.net.URL("https://dl.bintray.com/meetup/sbt-plugins/") -)(Resolver.ivyStylePatterns) - -addSbtPlugin("com.meetup" % "sbt-plugins" % "0.3.38") - -addSbtPlugin("com.eed3si9n" % "sbt-dirty-money" % "0.2.0") - -addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3") +addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0") diff --git a/soantype.sbt b/soantype.sbt new file mode 100644 index 0000000..e09d431 --- /dev/null +++ b/soantype.sbt @@ -0,0 +1,12 @@ +import xerial.sbt.Sonatype._ + +publishMavenStyle := true + +sonatypeProfileName := "com.meetup" +sonatypeProjectHosting := Some(GitHubHosting(user="meetup", repository="sbt-openapi", email="engineering@meetup.com")) +developers := List( + Developer(id = "meetup", name = "Meetup Developer", email = "engineering@meetup.com", url = url("https://www.meetup.com")) +) +licenses := Seq("MIT" -> url("https://mit-license.org/")) + +publishTo := sonatypePublishTo.value