forked from ActiveState/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
activestate.offlineinstall.yaml
37 lines (35 loc) · 1.42 KB
/
activestate.offlineinstall.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
constants:
- name: BUILD_OFFINSTALL_TARGET
if: ne .OS.Name "Windows"
value: offline-installer
- name: BUILD_OFFINSTALL_TARGET
if: eq .OS.Name "Windows"
value: offline-installer.exe
- name: OFFINSTALL_PKGS
value: ./cmd/state-offline-installer
- name: BUILD_OFFUNINSTALL_TARGET
if: ne .OS.Name "Windows"
value: uninstall
- name: BUILD_OFFUNINSTALL_TARGET
if: eq .OS.Name "Windows"
value: uninstall.exe
- name: OFFUNINSTALL_PKGS
value: ./cmd/state-offline-uninstaller
scripts:
- name: build-offline-installer
language: bash
description: Builds the project with the host OS as the target OS.
value: |
set -e
$constants.SET_ENV
rm $BUILD_TARGET_DIR/offline/${constants.BUILD_OFFINSTALL_TARGET} || :
go build -tags "$GO_BUILD_TAGS" -o $BUILD_TARGET_DIR/offline/$constants.BUILD_OFFINSTALL_TARGET $constants.CLI_BUILDFLAGS $constants.OFFINSTALL_PKGS
go build -tags "$GO_BUILD_TAGS" -o $BUILD_TARGET_DIR/offline/$constants.BUILD_OFFUNINSTALL_TARGET $constants.CLI_BUILDFLAGS $constants.OFFUNINSTALL_PKGS
- name: pkg-offline-installer
language: bash
description: Packages the installer / uninstaller with the assets it requires
value: |
set -e
$constants.SET_ENV
cd $BUILD_TARGET_DIR/offline/
gozip -c ${constants.BUILD_OFFINSTALL_TARGET} artifacts.tar.gz LICENSE.txt installer_config.json $constants.BUILD_OFFUNINSTALL_TARGET