Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
460dc78
Add .circleci/config.yml
ishih-opti Sep 1, 2022
d9ed70b
Updated config.yml
ishih-opti Sep 7, 2022
ab5a3d7
Updated config.yml
ishih-opti Sep 7, 2022
a597f33
Updated config.yml
ishih-opti Sep 7, 2022
1e4f32b
Updated config.yml
ishih-opti Sep 12, 2022
169441e
Updated config.yml
ishih-opti Sep 12, 2022
9b0c3d4
Updated config.yml
ishih-opti Sep 12, 2022
f0be43a
Updated config.yml
ishih-opti Sep 12, 2022
22f567b
Updated config.yml
ishih-opti Sep 12, 2022
733ce57
removingin trailing orphan quote at line 24
ishih-opti Sep 12, 2022
144e1f9
Updated config.yml
ishih-opti Sep 12, 2022
3594e2e
comment out error code in sha256sum-darwin
ishih-opti Sep 12, 2022
c578ced
Merge branch 'circleci-project-setup' of github.com:optimizely/aws-ok…
ishih-opti Sep 12, 2022
c53981b
add sudo to brew
ishih-opti Sep 12, 2022
253d108
comment out the lnking in sha256sum-darwin
ishih-opti Sep 12, 2022
1cf83bb
add installation of github-release
ishih-opti Sep 12, 2022
f9c1089
add arm64 for mac in Makefie
ishih-opti Sep 12, 2022
576d66b
add changes in Makefile.release for arm64 support on Mac
ishih-opti Sep 12, 2022
da2b150
add arm64 bin to the bottom list
ishih-opti Sep 12, 2022
1b609cc
add option for arm64 build on linux
ishih-opti Sep 12, 2022
d924732
add a package for arm64 compile
ishih-opti Sep 12, 2022
c000d6f
remove the flag in makefile in attempt to make arm64 to compile on linux
ishih-opti Sep 12, 2022
69da1f3
switching build OS to macos
ishih-opti Sep 12, 2022
5bc610c
fixing spaces issues in config.yml
ishih-opti Sep 12, 2022
6d283e2
uncomment code block that was commented out by accident in config.yml
ishih-opti Sep 12, 2022
a41d2c1
uncomment code block that was commented out by accident in config.yml
ishih-opti Sep 12, 2022
e91c4d5
uncomment code block that was commented out by accident in config.yml
ishih-opti Sep 12, 2022
30b4369
add go path config.yml
ishih-opti Sep 12, 2022
4a11c8a
dependency pkg install in config.yml
ishih-opti Sep 12, 2022
4e29dc2
dependency pkg install in config.yml
ishih-opti Sep 12, 2022
6bec3ac
dependency pkg install in config.yml
ishih-opti Sep 12, 2022
a741a02
dependency pkg install in config.yml
ishih-opti Sep 12, 2022
4ced03a
dependency pkg install in config.yml
ishih-opti Sep 12, 2022
ec017ee
dependency pkg install in config.yml
ishih-opti Sep 12, 2022
c91908a
dependency pkg install in config.yml
ishih-opti Sep 12, 2022
1ce60d3
dependency pkg install in config.yml
ishih-opti Sep 12, 2022
9670b0f
dependency pkg install in config.yml
ishih-opti Sep 12, 2022
049443d
dependency pkg install in config.yml
ishih-opti Sep 12, 2022
6834332
dependency pkg install in config.yml
ishih-opti Sep 12, 2022
1af1c01
now all gree, clean up code in config.yml
ishih-opti Sep 12, 2022
d69b9e6
now all gree, clean up code in config.yml
ishih-opti Sep 12, 2022
223dcb4
now all gree, clean up code in config.yml
ishih-opti Sep 12, 2022
f4000a9
now all gree, clean up code in config.yml
ishih-opti Sep 12, 2022
7393028
fix pkg cloud
ishih-opti Sep 13, 2022
ac68fa1
fix step dependency
ishih-opti Sep 13, 2022
279be18
fix step dependency
ishih-opti Sep 13, 2022
8dabd0c
update segment to optimizely in Makefile.release for package cloud
ishih-opti Sep 13, 2022
b3a1cad
changing publish code for darwins
ishih-opti Sep 13, 2022
0f826f9
fixing things for github-release
ishih-opti Sep 13, 2022
9328c65
cleanup in Makefile.tools
ishih-opti Sep 13, 2022
675c7f3
cleanup in Makefile.tools
ishih-opti Sep 13, 2022
075892d
Add .circleci/config.yml
ishih-opti Sep 14, 2022
1f03050
Add .circleci/config.yml
ishih-opti Sep 14, 2022
2657ffd
change from segement to optimizely in go.mod
ishih-opti Sep 14, 2022
a7052f0
Merge branch 'circleci-project-setup' of github.com:optimizely/aws-ok…
ishih-opti Sep 14, 2022
c4fbfc2
recover overwritten file by master
ishih-opti Sep 14, 2022
e8fc2a9
revert changes in go.mod
ishih-opti Sep 14, 2022
032a2e3
get git-release to start runing
ishih-opti Sep 14, 2022
1c0af36
get git-release to start runing
ishih-opti Sep 14, 2022
c457537
get git-release to start runing
ishih-opti Sep 14, 2022
6d8152f
get git-release to start runing
ishih-opti Sep 14, 2022
4f6ef6d
get git-release to start runing
ishih-opti Sep 14, 2022
5fed2d6
test not to install rpm
ishih-opti Sep 14, 2022
2022781
test not to install rpm
ishih-opti Sep 14, 2022
3716109
test not to install libusb
ishih-opti Sep 14, 2022
cb1da19
test not to install libusb and put braces around variable
ishih-opti Sep 14, 2022
56558a9
get git-release to start runing
ishih-opti Sep 14, 2022
431deb7
get git-release to start runing
ishih-opti Sep 14, 2022
fd58304
get git-release to start runing
ishih-opti Sep 14, 2022
d63e452
get git-release to start runing
ishih-opti Sep 14, 2022
89e4a72
get git-release to start runing
ishih-opti Sep 14, 2022
ed1d86e
get git-release to start runing
ishih-opti Sep 14, 2022
a62bc37
get git-release to start runing
ishih-opti Sep 14, 2022
95e0b5e
get git-release to start runing
ishih-opti Sep 15, 2022
bdf3ce0
get git-release to start runing
ishih-opti Sep 15, 2022
c32b464
get git-release to start runing
ishih-opti Sep 15, 2022
0b62bda
get git-release to start runing
ishih-opti Sep 15, 2022
9ddd2fe
get git-release to start runing
ishih-opti Sep 15, 2022
dc26eed
get git-release to start runing
ishih-opti Sep 15, 2022
9c47f9a
fix github-release command
ishih-opti Sep 15, 2022
550d9c8
fix github-release command
ishih-opti Sep 15, 2022
4f5c81b
fix github-release command
ishih-opti Sep 15, 2022
d3008fd
fix github-release command
ishih-opti Sep 15, 2022
ac9bb11
fixing git-release
ishih-opti Sep 16, 2022
551eb0d
fixing git-release
ishih-opti Sep 16, 2022
5318f20
fixing git-release
ishih-opti Sep 16, 2022
8560a58
fix github-release command
ishih-opti Sep 16, 2022
f9305a4
fix github-release command
ishih-opti Sep 20, 2022
3dcdd60
fix github-release command
ishih-opti Sep 20, 2022
8caafeb
github-release command work separately for linux and darwin
ishih-opti Sep 21, 2022
d7f92ae
add env GITHUB_TOKEN in project
ishih-opti Sep 21, 2022
0cbfdd2
add linix part to the code
ishih-opti Sep 21, 2022
2d44e2c
add linix part to the code
ishih-opti Sep 22, 2022
a0c9325
fixing linux part of release
ishih-opti Sep 22, 2022
5445f18
fixing linux part of release
ishih-opti Sep 22, 2022
f2d079d
fix release
ishih-opti Sep 22, 2022
6778d0b
fix release
ishih-opti Sep 22, 2022
334f93f
fix release
ishih-opti Sep 22, 2022
accca8f
fix release
ishih-opti Sep 22, 2022
d0dd42f
fix release
ishih-opti Sep 22, 2022
c725789
debug release
ishih-opti Sep 22, 2022
0b4e545
debug release
ishih-opti Sep 22, 2022
cb3a830
debug release
ishih-opti Sep 22, 2022
e7ad595
debug release
ishih-opti Sep 22, 2022
d4ed98d
debug release
ishih-opti Sep 22, 2022
5ef1f8c
debug release
ishih-opti Sep 22, 2022
1405ba6
debug release
ishih-opti Sep 22, 2022
f7b3606
debug release
ishih-opti Sep 22, 2022
a520050
debug release
ishih-opti Sep 22, 2022
186386a
debug release
ishih-opti Sep 22, 2022
a527151
Revert "add linix part to the code"
ishih-opti Sep 22, 2022
4f1738e
testing verbose mode
ishih-opti Sep 22, 2022
77fb630
add timing btwn github-release commands
ishih-opti Sep 22, 2022
226f9f6
Revert "fixing linux part of release"
ishih-opti Sep 23, 2022
664766b
Revert "debug release"
ishih-opti Sep 23, 2022
e53c2a6
adding timing for github-release
ishih-opti Sep 23, 2022
3129f0a
remove bad line for github-release
ishih-opti Sep 23, 2022
42a4fb1
remove all commented out codes not in use
ishih-opti Sep 23, 2022
87238d3
remove all related to packagecloud not in use
ishih-opti Sep 23, 2022
e768a85
more clean up for unused code
ishih-opti Sep 23, 2022
2e8cae1
more clean up for unused code
ishih-opti Sep 23, 2022
547b1a5
more cleanup
ishih-opti Sep 23, 2022
0d2cba1
Revert "remove all related to packagecloud not in use"
ishih-opti Sep 23, 2022
b11d52b
Makefile.tool changes to restore pkgcloud and linking for binary
ishih-opti Sep 23, 2022
48edcb5
Makefile.tool changes to add nl in the end and remove extra lines
ishih-opti Sep 23, 2022
e863cf9
adding back pkgcloud flag n github-release flag
ishih-opti Sep 23, 2022
189a18a
adding another command back in github-release and add timing
ishih-opti Sep 23, 2022
fb04fee
removing timing for second one since it's not needed
ishih-opti Sep 23, 2022
f3b69e3
change image build consistency to be the same
ishih-opti Sep 23, 2022
74c9b52
restore go.* files from master
ishih-opti Sep 23, 2022
5fd979b
restoring back to original so it's easier to do code review
ishih-opti Sep 23, 2022
60d30ae
delete an accidental misplaced copy/paste line in Makefile.tool
ishih-opti Sep 23, 2022
cc0d2fd
delete an accidental misplaced copy/paste line in Makefile.tool
ishih-opti Sep 23, 2022
1e3a800
checking Makefiles.tools line 30 issue
ishih-opti Oct 6, 2022
c8c3326
checking Makefiles.tools line 30 issue
ishih-opti Oct 6, 2022
579fcaa
checking Makefiles.tools line 30 issue
ishih-opti Oct 6, 2022
d348b4a
checking Makefiles.tools line 30 issue
ishih-opti Oct 6, 2022
14f4962
checking Makefiles.tools line 30 issue
ishih-opti Oct 6, 2022
091442e
checking Makefiles.tools line 30 issue
ishih-opti Oct 6, 2022
77eefb7
checking Makefiles.tools line 30 issue
ishih-opti Oct 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 68 additions & 39 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
test:
docker:
- image: circleci/golang:1.13
working_directory: /go/src/github.com/segmentio/aws-okta
working_directory: /go/src/github.com/optimizely/aws-okta
steps:
- run:
# Do this prior to checkout so that it doesn't modify go.mod file.
Expand Down Expand Up @@ -50,11 +50,10 @@ jobs:
git status
exit 1
fi

dist-linux:
docker:
- image: circleci/golang:1.13
working_directory: /go/src/github.com/segmentio/aws-okta
working_directory: /go/src/github.com/optimizely/aws-okta
steps:
- checkout
- run:
Expand All @@ -70,11 +69,25 @@ jobs:
name: Make distributables
command: |
make -f Makefile.release dist-linux
- persist_to_workspace:
root: .
paths: ['dist/*']

publish-packagecloud:
docker:
- image: circleci/golang:1.13
working_directory: /go/src/github.com/segmentio/aws-okta
steps:
- checkout
- attach_workspace: { at: . }
- run:
name: Install tools
command: |
make -f Makefile.tools github-release
# this is all for package_cloud :/
sudo apt update -q
sudo apt install -yq ruby ruby-dev build-essential
# fixes https://askubuntu.com/questions/872399/error-failed-to-build-gem-native-extension-when-trying-to-download-rubocop
sudo gem install rake
sudo make -f Makefile.tools package_cloud
make -f Makefile.release publish-packagecloud
publish-github-linux:
docker:
- image: circleci/golang:1.13
working_directory: /go/src/github.com/segmentio/aws-okta
Expand All @@ -85,61 +98,77 @@ jobs:
name: Install tools
command: |
make -f Makefile.tools github-release
# this is all for package_cloud :/
sudo apt update -q
sudo apt install -yq ruby ruby-dev build-essential
# fixes https://askubuntu.com/questions/872399/error-failed-to-build-gem-native-extension-when-trying-to-download-rubocop
sudo gem install rake
sudo make -f Makefile.tools package_cloud
make -f Makefile.release publish-packagecloud
make -f Makefile.release publish-github-linux
# ishih-opti - my changes, add job list: dist-darwin and publish-github
dist-darwin:
macos:
xcode: 12.5.1 # indicate our selected version of Xcode
steps:
- checkout
- run:
name: install packages
command: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install go@1.17
export PATH=/usr/local/opt/go@1.17/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/bin:$PATH
curl -Ls https://github.com/goreleaser/nfpm/releases/download/v1.2.0/nfpm_1.2.0_Darwin_x86_64.tar.gz > nfpm.tar.gz
tar xzvf nfpm.tar.gz && mv nfpm /usr/local/bin
- run:
name: make tools for macos
command: |
export PATH=/usr/local/opt/go@1.17/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/bin:$PATH
# make -f Makefile.tools rpmbuild-darwin sha256sum-darwin
make -f Makefile.tools sha256sum-darwin

publish-github-linux:
- run:
name: make distribution
command: |
export PATH=/usr/local/opt/go@1.17/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/bin:$PATH
make -f Makefile.release dist-darwin
- persist_to_workspace:
root: .
paths: ['dist/*']
publish-github:
docker:
- image: circleci/golang:1.13
working_directory: /go/src/github.com/segmentio/aws-okta
working_directory: /go/src/github.com/optimizely/aws-okta
steps:
- checkout
- attach_workspace: { at: . }
- run:
name: Install tools
name: Install tool and publish release
command: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
export PATH=/home/linuxbrew/.linuxbrew/bin:/usr/local/opt/go@1.17/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/bin:$PATH
make -f Makefile.tools github-release
make -f Makefile.release publish-github-linux
make -f Makefile.release publish-github-darwin

workflows:
version: 2
# currently we only build/publish for linux: macOS builds require non-FOSS
# Keychain libs that require a macOS host to build on
# https://github.com/segmentio/aws-okta/issues/81
test-dist-publish-linux:
# https://github.com/optimizely/aws-okta/issues/81
dist-publish:
jobs:
- test
- test-build-golang-prev
# - test
# - test-build-golang-prev
- dist-linux:
# needed to ensure dist happens on tag events
filters:
tags:
only: /.*/
- publish-packagecloud:
context: packagecloud
requires:
- dist-linux
- dist-darwin:
# needed to ensure dist happens on tag events
filters:
# never publish from a branch event
branches:
ignore: /.*/
# release only on tag push events like vX[.Y.Z...][-whatever]
tags:
only: /v[0-9]+(\.[0-9]+)*(-[a-zA-Z0-9-]+)?/
- publish-github-linux:
context: github-segmentcircle-oss-release
only: /.*/
### ishih-opti - add for releasing it on github
- publish-github:
context: github-optimizelycircle-oss-release
requires:
- dist-linux
- dist-darwin
filters:
# never publish from a branch event
branches:
ignore: /.*/
# disabled (temporarily?) due to https://github.com/segmentio/aws-okta/issues/301
# release only on tag push events like vX[.Y.Z...][-whatever]
# tags:
# only: /v[0-9]+(\.[0-9]+)*(-[a-zA-Z0-9-]+)?/
tags:
only: /.*/
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
#
# This makefile is meant for humans

VERSION := $(shell git describe --tags --always --dirty="-dev")
VERSION := $(shell git describe --tags --always --dirty="-dev"|cut -d"-" -f 1)
LDFLAGS := -ldflags='-X "main.Version=$(VERSION)"'

test:
GO111MODULE=on go test -mod=vendor -v ./...

all: dist/aws-okta-$(VERSION)-darwin-amd64 dist/aws-okta-$(VERSION)-linux-amd64
all: dist/aws-okta-$(VERSION)-darwin-amd64 dist/aws-okta-$(VERSION)-darwin-arm64 dist/aws-okta-$(VERSION)-linux-amd64

clean:
rm -rf ./dist
Expand All @@ -21,6 +21,9 @@ dist/:
dist/aws-okta-$(VERSION)-darwin-amd64: | dist/
GOOS=darwin GOARCH=amd64 GO111MODULE=on go build -mod=vendor $(LDFLAGS) -o $@

dist/aws-okta-$(VERSION)-darwin-arm64: | dist/
GOOS=darwin GOARCH=arm64 GO111MODULE=on go build -mod=vendor $(LDFLAGS) -o $@

dist/aws-okta-$(VERSION)-linux-amd64: | dist/
GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod=vendor $(LDFLAGS) -o $@

Expand Down
56 changes: 30 additions & 26 deletions Makefile.release
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ include Makefile

# use bash so we can use set -o pipefail
SHELL := /bin/bash

# set --pre-release if not tagged or tree is dirty or there's a `-` in the tag
ifneq (,$(findstring -,$(VERSION)))
GITHUB_RELEASE_FLAGS := "--pre-release"
Expand Down Expand Up @@ -39,42 +38,49 @@ publish-linux: publish-github-linux publish-packagecloud

publish-github: publish-github-darwin publish-github-linux publish-github-sha256sums

publish-github-darwin: publish-github-darwin-bin
publish-github-darwin: publish-github-darwin-bin publish-github-darwin-bin-arm64

publish-github-linux: publish-github-linux-bin publish-github-deb publish-github-rpm

publish-packagecloud: publish-packagecloud-deb publish-packagecloud-rpm

github-release:
set -o pipefail; \
scripts/changelog | github-release release \
--security-token $$GH_LOGIN \
--user segmentio \
scripts/changelog| github-release release \
--user optimizely \
--repo aws-okta \
$(GITHUB_RELEASE_FLAGS) \
--tag $(VERSION) \
--description - \
--name $(VERSION) || \
github-release info \
--security-token $$GH_LOGIN \
--user segmentio \
--repo aws-okta \
--tag $(VERSION)
--name $(VERSION) \
; sleep 20 || \
github-release info \
--user optimizely \
--repo aws-okta \
--tag $(VERSION) \
--name $(VERSION)

publish-github-darwin-bin: dist/aws-okta-$(VERSION)-darwin-amd64 | github-release
github-release upload \
--security-token $$GH_LOGIN \
--user segmentio \
--user optimizely \
--repo aws-okta \
--tag $(VERSION) \
--name aws-okta-$(VERSION)-darwin-amd64 \
--replace \
--file $<

publish-github-darwin-bin-arm64: dist/aws-okta-$(VERSION)-darwin-arm64 | github-release
github-release upload \
--user optimizely \
--repo aws-okta \
--tag $(VERSION) \
--name aws-okta-$(VERSION)-darwin-arm64 \
--replace \
--file $<

publish-github-linux-bin: dist/aws-okta-$(VERSION)-linux-amd64 | github-release
github-release upload \
--security-token $$GH_LOGIN \
--user segmentio \
--user optimizely \
--repo aws-okta \
--tag $(VERSION) \
--name aws-okta-$(VERSION)-linux-amd64 \
Expand All @@ -83,8 +89,7 @@ publish-github-linux-bin: dist/aws-okta-$(VERSION)-linux-amd64 | github-release

publish-github-deb: dist/aws-okta_$(VERSION)_amd64.deb | github-release
github-release upload \
--security-token $$GH_LOGIN \
--user segmentio \
--user optimizely \
--repo aws-okta \
--tag $(VERSION) \
--name aws-okta_$(VERSION)_amd64.deb \
Expand All @@ -93,8 +98,7 @@ publish-github-deb: dist/aws-okta_$(VERSION)_amd64.deb | github-release

publish-github-rpm: dist/aws-okta_$(VERSION)_amd64.rpm | github-release
github-release upload \
--security-token $$GH_LOGIN \
--user segmentio \
--user optimizely \
--repo aws-okta \
--tag $(VERSION) \
--name aws-okta_$(VERSION)_amd64.rpm \
Expand All @@ -103,8 +107,7 @@ publish-github-rpm: dist/aws-okta_$(VERSION)_amd64.rpm | github-release

publish-github-sha256sums: dist/aws-okta-$(VERSION).sha256sums | github-release
github-release upload \
--security-token $$GH_LOGIN \
--user segmentio \
--user optimizely \
--repo aws-okta \
--tag $(VERSION) \
--name aws-okta-$(VERSION).sha256sums \
Expand All @@ -120,24 +123,24 @@ packagecloud.conf.json:
publish-packagecloud-deb: dist/aws-okta_$(VERSION)_amd64.deb packagecloud.conf.json
@set -o pipefail; \
for v in $(PACKAGECLOUD_DEB_DISTROS); do \
(package_cloud yank --config packagecloud.conf.json segment/aws-okta$(PACKAGECLOUD_NAME_SUFFIX)/$$v aws-okta_$(VERSION_NO_V)_amd64.deb || true) | \
(package_cloud yank --config packagecloud.conf.json optimizely/aws-okta$(PACKAGECLOUD_NAME_SUFFIX)/$$v aws-okta_$(VERSION_NO_V)_amd64.deb || true) | \
grep -v 'with token:' || true ; \
package_cloud push --config packagecloud.conf.json segment/aws-okta$(PACKAGECLOUD_NAME_SUFFIX)/$$v $< | \
package_cloud push --config packagecloud.conf.json optimizely/aws-okta$(PACKAGECLOUD_NAME_SUFFIX)/$$v $< | \
grep -v 'with token:' ; \
done

publish-packagecloud-rpm: dist/aws-okta_$(VERSION)_amd64.rpm packagecloud.conf.json
@set -o pipefail; \
for v in $(PACKAGECLOUD_RPM_DISTROS); do \
(package_cloud yank --config packagecloud.conf.json segment/aws-okta$(PACKAGECLOUD_NAME_SUFFIX)/$$v aws-okta-$(subst -,_,$(VERSION_NO_V))-1.x86_64.rpm || true) | \
(package_cloud yank --config packagecloud.conf.json optimizely/aws-okta$(PACKAGECLOUD_NAME_SUFFIX)/$$v aws-okta-$(subst -,_,$(VERSION_NO_V))-1.x86_64.rpm || true) | \
grep -v 'with token:' || true ; \
package_cloud push --config packagecloud.conf.json segment/aws-okta$(PACKAGECLOUD_NAME_SUFFIX)/$$v $< | \
package_cloud push --config packagecloud.conf.json optimizely/aws-okta$(PACKAGECLOUD_NAME_SUFFIX)/$$v $< | \
grep -v 'with token:' ; \
done

dist: dist-darwin dist-linux dist/aws-okta-$(VERSION).sha256sums

dist-darwin: dist/aws-okta-$(VERSION)-darwin-amd64
dist-darwin: dist/aws-okta-$(VERSION)-darwin-amd64 dist/aws-okta-$(VERSION)-darwin-arm64

dist-linux: dist/aws-okta-$(VERSION)-linux-amd64 dist/aws-okta_$(VERSION)_amd64.deb dist/aws-okta_$(VERSION)_amd64.rpm

Expand Down Expand Up @@ -165,4 +168,5 @@ dist/aws-okta_$(VERSION)_amd64.rpm: dist/nfpm-$(VERSION).yaml dist/aws-okta-$(VE
publish-github-deb \
publish-github-darwin \
publish-github-darwin-bin \
publish-github-darwin-bin-arm64 \
github-release
15 changes: 8 additions & 7 deletions Makefile.tools
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#
# These are fragile, non-portable, and often require root
#
NFPM_VERSION := 0.9.3
#from https://github.com/goreleaser/nfpm/releases/download/v0.9.3/nfpm_0.9.3_checksums.txt
NFPM_SHA256 := f875ac060a30ec5c164e5444a7278322b276707493fa0ced6bfdd56640f0a6ea
NFPM_VERSION := 1.2.0
#from https://github.com/goreleaser/nfpm/releases/download/v0.9.3/nfpm_1.2.0_checksums.txt
NFPM_SHA256 := 4659e714cc3d1fc1fa3ba75bb531901b0d2a89e5f59171145fb89bf1d392cb29

nfpm-debian:
cd /tmp && \
Expand All @@ -21,17 +21,18 @@ rpmbuild-darwin:
brew install rpm

sha256sum-darwin:
brew install coreutils && ln -s $$(which gsha256sum) /usr/local/bin/sha256sum`
brew install coreutils && export PATH=/usr/local/opt/coreutils/libexec/gnubin:$PATH
# && ln -s $$(which gsha256sum) /usr/local/bin/sha256sum

github-release:
GO111MODULE=off go get -u github.com/aktau/github-release
test -f /usr/local/bin/github-release || brew install github-release

package_cloud:
gem install package_cloud
gem install package_cloud

.PHONY: nfpm-debian \
rpmbuild-debian \
rpmbuild-darwin \
sha256sum-darwin \
github-release \
package_cloud
package_cloud
2 changes: 1 addition & 1 deletion nfpm.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ provides:
- aws-okta
vendor: 'Segment, Inc.'
maintainer: tooling-team@segment.com
homepage: "https://github.com/segmentio/aws-okta"
homepage: "https://github.com/optimizely/aws-okta"
license: "MIT"
# IMHO packages should install to /usr/bin
bindir: /usr/bin
Expand Down