Skip to content

Commit

Permalink
fixes build
Browse files Browse the repository at this point in the history
  • Loading branch information
raffis committed Nov 21, 2018
1 parent be7714e commit 4611d2c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
28 changes: 14 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ VERSION := "0.0.1"
endif

# PACKAGES
DEB = $(DIST_DIR)/tubeectl-$(VERSION).deb
DEB = $(DIST_DIR)/tubectl-$(VERSION).deb

# NPM STUFF
NPM_BIN = npm

# TARGET ALIASES
INSTALL_TARGET = "$(INSTALL_PREFIX)/tubeectl"
INSTALL_TARGET = "$(INSTALL_PREFIX)/tubectl"
NPM_TARGET = $(NODE_MODULES_DIR)
CHANGELOG_TARGET = $(PACK_DIR)/DEBIAN/changelog
BUILD_TARGET = $(BUILD_DIR) $(DIST_DIR)/tubeectl
BUILD_TARGET = $(BUILD_DIR) $(NPM_TARGET)

# TARGETS
.PHONY: all
Expand All @@ -44,24 +44,24 @@ mostlyclean:
deps: npm


.PHONY: build
build: $(BUILD_TARGET)
#.PHONY: build
#build: $(BUILD_TARGET)


.PHONY: dist
dist: deb


.PHONY: deb
deb: $(DIST_DIR)/tubeectl-$(VERSION).deb
deb: $(DIST_DIR)/tubectl-$(VERSION).deb

$(DIST_DIR)/tubeectl-$(VERSION).deb: $(CHANGELOG_TARGET) $(BUILD_TARGET)
$(DIST_DIR)/tubectl-$(VERSION).deb: $(CHANGELOG_TARGET) $(BUILD_TARGET)
@-test ! -d $(PACK_DIR) || rm -rfv $(PACK_DIR)
@mkdir -p $(PACK_DIR)/DEBIAN
@cp $(BASE_DIR)/packaging/debian/control $(PACK_DIR)/DEBIAN/control
@sed -i s/'{version}'/$(VERSION)/g $(PACK_DIR)/DEBIAN/control
@mkdir -p $(PACK_DIR)/$(INSTALL_PREFIX)
@cp $(DIST_DIR)/tubeectl $(PACK_DIR)/$(INSTALL_PREFIX)
@cp $(DIST_DIR)/tubectl $(PACK_DIR)/$(INSTALL_PREFIX)
@-test -d $(DIST_DIR) || mkdir $(DIST_DIR)
@dpkg-deb --build $(PACK_DIR) $@
@rm -rf $(PACK_DIR)
Expand All @@ -85,7 +85,7 @@ $(CHANGELOG_TARGET): CHANGELOG.md
then \
if [ "$$v" != "" ]; \
then \
echo "tubeectl ($$v) $$stable; urgency=low" >> $@; \
echo "tubectl ($$v) $$stable; urgency=low" >> $@; \
echo -e "$$changes" >> $@; \
echo >> $@; \
echo " -- $$author $$date" >> $@; \
Expand Down Expand Up @@ -140,18 +140,18 @@ $(NPM_TARGET) : $(BASE_DIR)/package.json
@touch $@


.PHONY: pack
pack: $(BUILD_TARGET)
.PHONY: build
build: $(BUILD_TARGET)

$(BUILD_TARGET) : $(BASE_DIR)/build
@test "`$(NPM_BIN) install --dry-run 2>&1 >/dev/null | grep Failed`" == ""
$(NPM_BIN) run pack
$(NPM_BIN) run build
@touch $@


.PHONY: install
install: $(INSTALL_TARGET)

$(INSTALL_TARGET): $(BUILD_TARGET)
@cp -Rp $(DIST_DIR)/tubeectl $(INSTALL_PREFIX)/tubeectl
@chmod +x $(INSTALL_PREFIX)/tubeectl
@cp -Rp $(DIST_DIR)/tubectl $(INSTALL_PREFIX)/tubectl
@chmod +x $(INSTALL_PREFIX)/tubectl
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "tsc && node build/main.js",
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
"lint": "tslint --fix -p tsconfig.json",
"build": "npm run format && npm run prebuild && npm run coveralls",
"build": "npm run format && npm run prebuild",
"test": "jest --coverage",
"coveralls": "coveralls < coverage/lcov.info",
"dist-linux": "nexe --verbose -r ./node_modules/@gyselroth/tubee-sdk-node/swagger.yml -i build/main.js -o dist/tubectl -t linux-x64-8.12.0",
Expand Down
2 changes: 1 addition & 1 deletion packaging/debian/bintray.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"package": {
"name": "tubeectl",
"name": "tubectl",
"repo": "tubee",
"subject": "gyselroth",
"desc": "tubee console client",
Expand Down
2 changes: 1 addition & 1 deletion packaging/debian/control
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Package: tubeectl
Package: tubectl
Version: {version}
Architecture: all
Maintainer: Raffael Sahli <[email protected]>
Expand Down

0 comments on commit 4611d2c

Please sign in to comment.