Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stackoverflow committed Feb 2, 2024
0 parents commit 26f3ec1
Show file tree
Hide file tree
Showing 327 changed files with 28,974 additions and 0 deletions.
88 changes: 88 additions & 0 deletions .circleci/config.pkl
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
amends ".../pkl-project-commons/packages/pkl.impl.circleci/PklCI.pkl"

prb = buildWorkflow

main = buildWorkflow

triggerDocsBuild = "release"

release {
jobs {
"build-publish"
new {
["do-release"] {
requires = new Listing { "build-publish" }
context = "pkl-github-release"
}
}
}
}

jobs {
["build"] {
docker {
new {
image = "cimg/openjdk:17.0"
}
}
steps {
"checkout"
new RunStep {
command = "./gradlew --info --stacktrace build"
}
}
}
["build-publish"] {
docker {
new {
image = "cimg/openjdk:17.0"
}
}
steps {
"checkout"
new RunStep {
command = "./gradlew -DreleaseBuild=true --info --stacktrace build publish"
}
new PersistToWorkspaceStep {
root = "."
paths {
"release/*.xml"
"build/m2/org/pkl/pkl-intellij/*/*.zip"
}
}
}
}
["do-release"] {
docker {
new { image = "maniator/gh:v2.40.1" }
}
steps {
new AttachWorkspaceStep {
at = "."
}
new RunStep {
name = "gh release"
command = #"""
echo "Preparing updatePlugins.xml"
sed -i -e 's/#version#/'${CIRCLE_TAG}'/g' release/updatePlugins.xml
cp build/m2/org/pkl/pkl-intellij/*/*.zip release
echo "Creating release"
gh release create ${CIRCLE_TAG} \
--title "${CIRCLE_TAG}" \
--target "${CIRCLE_SHA1}" \
--verify-tag \
--notes "Release notes: https://pkl-lang.org/intellij/current/changelog.html#release-${CIRCLE_TAG}" \
--repo "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" \
release/*.*
"""#
}
}
}
}

local buildWorkflow = new Workflow {
jobs {
"build"
}
}
107 changes: 107 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Generated from CircleCI.pkl. DO NOT EDIT.
version: '2.1'
orbs:
pr-approval: apple/[email protected]
jobs:
build:
steps:
- checkout
- run:
command: ./gradlew --info --stacktrace build
docker:
- image: cimg/openjdk:17.0
build-publish:
steps:
- checkout
- run:
command: ./gradlew -DreleaseBuild=true --info --stacktrace build publish
- persist_to_workspace:
root: '.'
paths:
- release/*.xml
- build/m2/org/pkl/pkl-intellij/*/*.zip
docker:
- image: cimg/openjdk:17.0
do-release:
steps:
- attach_workspace:
at: '.'
- run:
command: |-
echo "Preparing updatePlugins.xml"
sed -i -e 's/#version#/'${CIRCLE_TAG}'/g' release/updatePlugins.xml
cp build/m2/org/pkl/pkl-intellij/*/*.zip release
echo "Creating release"
gh release create ${CIRCLE_TAG} \
--title "${CIRCLE_TAG}" \
--target "${CIRCLE_SHA1}" \
--verify-tag \
--notes "Release notes: https://pkl-lang.org/intellij/current/changelog.html#release-${CIRCLE_TAG}" \
--repo "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" \
release/*.*
name: gh release
docker:
- image: maniator/gh:v2.40.1
trigger-docsite-build:
steps:
- run:
command: |-
curl --location \
--request POST \
--header "Content-Type: application/json" \
-u "${CIRCLE_TOKEN}:" \
--data '{ "branch": "main" }' \
"https://circleci.com/api/v2/project/github/apple/pkl-lang.org/pipeline"
name: Triggering docsite build
docker:
- image: cimg/base:current
workflows:
prb:
jobs:
- hold:
type: approval
- pr-approval/authenticate:
context: pkl-pr-approval
- build:
requires:
- hold
- pr-approval/authenticate
when:
matches:
value: << pipeline.git.branch >>
pattern: ^pull/\d+(/head)?$
main:
jobs:
- build
when:
equal:
- main
- << pipeline.git.branch >>
release:
jobs:
- build-publish:
filters:
branches:
ignore: /.*/
tags:
only: /^v?\d+\.\d+\.\d+$/
- do-release:
requires:
- build-publish
context: pkl-github-release
filters:
branches:
ignore: /.*/
tags:
only: /^v?\d+\.\d+\.\d+$/
- trigger-docsite-build:
requires:
- do-release
context:
- pkl-pr-approval
filters:
branches:
ignore: /.*/
tags:
only: /^v?\d+\.\d+\.\d+$/
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Mac
.DS_STORE

# Gradle
.gradle/
build/
generated/
ides/

# IntelliJ
.idea/
!.idea/codestyles/
!.idea/inspectionProfiles/
!.idea/vcs.xml
!.idea/misc.xml
99 changes: 99 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions .idea/runConfigurations/runIde.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 26f3ec1

Please sign in to comment.