Skip to content

Commit

Permalink
Automation script for making releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean McElroy committed Sep 22, 2018
1 parent 5679d06 commit 409ec70
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class Options
@" / ___/_ __/ _/ |/ / |__ \ / __ \ /____/ ",
@" \__ \ / / / / | / __/ / / / / / ",
@" ___/ // / _/ / / | / __/_/ /_/ / ",
@" /____//_/ /___//_/|_| /____(_)____/ ",
@" /____//_/ /___//_/|_| /____(_)____/ ver 1.0.1 ",
@"",
@"A program to turn GuardDuty findings from the AWS API",
@" into compliant STIX 2.0 ",
Expand Down
1 change: 1 addition & 0 deletions dist/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.1
58 changes: 58 additions & 0 deletions dist/package-brew.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/sh

# Clean the dist directory
rm -rf *-temp*
rm -f guardduty-stix-*.tgz
rm -f guardduty-stix-*.zip

# Update version
VERSION=$(cat ./VERSION)
cp ../guardduty-stix.csproj ./guardduty-stix.csproj.bak
cat ./guardduty-stix.csproj.bak | sed "s/<Version>[^\<]*<\/Version>/<Version>${VERSION}<\/Version>/" > ../guardduty-stix.csproj

## OSX

# Prep
mkdir -p osx-x64-temp
# Build self-contained executable
dotnet publish --self-contained -c Release -r osx-x64 -o ./dist/osx-x64-temp ../guardduty-stix.csproj
# Tar it for release to GitHub
tar -cvzf ./guardduty-stix-osx-x64-${VERSION}.tgz ./osx-x64-temp/
# Clean up
rm -rf osx-x64-temp

## WIN PORTABLE

# Prep
mkdir -p win-x64-temp
# Build self-contained executable
dotnet publish --self-contained -c Release -r win-x64 -o ./dist/win-x64-temp ../guardduty-stix.csproj
# Tar it for release to GitHub
zip ./guardduty-stix-win-x64-${VERSION}.zip ./win-x64-temp/*
# Clean up
rm -rf win-x64-temp

## WIN PORTABLE

# Prep
mkdir -p win-x64-temp
# Build self-contained executable
dotnet publish --self-contained -c Release -r win-x64 -o ./dist/win-x64-temp ../guardduty-stix.csproj
# Tar it for release to GitHub
zip ./guardduty-stix-win-x64-${VERSION}.zip ./win-x64-temp/*
# Clean up
rm -rf win-x64-temp

## LINUX PORTABLE

# Prep
mkdir -p linux-x64-temp
# Build self-contained executable
dotnet publish --self-contained -c Release -r linux-x64 -o ./dist/linux-x64-temp ../guardduty-stix.csproj
# Tar it for release to GitHub
tar -cvzf ./guardduty-stix-linux-x64-${VERSION}.tgz ./linux-x64-temp/
# Clean up
rm -rf linux-x64-temp

## CLEANUP
rm -f ./guardduty-stix.csproj.bak
10 changes: 10 additions & 0 deletions guardduty-stix.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RuntimeIdentifiers>win-x64;osx-x64;linux-x64</RuntimeIdentifiers>
<RootNamespace>guardduty_stix</RootNamespace>
<PackageId>com.seanmcelroy.guardduty_stix</PackageId>
<Title>guardduty-stix</Title>
<Description>A program to turn GuardDuty findings from the AWS API into compliant STIX 2.0</Description>
<Version>1.0.0</Version>
<Authors>Sean McElroy</Authors>
<Copyright>Copyright 2018 Sean McElroy</Copyright>
<PackageLicenseUrl>https://github.com/seanmcelroy/guardduty-stix/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/seanmcelroy/guardduty-stix</PackageProjectUrl>
<PackageTags>stix;guardduty</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 409ec70

Please sign in to comment.