Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

ATAK Thirdparty Pipeline ZIPper

A bash script to package ATAK third-party pipeline submissions in strict source-only mode (no build artifacts).

Repository: https://github.com/mjthree/ATAK-Thirdparty-Pipeline-ZIPper

Overview

This script creates a clean zip archive of your ATAK third-party pipeline project, including only source files and excluding build artifacts. It's designed for strict source-only submissions.

Why This Exists

I got tired of uploading builds to the TPP (Third-Party Pipeline) on tak.gov and having them fail because:

  • Missing files: I'd forget to include required files like gradle.properties, project.properties, or other essential configuration files
  • Gradlew line ending issues: The gradlew script would have Windows line endings (CRLF) instead of Unix line endings (LF), causing the build to fail on the Linux-based TPP system

This script automates the packaging process to ensure:

  • All required files are included (no more missing file errors)
  • gradlew has proper Unix line endings (automatically converted from CRLF to LF)
  • Only source files are included (no build artifacts that could cause issues)
  • Proper file permissions are set on gradlew (755)

No more failed submissions due to packaging mistakes! 🎉

Prerequisites

This script requires a Unix-like environment with bash. On Windows, you'll need to use WSL (Windows Subsystem for Linux) with Ubuntu.

Using WSL Ubuntu on Windows

Installation

  1. Enable WSL:

    • Open PowerShell as Administrator
    • Run: wsl --install
    • This will install WSL and Ubuntu by default
    • Restart your computer when prompted
  2. Alternative method (if the above doesn't work):

    # Enable WSL feature
    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
    
    # Enable Virtual Machine Platform
    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    
    # Restart computer, then set WSL 2 as default
    wsl --set-default-version 2
    
    # Install Ubuntu from Microsoft Store
    # Search for "Ubuntu" in Microsoft Store and install
  3. Launch Ubuntu:

    • After installation, launch "Ubuntu" from the Start menu
    • Create a username and password when prompted

Accessing Your Windows Files from WSL

Your Windows drives are mounted under /mnt/:

  • C:\/mnt/c/
  • D:\/mnt/d/
  • etc.

Example: To access this project from WSL:

cd /mnt/c/Users/mike/OneDrive/Desktop/Backup\ of\ software/ATAK\ Thirdparty\ Pipeline\ ZIPper

Installing Required Tools in WSL

The script requires zip utility. Install it if needed:

sudo apt update
sudo apt install zip

Running the Script from WSL

  1. Navigate to your project directory:

    cd /mnt/c/Users/mike/OneDrive/Desktop/Backup\ of\ software/ATAK\ Thirdparty\ Pipeline\ ZIPper
  2. Make the script executable:

    chmod +x make_tpp_zip.sh
  3. Run the script:

    ./make_tpp_zip.sh

Usage

  1. Navigate to your ATAK project root directory (where build.gradle is located)

  2. Copy make_tpp_zip.sh to the project root

  3. Make it executable:

    chmod +x make_tpp_zip.sh
  4. Run the script:

    ./make_tpp_zip.sh
  5. Enter the submission folder name when prompted (this will also be the zip name)

  6. The script will:

    • Create a clean staging directory
    • Copy only source files (no build artifacts)
    • Create a zip archive
    • Clean up temporary files

What Gets Included

The script includes:

  • Root files: build.gradle, settings.gradle, gradle.properties, project.properties, gradlew, gradlew.bat, README.md
  • gradle/ directory (Gradle wrapper)
  • espresso/ directory
  • tools/ directory
  • app/ directory (source only):
    • app/build.gradle
    • app/proguard-gradle.txt
    • app/src/ (all source files)

Verification

After creating the zip, verify it contains no build artifacts:

unzip -l <zip-name>.zip | grep build

This should return nothing if the packaging was successful.

Notes

  • The script automatically fixes line endings in gradlew (CRLF → LF)
  • The script sets proper permissions on gradlew (755)
  • All build artifacts are excluded from the final zip

Troubleshooting

Permission Denied

If you get a permission denied error:

chmod +x make_tpp_zip.sh

Command Not Found: zip

Install zip utility:

sudo apt install zip  # Ubuntu/Debian

Line Ending Issues

The script handles this automatically, but if you encounter issues, ensure you're running from a Unix-like environment (WSL, Linux, or macOS).

License

See the repository for license information.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages