-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 70a785a
Showing
19 changed files
with
2,093 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Maven Build and Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- '**/v**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
|
||
- name: Cache Maven packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Extract version number | ||
id: extract-version | ||
run: | | ||
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: Import GPG key | ||
run: | | ||
echo "$GPG_PRIVATE_KEY" | base64 --decode | gpg --batch --import | ||
env: | ||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | ||
|
||
- name: Build and Deploy with Maven | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
run: | | ||
if [[ "$VERSION" == *-SNAPSHOT ]]; then | ||
echo "------- Maven Deploy snapshot on ${{ github.event_name }} -------"; | ||
mvn -B -e -f pom.xml clean deploy --settings maven-settings.xml | ||
else | ||
echo "------- Maven Deploy release on ${{ github.event_name }} -------"; | ||
mvn -B -e -f pom.xml clean deploy -DperformRelease=true --settings maven-settings.xml | ||
fi | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/dist | ||
/target | ||
temp | ||
**/.DS_Store | ||
**/.svn/ | ||
/*.project | ||
va specific | ||
*.class | ||
target | ||
target/* | ||
*.DS_Store | ||
/cache | ||
.vscode/ |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project default="clean" basedir="." name="lsp-extension"> | ||
<description> | ||
Build LSP Extension | ||
</description> | ||
<!-- set global properties for this build --> | ||
<property file="build.properties"/> | ||
|
||
|
||
<property name="lib" location="source/java/libs"/> | ||
<property name="temp" location="temp"/> | ||
<property name="build" location="build"/> | ||
<property name="dist" location="target"/> | ||
<property name="src" location="source/java/src"/> | ||
<property name="srcImg" location="source/images"/> | ||
|
||
<property name="tld" location="source/tld"/> | ||
<property name="fld" location="source/fld"/> | ||
|
||
<path id="classpath"> | ||
<fileset dir="${lib}"> | ||
<include name="**/*.jar" /> | ||
</fileset> | ||
</path> | ||
|
||
<target name="init"> | ||
<!-- Create the time stamp --> | ||
<tstamp/> | ||
|
||
<delete dir="${temp}"/> | ||
<delete dir="${dist}"/> | ||
<delete dir="${dist}/extension/jars"/> | ||
<delete dir="${dist}/extension/META-INF"/> | ||
|
||
<!-- Create the build directory structure used by compile --> | ||
<mkdir dir="${temp}"/> | ||
<mkdir dir="${build}"/> | ||
<mkdir dir="${dist}/extension/jars"/> | ||
</target> | ||
|
||
|
||
<target name="copy" depends="init" description="copy source file to temp" > | ||
<!-- copy the source --> | ||
<copy todir="${temp}"> | ||
<fileset dir="${src}"> | ||
<include name="**/*.java"/> | ||
</fileset> | ||
</copy> | ||
|
||
|
||
<tstamp> | ||
<format property="NOW" pattern="yyyy-MM-dd HH:mm:ss" /> | ||
</tstamp> | ||
|
||
|
||
<echo file="${dist}/extension/META-INF/MANIFEST.MF">Manifest-Version: 1.0 | ||
Built-Date: ${NOW} | ||
version: "${bundleversion}" | ||
id: "${id}" | ||
name: ${label} | ||
description: ${description} | ||
start-bundles: true | ||
release-type: ${releaseType} | ||
startup-hook: "{'class':'${class}','name':'${bundlename}','version':'${bundleversion}'}" | ||
lucee-core-version: "${luceeCoreVersion}" | ||
</echo> | ||
|
||
|
||
|
||
</target> | ||
|
||
|
||
|
||
<target name="compile" depends="copy" | ||
description="compile the source " > | ||
<!-- Compile ACF-Infinspan source --> | ||
<javac srcdir="${temp}" source="11" target="11" destdir="${build}" debug="true" debuglevel="lines,vars,source"> | ||
<classpath refid="classpath" /> | ||
</javac> | ||
</target> | ||
|
||
<target name="dist" depends="compile" | ||
description="generate the distribution" > | ||
|
||
|
||
<!-- Put everything in ${build} into .jar file --> | ||
<jar | ||
jarfile="${dist}/extension/jars/${bundlename}-${bundleversion}.jar" basedir="${build}" manifest="${src}/META-INF/MANIFEST.MF"> | ||
<manifest> | ||
<attribute name="Bundle-Version" value="${bundleversion}"/> | ||
<attribute name="Built-Date" value="${NOW}"/> | ||
<attribute name="Bundle-SymbolicName" value="${bundlename}"/> | ||
</manifest> | ||
</jar> | ||
|
||
<!-- copy the flds necessary --> | ||
<copy file="${fld}/function.fld" tofile="${dist}/extension/flds/ws-functions.fld" /> | ||
<replaceregexp | ||
file="${dist}/extension/flds/ws-functions.fld" | ||
match="\{bundle-name\}" | ||
replace="${bundlename}" | ||
byline="true"/> | ||
<replaceregexp | ||
file="${dist}/extension/flds/ws-functions.fld" | ||
match="\{bundle-version\}" | ||
replace="${bundleversion}" | ||
byline="true"/> | ||
|
||
|
||
|
||
|
||
|
||
|
||
<!-- copy the jars necessary --> | ||
<copy todir="${dist}/extension/jars"> | ||
<fileset dir="${lib}"> | ||
<include name="**/*.jar"/> | ||
<exclude name="**/javax.servlet.jar"/> | ||
<exclude name="**/lucee.jar"/> | ||
<exclude name="**/log4j-*.jar"/> | ||
</fileset> | ||
</copy> | ||
<!-- copy the logo --> | ||
<copy todir="${dist}/extension/META-INF"> | ||
<fileset dir="${srcImg}/"> | ||
<include name="logo.png"/> | ||
</fileset> | ||
</copy> | ||
|
||
<!-- Zip everything --> | ||
<zip destfile="${dist}/${filename}-${bundleversion}.lex"> | ||
<zipfileset dir="${dist}/extension"/> | ||
</zip> | ||
|
||
</target> | ||
|
||
<target name="clean" depends="dist" description="clean up" > | ||
<!-- Delete the ${build} and ${dist} directory trees --> | ||
<delete dir="${dist}/extension"/> | ||
<delete dir="${build}"/> | ||
<delete dir="${temp}"/> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 | ||
https://maven.apache.org/xsd/settings-1.1.0.xsd"> | ||
<localRepository/> | ||
<interactiveMode/> | ||
<usePluginRegistry/> | ||
<offline/> | ||
<pluginGroups/> | ||
<servers> | ||
<!-- setting for sonatype server --> | ||
<server> | ||
<id>ossrh</id> | ||
<username>${env.MAVEN_USERNAME}</username> | ||
<password>${env.MAVEN_PASSWORD}</password> | ||
</server> | ||
</servers> | ||
<mirrors/> | ||
<proxies/> | ||
<profiles> | ||
<profile> | ||
<id>ossrh</id> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
<properties> | ||
<gpg.executable>gpg2</gpg.executable> | ||
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
<activeProfiles> | ||
<activeProfile>ossrh</activeProfile> | ||
</activeProfiles> | ||
</settings> |
Oops, something went wrong.