Skip to content

Commit

Permalink
GHI-#13 Implement a JAR artifact build script for Windows OS
Browse files Browse the repository at this point in the history
  • Loading branch information
arcticicestudio committed Jul 9, 2017
1 parent d1e5502 commit c3f9258
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Based on the <a href="https://github.com/arcticicestudio/nord">Nord</a> color pa

- [Getting started](#getting-started)
- [Build](#build)
- [Linux and MacOS](#linux-and-macos)
- [Windows](#windows)
- [Installation](#installation)
- [Import](#import)
- [Manual](#manual)
Expand All @@ -25,11 +27,18 @@ Based on the <a href="https://github.com/arcticicestudio/nord">Nord</a> color pa

## Getting started
### Build
The settings JAR file can be build using the `build.sh` script:
The settings JAR artifact can be build from the CLI using the build scripts. The file will be placed in the `build` directory.
**Note that the scripts require the `jar` command to be available on your path!**

#### Linux and MacOS
```sh
build.sh
```

#### Windows
```sh
./build.sh
./build.bat
```
Note that the script requires the `jar` command to be available on your path!

### Installation
#### Import
Expand Down
40 changes: 40 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
:: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
:: title JAR Build Batch Script +
:: project nord-intellij-idea-syntax +
:: repository https://github.com/arcticicestudio/nord-intellij-idea-syntax +
:: author Arctic Ice Studio +
:: email [email protected] +
:: copyright Copyright (C) 2017 +
:: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@ECHO OFF
SET ICLS_FILE_NAME="nord-intellij-idea-syntax.icls"
SET INTELLIJ_EXPORT_FLAG_FILE_NAME="IntelliJ IDEA Global Settings"
SET VERSION="0.2.0"

IF NOT EXIST src\%ICLS_FILE_NAME% (
ECHO Source file not found: src\$ICLS_FILE_NAME
EXIT /B 1
)

WHERE jar -version >nul 2>&1
IF NOT %ERRORLEVEL% EQU 0 (
ECHO Required tools are missing or not available on the path: jar
EXIT /B 1
)

IF EXIST build ECHO Cleaning previous builds

MKDIR build\colors
COPY /Y NUL build\%INTELLIJ_EXPORT_FLAG_FILE_NAME% >nul 2>&1
COPY src\%ICLS_FILE_NAME% build\colors >nul 2>&1
jar cMf build\nord-intellij-idea-syntax-%VERSION%.jar -C build .

IF %ERRORLEVEL% EQU 0 (
DEL build\%INTELLIJ_EXPORT_FLAG_FILE_NAME%
RMDIR /S /Q build\colors
ECHO Build successful
EXIT /B 0
) ELSE (
ECHO Unexpected error during build
EXIT /B 1
)

0 comments on commit c3f9258

Please sign in to comment.