This repository has been archived by the owner on Jul 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #169 from viniciusramosdefaria/feature/packaging
Feature/packaging
- Loading branch information
Showing
24 changed files
with
590 additions
and
3 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
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
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,11 @@ | ||
#!/bin/sh | ||
|
||
|
||
mkdir -p dist/installer | ||
|
||
curl -fsSL https://raw.githubusercontent.com/mh-cbon/latest/master/install.sh | GH=mh-cbon/go-bin-deb sh -xe | ||
go-bin-deb generate --file packaging/debian/deb-single.json --version ${RELEASE_VERSION} -o dist/installer/ritchie-single.deb -a amd64 | ||
rm -rf pkg-build | ||
go-bin-deb generate --file packaging/debian/deb-team.json --version ${RELEASE_VERSION} -o dist/installer/ritchie-team.deb -a amd64 | ||
rm -rf pkg-build | ||
go-bin-deb generate --file packaging/debian/deb-team-zup.json --version ${RELEASE_VERSION} -o dist/installer/ritchie-team-zup.deb -a amd64 |
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,23 @@ | ||
#!/bin/sh | ||
|
||
changelog init | ||
|
||
mkdir -p pkg-build/SPECS | ||
|
||
echo ${RELEASE_VERSION} | ||
|
||
mkdir -p dist/installer | ||
|
||
go-bin-rpm generate-spec --file packaging/rpm/rpm-team.json -a amd64 --version ${RELEASE_VERSION} > pkg-build/SPECS/ritchiecli.spec | ||
go-bin-rpm generate --file packaging/rpm/rpm-team.json -a amd64 --version ${RELEASE_VERSION} -o dist/installer/ritchie-team.rpm | ||
|
||
rm -rf pkg-build && mkdir -p pkg-build/SPECS | ||
|
||
go-bin-rpm generate-spec --file packaging/rpm/rpm-single.json -a amd64 --version ${RELEASE_VERSION} > pkg-build/SPECS/ritchiecli.spec | ||
go-bin-rpm generate --file packaging/rpm/rpm-single.json -a amd64 --version ${RELEASE_VERSION} -o dist/installer/ritchie-single.rpm | ||
|
||
rm -rf pkg-build && mkdir -p pkg-build/SPECS | ||
|
||
go-bin-rpm generate-spec --file packaging/rpm/rpm-team-zup.json -a amd64 --version ${RELEASE_VERSION} > pkg-build/SPECS/ritchiecli.spec | ||
go-bin-rpm generate --file packaging/rpm/rpm-team-zup.json -a amd64 --version ${RELEASE_VERSION} -o dist/installer/ritchie-team-zup.rpm | ||
|
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,78 @@ | ||
|
||
Write-Output 'DOWLOADING GO-MSI INSTALLER' | ||
|
||
$url = "https://github.com/mh-cbon/go-msi/releases/download/1.0.2/go-msi-amd64.msi" | ||
$output = "$((Get-Item -Path ".\").FullName)\go-msi-amd64.msi" | ||
$start_time = Get-Date | ||
|
||
$wc = New-Object System.Net.WebClient | ||
$wc.DownloadFile($url, $output) | ||
|
||
Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)" | ||
|
||
Write-Output 'INSTALLING GO-MSI' | ||
|
||
Start-Process msiexec.exe -Wait -ArgumentList "/I $output /quiet" | ||
|
||
Write-Output 'DOWLOADING WIX FILES' | ||
|
||
$url = "http://wixtoolset.org/downloads/v3.10.3.3007/wix310-binaries.zip" | ||
$output = "$((Get-Item -Path ".\").FullName)\wix310-binaries.zip" | ||
$start_time = Get-Date | ||
|
||
$wc = New-Object System.Net.WebClient | ||
$wc.DownloadFile($url, $output) | ||
|
||
Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)" | ||
|
||
Add-Type -AssemblyName System.IO.Compression.FileSystem | ||
function Unzip | ||
{ | ||
param([string]$zipfile, [string]$outpath) | ||
|
||
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath) | ||
} | ||
|
||
Write-Output 'EXTRACTING WIX FILES TO PATH' | ||
|
||
Unzip "$((Get-Item -Path ".\").FullName)\wix310-binaries.zip" "C:\\Users\circleci\AppData\Local\Microsoft\WindowsApps" | ||
|
||
Write-Output 'Setting Release Version Variable' | ||
|
||
$release_version=$(Get-Content .\release_version.txt) | ||
|
||
mkdir dist\installer | ||
|
||
copy LICENSE packaging/windows | ||
|
||
cd packaging\windows | ||
|
||
Write-Output 'GENERATING MSI TEAM INSTALLER' | ||
|
||
& 'C:\Program Files\go-msi\go-msi.exe' make --msi ritchiecliteam.msi --version $release_version --path wix-team.json | ||
|
||
Write-Output 'GENERATING CHOCO TEAM INSTALLER' | ||
|
||
& 'C:\Program Files\go-msi\go-msi.exe' choco --version $release_version"-team" --input ritchiecliteam.msi --path wix-team.json | ||
|
||
Write-Output 'GENERATING MSI SINGLE INSTALLER' | ||
|
||
& 'C:\Program Files\go-msi\go-msi.exe' make --msi ritchieclisingle.msi --version $release_version --path wix-single.json | ||
|
||
Write-Output 'GENERATING CHOCO SINGLE INSTALLER' | ||
|
||
& 'C:\Program Files\go-msi\go-msi.exe' choco --version $release_version"-single" --input ritchieclisingle.msi --path wix-single.json | ||
|
||
Write-Output 'GENERATING MSI TEAM ZUP INSTALLER' | ||
|
||
& 'C:\Program Files\go-msi\go-msi.exe' make --msi ritchiecliteamzup.msi --version $release_version --path wix-team-zup.json | ||
|
||
Write-Output 'GENERATING CHOCO TEAM ZUP INSTALLER' | ||
|
||
& 'C:\Program Files\go-msi\go-msi.exe' choco --version $release_version"-teamzup" --input ritchiecliteamzup.msi --path wix-team-zup.json | ||
|
||
Write-Output 'COPYING FILES TO THE RIGHT PLACE' | ||
|
||
copy ritchie* ..\..\dist\installer | ||
|
||
copy *.nupkg ..\..\dist\installer |
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
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
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
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 |
---|---|---|
|
@@ -94,3 +94,5 @@ Temporary Items | |
|
||
# Jenkins mvn | ||
settings.xml | ||
/change.log | ||
/pkg-build/ |
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
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,16 @@ | ||
FROM centos:7 | ||
|
||
# Install needed software and users | ||
USER root | ||
RUN groupadd -r circleci && useradd -r -d /home/circleci -m -g circleci circleci | ||
|
||
RUN curl -s -L https://bintray.com/mh-cbon/rpm/rpm > /etc/yum.repos.d/w.repo | ||
|
||
RUN yum install -y epel-release && \ | ||
yum install -y git tar curl wget sudo make yum-utils device-mapper-persistent-data lvm2 && \ | ||
yum clean all && \ | ||
yum install go-bin-rpm changelog rpm-build -y --quiet | ||
|
||
RUN echo "%circleci ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | ||
|
||
USER circleci |
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,15 @@ | ||
{ | ||
"name": "ritchiecli", | ||
"maintainer": "viniciusramosdefaria <[email protected]>", | ||
"description": "Install ritchie CLI", | ||
"homepage": "https://ritchiecli.io", | ||
"files": [ | ||
{ | ||
"from": "dist/linux/single/rit", | ||
"to": "/usr/local/bin", | ||
"base": "dist/linux/single", | ||
"fperm": "0755" | ||
} | ||
], | ||
"preinst-file": "packaging/scripts/preinst.sh" | ||
} |
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,16 @@ | ||
{ | ||
"name": "ritchiecli", | ||
"maintainer": "viniciusramosdefaria <[email protected]>", | ||
"description": "Install ritchie CLI", | ||
"homepage": "https://ritchiecli.io", | ||
"files": [ | ||
{ | ||
"from": "dist/linux/team/rit", | ||
"to": "/usr/local/bin", | ||
"base" : "dist/linux/team", | ||
"fperm": "0755" | ||
} | ||
], | ||
"preinst-file": "packaging/scripts/preinst.sh", | ||
"postinst-file": "packaging/scripts/postinst-zup.sh" | ||
} |
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,16 @@ | ||
{ | ||
"name": "ritchiecli", | ||
"maintainer": "viniciusramosdefaria <[email protected]>", | ||
"description": "Install ritchie CLI", | ||
"homepage": "https://ritchiecli.io", | ||
"files": [ | ||
{ | ||
"from": "dist/linux/team/rit", | ||
"to": "/usr/local/bin", | ||
"base" : "dist/linux/team", | ||
"fperm": "0755" | ||
} | ||
], | ||
"preinst-file": "packaging/scripts/preinst.sh", | ||
"postinst-file": "packaging/scripts/postinst.sh" | ||
} |
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,17 @@ | ||
{ | ||
"name": "ritchiecli", | ||
"summary": "RitchieCLI installer", | ||
"description": "Install ritchie CLI", | ||
"license": "LICENSE", | ||
"changelog-cmd": "changelog rpm", | ||
"url": "https://github.com/ZupIT/ritchie-cli", | ||
"files": [ | ||
{ | ||
"from": "dist/linux/single/rit", | ||
"to": "/usr/local/bin", | ||
"base": "dist/linux/single", | ||
"type": "" | ||
} | ||
], | ||
"preinst": "packaging/scripts/preinst.sh" | ||
} |
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,18 @@ | ||
{ | ||
"name": "ritchiecli", | ||
"summary": "RitchieCLI installer", | ||
"description": "Install ritchie CLI", | ||
"license": "LICENSE", | ||
"changelog-cmd": "changelog rpm", | ||
"url": "https://github.com/ZupIT/ritchie-cli", | ||
"files": [ | ||
{ | ||
"from": "dist/linux/team/rit", | ||
"to": "/usr/local/bin", | ||
"base": "dist/linux/team", | ||
"type": "" | ||
} | ||
], | ||
"preinst": "packaging/scripts/preinst.sh", | ||
"postinst": "packaging/scripts/postinst-zup.sh" | ||
} |
Oops, something went wrong.